diff options
| author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-02-03 17:28:28 +0100 |
|---|---|---|
| committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-02-03 17:28:29 +0100 |
| commit | 80c6a5ea7f827647cc58037e1d1cf4bbf30e1fb6 (patch) | |
| tree | 01f3d4834202407107c981c1753e4e32d8bd9151 /src/assistant/help/qhelp_global.cpp | |
| parent | 37c52018499ebe9e28a84f1d1ac4edb9abd9798c (diff) | |
| parent | cc253a0469336d6c36152b8d1d6a29b9fe68032a (diff) | |
Merge remote-tracking branch 'origin/release' into stableold/5.2
Change-Id: I6d8fce7daab4dcfc9ffc93543dd0a1337a3f3c9d
Diffstat (limited to 'src/assistant/help/qhelp_global.cpp')
| -rw-r--r-- | src/assistant/help/qhelp_global.cpp | 8 |
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) |
