From 2788fccd29fba84bca7581778f5bc683736f1d0e Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Wed, 6 Jul 2016 11:32:54 +0300 Subject: Use QStringLiteral more judiciously Replace it with QL1S in QStringBuilder expressions and in overloaded functions. Replace patterns 'QString::number() + QStringLiteral' and 'QStringLiteral + QString::number()' with QString::asprintf. Saves some text size. Change-Id: Ib39b2332264dfc3df04e77f2c101b47a1030cef4 Reviewed-by: Edward Welbourne Reviewed-by: Thiago Macieira --- src/plugins/platforms/windows/qwindowsservices.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/plugins/platforms/windows/qwindowsservices.cpp') diff --git a/src/plugins/platforms/windows/qwindowsservices.cpp b/src/plugins/platforms/windows/qwindowsservices.cpp index 3c99e3507e..1fee56aeca 100644 --- a/src/plugins/platforms/windows/qwindowsservices.cpp +++ b/src/plugins/platforms/windows/qwindowsservices.cpp @@ -94,9 +94,8 @@ static inline QString mailCommand() keyName = QString::fromWCharArray(command); RegCloseKey(handle); } - if (keyName.isEmpty()) - keyName = QStringLiteral("mailto"); - keyName += QStringLiteral("\\Shell\\Open\\Command"); + const QLatin1String mailto = keyName.isEmpty() ? QLatin1String("mailto") : QLatin1String(); + keyName += mailto + QLatin1String("\\Shell\\Open\\Command"); if (debug) qDebug() << __FUNCTION__ << "keyName=" << keyName; command[0] = 0; @@ -134,7 +133,7 @@ static inline bool launchMail(const QUrl &url) } // Pass the url as the parameter. Should use QProcess::startDetached(), // but that cannot handle a Windows command line [yet]. - command.replace(QStringLiteral("%1"), url.toString(QUrl::FullyEncoded)); + command.replace(QLatin1String("%1"), url.toString(QUrl::FullyEncoded)); if (debug) qDebug() << __FUNCTION__ << "Launching" << command; //start the process -- cgit v1.2.3