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 3636325946.

Pick-to: 6.3 6.2 5.15
Change-Id: I6484a052115096c609edfea27dfd36b196efc1b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
bb10
Marc Mutz 2022-03-15 14:17:37 +01:00
parent 021134195e
commit 73d0174f50
1 changed files with 6 additions and 6 deletions

View File

@ -784,12 +784,12 @@ void QLibraryPrivate::updatePluginState()
QFile::encodeName(fileName).constData(),
(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"));
} else if (PluginMustMatchQtDebug && debug != QtBuildIsDebug) {
//don't issue a qWarning since we will hopefully find a non-debug? --Sam
errorString = QLibrary::tr("The plugin '%1' uses incompatible Qt library."