Make better use of new QStringList::join(QLatin1String) overload
It was added in Qt 5.8. Change-Id: I7194fbfaef9219110604f3b03a893a658c996c06 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
cfe1a295fc
commit
9965e92e4f
@ -1124,7 +1124,7 @@ static void init_platform(const QString &pluginArgument, const QString &platform
|
||||
= QStringLiteral("This application failed to start because it could not find or load the Qt platform plugin \"%1\"\nin \"%2\".\n\n").arg(name, QDir::toNativeSeparators(platformPluginPath));
|
||||
if (!keys.isEmpty()) {
|
||||
fatalMessage += QStringLiteral("Available platform plugins are: %1.\n\n").arg(
|
||||
keys.join(QStringLiteral(", ")));
|
||||
keys.join(QLatin1String(", ")));
|
||||
}
|
||||
fatalMessage += QStringLiteral("Reinstalling the application may fix this problem.");
|
||||
#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT)
|
||||
|
@ -81,7 +81,7 @@ static QDebug operator<<(QDebug d, const QMimeData *mimeData)
|
||||
d << "QMimeData(";
|
||||
if (mimeData) {
|
||||
const QStringList formats = mimeData->formats();
|
||||
d << "formats=" << formats.join(QStringLiteral(", "));
|
||||
d << "formats=" << formats.join(QLatin1String(", "));
|
||||
if (mimeData->hasText())
|
||||
d << ", text=" << mimeData->text();
|
||||
if (mimeData->hasHtml())
|
||||
@ -321,7 +321,7 @@ void QWindowsClipboard::setMimeData(QMimeData *mimeData, QClipboard::Mode mode)
|
||||
const HRESULT src = OleSetClipboard(m_data);
|
||||
if (src != S_OK) {
|
||||
QString mimeDataFormats = mimeData ?
|
||||
mimeData->formats().join(QStringLiteral(", ")) : QString(QStringLiteral("NULL"));
|
||||
mimeData->formats().join(QLatin1String(", ")) : QString(QStringLiteral("NULL"));
|
||||
qErrnoWarning("OleSetClipboard: Failed to set mime data (%s) on clipboard: %s",
|
||||
qPrintable(mimeDataFormats),
|
||||
QWindowsContext::comErrorString(src).constData());
|
||||
|
@ -1189,7 +1189,7 @@ void QWindowsNativeFileDialogBase::selectNameFilter(const QString &filter)
|
||||
if (index < 0) {
|
||||
qWarning("%s: Invalid parameter '%s' not found in '%s'.",
|
||||
__FUNCTION__, qPrintable(filter),
|
||||
qPrintable(m_nameFilters.join(QStringLiteral(", "))));
|
||||
qPrintable(m_nameFilters.join(QLatin1String(", "))));
|
||||
return;
|
||||
}
|
||||
m_fileDialog->SetFileTypeIndex(index + 1); // one-based.
|
||||
|
@ -305,7 +305,7 @@ int runMoc(int argc, char **argv)
|
||||
|
||||
const QStringList files = parser.positionalArguments();
|
||||
if (files.count() > 1) {
|
||||
error(qPrintable(QStringLiteral("Too many input files specified: '") + files.join(QStringLiteral("' '")) + QLatin1Char('\'')));
|
||||
error(qPrintable(QLatin1String("Too many input files specified: '") + files.join(QLatin1String("' '")) + QLatin1Char('\'')));
|
||||
parser.showHelp(1);
|
||||
} else if (!files.isEmpty()) {
|
||||
filename = files.first();
|
||||
|
Loading…
x
Reference in New Issue
Block a user