From f384c3097911c523e67620b77b1086e4788cd209 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Tue, 19 Jan 2016 10:55:32 +0300 Subject: QMake: replace QStringLiteral with QLatin1String ... in string comparisons. It's more efficient. Change-Id: I5d54ab7777a0838455eaaac671e735eb37bfe243 Reviewed-by: Oswald Buddenhagen --- qmake/generators/win32/cesdkhandler.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'qmake/generators/win32/cesdkhandler.cpp') diff --git a/qmake/generators/win32/cesdkhandler.cpp b/qmake/generators/win32/cesdkhandler.cpp index f8235bae27..4550cc8aed 100644 --- a/qmake/generators/win32/cesdkhandler.cpp +++ b/qmake/generators/win32/cesdkhandler.cpp @@ -63,8 +63,8 @@ struct ContainsPathKey { bool operator()(const QString &val) const { - return !(val.endsWith(QStringLiteral("MSBuildToolsPath")) - || val.endsWith(QStringLiteral("MSBuildToolsRoot"))); + return !(val.endsWith(QLatin1String("MSBuildToolsPath")) + || val.endsWith(QLatin1String("MSBuildToolsRoot"))); } }; @@ -141,7 +141,7 @@ bool CeSdkHandler::parseMsBuildFile(QFile *file, CeSdkInfo *info) if (success) { const QString startPattern = QStringLiteral("$(Registry:"); const int startIndex = sdkRootPath.indexOf(startPattern); - const int endIndex = sdkRootPath.lastIndexOf(QStringLiteral(")")); + const int endIndex = sdkRootPath.lastIndexOf(QLatin1Char(')')); const QString regString = sdkRootPath.mid(startIndex + startPattern.size(), endIndex - startIndex - startPattern.size()); QSettings sdkRootPathRegistry(regString, QSettings::NativeFormat); @@ -180,7 +180,7 @@ QStringList CeSdkHandler::filterMsBuildToolPaths(const QStringList &paths) const QStringList result; foreach (const QString &path, paths) { QDir dirVC110(path); - if (path.endsWith(QStringLiteral("bin"))) + if (path.endsWith(QLatin1String("bin"))) dirVC110.cdUp(); QDir dirVC120 = dirVC110; if (dirVC110.cd(QStringLiteral("Microsoft.Cpp\\v4.0\\V110\\Platforms"))) @@ -279,7 +279,7 @@ void CeSdkHandler::retrieveWEC2013SDKs() if (cpuInfo.properties.isEmpty()) continue; const PropertyContainer &cpuInfoVal = cpuInfo.properties.first().properties.value(QLatin1String("CpuName")); - if (cpuInfoVal.name != QStringLiteral("CpuName")) + if (cpuInfoVal.name != QLatin1String("CpuName")) continue; const QString SDKName = QStringLiteral("SDK name"); currentSdk.m_name = currentProperty.properties.value(SDKName).value+ -- cgit v1.2.3