diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-06-03 23:08:05 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-06-03 23:28:18 +0200 |
commit | 9c357d64db3aedba6802e9a508abbbdc67f3ef8d (patch) | |
tree | de071d311828da025cdfa9d3771d7b2532a1576f /src/corelib/kernel | |
parent | ed02ab78eae652491892b6d8cfd60bcdf06e6bae (diff) |
QtCore: use new QLatin1String::arg()
Saves ~600B in text size on optimized GCC 9.1 Linux AMD64 builds.
Change-Id: I12f4e7c8d28af9549b481859bc96a155aeb6f15c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/corelib/kernel')
-rw-r--r-- | src/corelib/kernel/qjni.cpp | 8 | ||||
-rw-r--r-- | src/corelib/kernel/qsystemsemaphore_systemv.cpp | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/kernel/qjni.cpp b/src/corelib/kernel/qjni.cpp index 75a2436d9d..5f652d70e3 100644 --- a/src/corelib/kernel/qjni.cpp +++ b/src/corelib/kernel/qjni.cpp @@ -47,9 +47,9 @@ QT_BEGIN_NAMESPACE -static inline QString keyBase() +static inline QLatin1String keyBase() { - return QStringLiteral("%1%2:%3"); + return QLatin1String("%1%2:%3"); } static QString qt_convertJString(jstring string) @@ -154,7 +154,7 @@ static jmethodID getCachedMethodID(JNIEnv *env, if (className.isEmpty()) return getMethodID(env, clazz, name, sig, isStatic); - const QString key = keyBase().arg(QLatin1String(className)).arg(QLatin1String(name)).arg(QLatin1String(sig)); + const QString key = keyBase().arg(QLatin1String(className), QLatin1String(name), QLatin1String(sig)); QHash<QString, jmethodID>::const_iterator it; { @@ -206,7 +206,7 @@ static jfieldID getCachedFieldID(JNIEnv *env, if (className.isNull()) return getFieldID(env, clazz, name, sig, isStatic); - const QString key = keyBase().arg(QLatin1String(className)).arg(QLatin1String(name)).arg(QLatin1String(sig)); + const QString key = keyBase().arg(QLatin1String(className), QLatin1String(name), QLatin1String(sig)); QHash<QString, jfieldID>::const_iterator it; { diff --git a/src/corelib/kernel/qsystemsemaphore_systemv.cpp b/src/corelib/kernel/qsystemsemaphore_systemv.cpp index 9e438ae2a6..2c38d74d2d 100644 --- a/src/corelib/kernel/qsystemsemaphore_systemv.cpp +++ b/src/corelib/kernel/qsystemsemaphore_systemv.cpp @@ -76,7 +76,7 @@ key_t QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode mode) #if QT_CONFIG(translation) QCoreApplication::tr("%1: key is empty", "QSystemSemaphore") #else - QString::fromLatin1("%1: key is empty") + QLatin1String("%1: key is empty") #endif .arg(QLatin1String("QSystemSemaphore::handle:")); error = QSystemSemaphore::KeyError; @@ -94,7 +94,7 @@ key_t QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode mode) #if QT_CONFIG(translation) QCoreApplication::tr("%1: unable to make key", "QSystemSemaphore") #else - QString::fromLatin1("%1: unable to make key") + QLatin1String("%1: unable to make key") #endif .arg(QLatin1String("QSystemSemaphore::handle:")); error = QSystemSemaphore::KeyError; @@ -111,7 +111,7 @@ key_t QSystemSemaphorePrivate::handle(QSystemSemaphore::AccessMode mode) #if QT_CONFIG(translation) QCoreApplication::tr("%1: ftok failed", "QSystemSemaphore") #else - QString::fromLatin1("%1: ftok failed") + QLatin1String("%1: ftok failed") #endif .arg(QLatin1String("QSystemSemaphore::handle:")); error = QSystemSemaphore::KeyError; |