summaryrefslogtreecommitdiff
path: root/src/assistant/help/qhelp_global.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/assistant/help/qhelp_global.cpp')
-rw-r--r--src/assistant/help/qhelp_global.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/assistant/help/qhelp_global.cpp b/src/assistant/help/qhelp_global.cpp
index ff972633f..795906c16 100644
--- a/src/assistant/help/qhelp_global.cpp
+++ b/src/assistant/help/qhelp_global.cpp
@@ -48,15 +48,13 @@
QString QHelpGlobal::uniquifyConnectionName(const QString &name, void *pointer)
{
- static int counter = 0;
static QMutex mutex;
-
QMutexLocker locker(&mutex);
- if (++counter > 1000)
- counter = 0;
+
+ static QHash<QString,quint16> idHash;
return QString::fromLatin1("%1-%2-%3").
- arg(name).arg(quintptr(pointer)).arg(counter);
+ arg(name).arg(quintptr(pointer)).arg(++idHash[name]);
}
QString QHelpGlobal::documentTitle(const QString &content)