diff options
Diffstat (limited to 'qmake/generators/win32')
-rw-r--r-- | qmake/generators/win32/cesdkhandler.cpp | 10 | ||||
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 12 | ||||
-rw-r--r-- | qmake/generators/win32/mingw_make.h | 1 | ||||
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 6 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 2 |
7 files changed, 26 insertions, 13 deletions
diff --git a/qmake/generators/win32/cesdkhandler.cpp b/qmake/generators/win32/cesdkhandler.cpp index 73dc1ee68d..4f166d727d 100644 --- a/qmake/generators/win32/cesdkhandler.cpp +++ b/qmake/generators/win32/cesdkhandler.cpp @@ -58,8 +58,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"))); } }; @@ -136,7 +136,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); @@ -175,7 +175,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"))) @@ -274,7 +274,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+ diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index 7e4e439738..3f150b5726 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -107,6 +107,18 @@ bool MingwMakefileGenerator::writeMakefile(QTextStream &t) return false; } +QString MingwMakefileGenerator::installRoot() const +{ + /* + We include a magic prefix on the path to bypass mingw-make's "helpful" + intervention in the environment, recognising variables that look like + paths and adding the msys system root as prefix, which we don't want. + Once this hack has smuggled INSTALL_ROOT into make's variable space, we + can trivially strip the magic prefix back off to get the path we meant. + */ + return QStringLiteral("$(INSTALL_ROOT:@msyshack@%=%)"); +} + void createLdObjectScriptFile(const QString &fileName, const ProStringList &objList) { QString filePath = Option::output_dir + QDir::separator() + fileName; diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h index 99bcfe8411..ab9e5a9961 100644 --- a/qmake/generators/win32/mingw_make.h +++ b/qmake/generators/win32/mingw_make.h @@ -45,6 +45,7 @@ protected: virtual QString getManifestFileForRcFile() const; bool writeMakefile(QTextStream &); void init(); + virtual QString installRoot() const; private: void writeMingwParts(QTextStream &); void writeIncPart(QTextStream &t); diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index b47803a5f4..6ccd58e0de 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -603,8 +603,8 @@ void VCXProjectWriter::write(XmlOutput &xml, VCProject &tool) xml.setIndentString(" "); - const QString toolsVersion = (tool.SdkVersion == QStringLiteral("10.0")) ? QStringLiteral("14.0") - : QStringLiteral("4.0"); + const QString toolsVersion = (tool.SdkVersion == QLatin1String("10.0")) ? QStringLiteral("14.0") + : QStringLiteral("4.0"); xml << decl("1.0", "utf-8") << tag("Project") diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index 03f22278df..91b184b55f 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -105,10 +105,10 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t) QString arch = project->first("VCPROJ_ARCH").toQString().toLower(); QString compiler; QString compilerArch; - if (arch == QStringLiteral("arm")) { + if (arch == QLatin1String("arm")) { compiler = QStringLiteral("x86_arm"); compilerArch = QStringLiteral("arm"); - } else if (arch == QStringLiteral("x64")) { + } else if (arch == QLatin1String("x64")) { const ProStringList hostArch = project->values("QMAKE_TARGET.arch"); if (hostArch.contains("x86_64")) compiler = QStringLiteral("amd64"); @@ -263,7 +263,7 @@ QString NmakeMakefileGenerator::defaultInstall(const QString &t) QString ret = Win32MakefileGenerator::defaultInstall(t); - const QString root = "$(INSTALL_ROOT)"; + const QString root = installRoot(); ProStringList &uninst = project->values(ProKey(t + ".uninstall")); QString targetdir = fileFixify(project->first(ProKey(t + ".path")).toQString(), FileFixifyAbsolute); if(targetdir.right(1) != Option::dir_sep) diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 8da32b87f8..1543e826a7 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1194,7 +1194,7 @@ void VcprojGenerator::initResourceTool() foreach (const ProString &path, project->values("RC_INCLUDEPATH")) { QString fixedPath = fileFixify(path.toQString()); if (fileInfo(fixedPath).isRelative()) { - if (fixedPath == QStringLiteral(".")) + if (fixedPath == QLatin1String(".")) fixedPath = QStringLiteral("$(ProjectDir)"); else fixedPath.prepend(QStringLiteral("$(ProjectDir)\\")); @@ -1329,7 +1329,7 @@ void VcprojGenerator::initDeploymentTool() if (!vcInstallDir.isEmpty()) { vcInstallDir += "\\ce\\dll\\"; vcInstallDir += project->values("CE_ARCH").join(QLatin1Char(' ')); - if (!QFileInfo(vcInstallDir + QDir::separator() + runtimeVersion).exists()) + if (!QFileInfo::exists(vcInstallDir + QDir::separator() + runtimeVersion)) runtime.clear(); else runtime = vcInstallDir; diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 8e8c1fc5f8..5eb5360ff3 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -684,7 +684,7 @@ QString Win32MakefileGenerator::defaultInstall(const QString &t) project->first("TEMPLATE") == "subdirs" || project->first("TEMPLATE") == "aux") return QString(); - const QString root = "$(INSTALL_ROOT)"; + const QString root = installRoot(); ProStringList &uninst = project->values(ProKey(t + ".uninstall")); QString ret; QString targetdir = fileFixify(project->first(ProKey(t + ".path")).toQString(), FileFixifyAbsolute); |