summaryrefslogtreecommitdiffstats
path: root/src/assistant/help/qhelp_global.cpp
diff options
context:
space:
mode:
authorJarek Kobus <jaroslaw.kobus@qt.io>2024-02-08 00:23:51 +0100
committerJarek Kobus <jaroslaw.kobus@qt.io>2024-02-13 22:24:11 +0100
commit25a36bca696023c9fe8ea7514a074df360660473 (patch)
tree5a1dc79622e3a77b94875d9d90ca6d7e0c988eac /src/assistant/help/qhelp_global.cpp
parent9f125e0dff3f6e7b4d4079218db459ee328af46c (diff)
QtHelp: Bit more cleanup in cpp files
Inline some short methods in private API. Use more {} for default constructed values. Fix indentations. Add some TODOs. Task-number: QTBUG-122025 Change-Id: I29062709f6d302a8768ead1c20eda3af5c256c74 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/assistant/help/qhelp_global.cpp')
-rw-r--r--src/assistant/help/qhelp_global.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/assistant/help/qhelp_global.cpp b/src/assistant/help/qhelp_global.cpp
index f4b8ac01c..3eb964766 100644
--- a/src/assistant/help/qhelp_global.cpp
+++ b/src/assistant/help/qhelp_global.cpp
@@ -6,18 +6,14 @@
#include <QtCore/qcoreapplication.h>
#include <QtCore/qhash.h>
#include <QtCore/qmutex.h>
-#include <QtCore/qregularexpression.h>
#include <QtGui/qtextdocument.h>
QString QHelpGlobal::uniquifyConnectionName(const QString &name, void *pointer)
{
static QMutex mutex;
QMutexLocker locker(&mutex);
-
- static QHash<QString,quint16> idHash;
-
- return QString::fromLatin1("%1-%2-%3").
- arg(name).arg(quintptr(pointer)).arg(++idHash[name]);
+ static QHash<QString, quint16> idHash;
+ return QString::asprintf("%ls-%p-%d", qUtf16Printable(name), pointer, ++idHash[name]);
}
QString QHelpGlobal::documentTitle(const QString &content)