summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2022-03-15 14:17:37 +0100
committerMarc Mutz <marc.mutz@qt.io>2022-03-18 14:08:18 +0100
commit371f12918672d32f2b0f98f66943c3862d684720 (patch)
tree27e17922fa965877abbe3101dd89134a94f8c74e /src
parente2dd511c79e787164fa7aafe5dbf8e3e38151c67 (diff)
downloadqtbase-371f12918672d32f2b0f98f66943c3862d684720.tar.gz
QLibrary: restore translated string
We want to pick this change to LTS branches, so we cannot change the translated string. Instead of fixing the order of placeholders, use multi-arg, which performs only a single pass over the input and doesn't suffer from placeholder injection by interpolation the way .arg() chaining does. Requires to use QString::number(), though. Amends 3636325946b471d48043540e309bf6f52be45331. Change-Id: I6484a052115096c609edfea27dfd36b196efc1b6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit 73d0174f50374090d0d0b45322e86b2ca825886d) Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/plugin/qlibrary.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp
index 54c8b71203..8ba8573778 100644
--- a/src/corelib/plugin/qlibrary.cpp
+++ b/src/corelib/plugin/qlibrary.cpp
@@ -806,12 +806,12 @@ void QLibraryPrivate::updatePluginState()
(qt_version&0xff0000) >> 16, (qt_version&0xff00) >> 8, qt_version&0xff,
debug ? "debug" : "release");
}
- errorString = QLibrary::tr("The plugin '%5' uses incompatible Qt library. (%1.%2.%3) [%4]")
- .arg((qt_version&0xff0000) >> 16)
- .arg((qt_version&0xff00) >> 8)
- .arg(qt_version&0xff)
- .arg(debug ? QLatin1String("debug") : QLatin1String("release"))
- .arg(fileName);
+ errorString = QLibrary::tr("The plugin '%1' uses incompatible Qt library. (%2.%3.%4) [%5]")
+ .arg(fileName,
+ QString::number((qt_version & 0xff0000) >> 16),
+ QString::number((qt_version & 0xff00) >> 8),
+ QString::number(qt_version & 0xff),
+ debug ? QLatin1String("debug") : QLatin1String("release"));
#ifndef QT_NO_DEBUG_PLUGIN_CHECK
} else if(debug != QLIBRARY_AS_DEBUG) {
//don't issue a qWarning since we will hopefully find a non-debug? --Sam