summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-01-26 14:35:50 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2016-01-26 16:27:28 +0100
commita15c3d086dafea83e4760f0b447be43d26b80697 (patch)
treefd224a3f83942ff4c432e1e3a3f8583d14d6a11c /qmake/generators
parent87abfd351af6309691d921ca0aef077d74df4732 (diff)
parent397061a6a92db9f962360d5db96f69b315f93074 (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/dbus/qdbusconnection_p.h src/dbus/qdbusintegrator.cpp src/dbus/qdbusintegrator_p.h tests/auto/corelib/io/qdir/qdir.pro tests/auto/corelib/io/qiodevice/tst_qiodevice.cpp Change-Id: I3d3fd07aed015c74b1f545f1327aa73d5f365fcc
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/mac/pbuilder_pbx.cpp6
-rw-r--r--qmake/generators/makefile.cpp2
-rw-r--r--qmake/generators/makefile.h4
-rw-r--r--qmake/generators/unix/unixmake.cpp16
-rw-r--r--qmake/generators/unix/unixmake.h3
-rw-r--r--qmake/generators/win32/cesdkhandler.cpp10
-rw-r--r--qmake/generators/win32/mingw_make.cpp12
-rw-r--r--qmake/generators/win32/mingw_make.h1
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp4
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp6
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp4
-rw-r--r--qmake/generators/win32/winmakefile.cpp2
12 files changed, 52 insertions, 18 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index b49cee5df6..a14b63c10c 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -493,11 +493,11 @@ static QString xcodeFiletypeForFilename(const QString &filename)
return QStringLiteral("sourcecode.cpp.objcpp");
if (filename.endsWith(Option::objc_ext))
return QStringLiteral("sourcecode.c.objc");
- if (filename.endsWith(QStringLiteral(".framework")))
+ if (filename.endsWith(QLatin1String(".framework")))
return QStringLiteral("wrapper.framework");
- if (filename.endsWith(QStringLiteral(".a")))
+ if (filename.endsWith(QLatin1String(".a")))
return QStringLiteral("archive.ar");
- if (filename.endsWith(QStringLiteral(".pro")) || filename.endsWith(QStringLiteral(".qrc")))
+ if (filename.endsWith(QLatin1String(".pro")) || filename.endsWith(QLatin1String(".qrc")))
return QStringLiteral("text");
return QString();
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index d94d4446cb..4396ad05e3 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1209,7 +1209,7 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
}
bool do_default = true;
- const QString root = "$(INSTALL_ROOT)";
+ const QString root = installRoot();
QString dst;
if (installConfigValues.indexOf("no_path") == -1 &&
installConfigValues.indexOf("dummy_install") == -1) {
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index 3517e4f2d4..41b90eb500 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -187,6 +187,7 @@ protected:
//for installs
virtual QString defaultInstall(const QString &);
+ virtual QString installRoot() const;
//for prl
QString prlFileName(bool fixify=true);
@@ -272,6 +273,9 @@ inline bool MakefileGenerator::noIO() const
inline QString MakefileGenerator::defaultInstall(const QString &)
{ return QString(""); }
+inline QString MakefileGenerator::installRoot() const
+{ return QStringLiteral("$(INSTALL_ROOT)"); }
+
inline bool MakefileGenerator::findLibraries(bool, bool)
{ return true; }
diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp
index 0312c5dab6..f7131f61c3 100644
--- a/qmake/generators/unix/unixmake.cpp
+++ b/qmake/generators/unix/unixmake.cpp
@@ -509,6 +509,20 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
return false;
}
+#ifdef Q_OS_WIN // MinGW x-compiling for QNX
+QString UnixMakefileGenerator::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@%=%)");
+}
+#endif
+
QString
UnixMakefileGenerator::defaultInstall(const QString &t)
{
@@ -517,7 +531,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
enum { NoBundle, SolidBundle, SlicedBundle } bundle = NoBundle;
bool isAux = (project->first("TEMPLATE") == "aux");
- const QString root = "$(INSTALL_ROOT)";
+ const QString root = installRoot();
ProStringList &uninst = project->values(ProKey(t + ".uninstall"));
QString ret, destdir = project->first("DESTDIR").toQString();
if(!destdir.isEmpty() && destdir.right(1) != Option::dir_sep)
diff --git a/qmake/generators/unix/unixmake.h b/qmake/generators/unix/unixmake.h
index fa6c8a5111..da5cdb320c 100644
--- a/qmake/generators/unix/unixmake.h
+++ b/qmake/generators/unix/unixmake.h
@@ -47,6 +47,9 @@ public:
protected:
virtual bool doPrecompiledHeaders() const { return project->isActiveConfig("precompile_header"); }
virtual bool doDepends() const { return !Option::mkfile::do_stub_makefile && MakefileGenerator::doDepends(); }
+#ifdef Q_OS_WIN // MinGW x-compiling for QNX
+ virtual QString installRoot() const;
+#endif
virtual QString defaultInstall(const QString &);
virtual ProString fixLibFlag(const ProString &lib);
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);