diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-04-11 14:36:55 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-04-11 14:36:55 +0200 |
commit | 98d3e40fb7c88b670a93e73dace2d0f05a5f903c (patch) | |
tree | b1292124a86c219fb434db4ec28e8f805ff52287 /qmake | |
parent | a74e4b85be83e2da47f4a1d8fcf0e78079335b80 (diff) | |
parent | bab494e4d046f5617d19f5fec35eeff94377c51f (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
mkspecs/qnx-armv7le-qcc/qplatformdefs.h
src/printsupport/kernel/qcups.cpp
src/widgets/styles/qstyle.h
tests/auto/widgets/itemviews/qlistwidget/tst_qlistwidget.cpp
Change-Id: Ia41e13051169a6d4a8a1267548e7d47b859bb267
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/doc/src/qmake-manual.qdoc | 7 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake.cpp | 5 | ||||
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.cpp | 26 | ||||
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.h | 1 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_objectmodel.h | 1 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.cpp | 35 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_vcproj.h | 1 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 2 | ||||
-rw-r--r-- | qmake/library/qmakebuiltins.cpp | 6 |
9 files changed, 47 insertions, 37 deletions
diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index c1739982dc..91629ec9dd 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -1696,11 +1696,10 @@ If the OpenGL implementation uses EGL (most OpenGL/ES systems), then QMAKE_INCDIR_EGL may also need to be set. - \section1 QMAKE_INCDIR_OPENGL_ES1, QMAKE_INCDIR_OPENGL_ES2 + \section1 QMAKE_INCDIR_OPENGL_ES2 - These variables specify the location of OpenGL headers files to be added - to \l{INCLUDEPATH} when building a target with OpenGL ES 1 - or OpenGL ES 2 support respectively. + This variable specifies the location of OpenGL header files to be added + to \l{INCLUDEPATH} when building a target with OpenGL ES 2 support. The value of this variable is typically handled by qmake or \l{#QMAKESPEC}{qmake.conf} and rarely diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index cadd5cf316..4c3df4efe8 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -210,7 +210,7 @@ UnixMakefileGenerator::init() // replace place holders pchFlags = pchFlags.replace("${QMAKE_PCH_INPUT}", - fileFixify(project->first("PRECOMPILED_HEADER").toQString())); + project->first("PRECOMPILED_HEADER").toQString()); pchFlags = pchFlags.replace("${QMAKE_PCH_OUTPUT_BASE}", pchBaseName); if (project->isActiveConfig("icc_pch_style")) { // icc style @@ -921,7 +921,8 @@ UnixMakefileGenerator::escapeFilePath(const QString &path) const { QString ret = path; if(!ret.isEmpty()) { - ret = unescapeFilePath(ret).replace(QLatin1Char(' '), QLatin1String("\\ ")); + ret = unescapeFilePath(ret).replace(QLatin1Char(' '), QLatin1String("\\ ")) + .replace(QLatin1Char('\t'), QLatin1String("\\\t")); debug_msg(2, "EscapeFilePath: %s -> %s", path.toLatin1().constData(), ret.toLatin1().constData()); } return ret; diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 51cb73f0ce..feef587ee6 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -1779,8 +1779,7 @@ void VCXProjectWriter::write(XmlOutput &xml, const VCConfiguration &tool) xml << tag("PropertyGroup") << attrTag("Condition", generateCondition(tool)) << attrTag("Label", "Configuration") - << attrTagS(_PlatformToolSet, platformToolSetVersion(tool.CompilerVersion, - tool.WinPhone)) + << attrTagS(_PlatformToolSet, tool.PlatformToolSet) << attrTagS(_OutputDirectory, tool.OutputDirectory) << attrTagT(_ATLMinimizesCRunTimeLibraryUsage, tool.ATLMinimizesCRunTimeLibraryUsage) << attrTagT(_BuildBrowserInformation, tool.BuildBrowserInformation) @@ -2193,27 +2192,4 @@ QString VCXProjectWriter::generateCondition(const VCConfiguration &config) return QStringLiteral("'$(Configuration)|$(Platform)'=='") + config.Name + QLatin1Char('\''); } -QString VCXProjectWriter::platformToolSetVersion(const DotNET version, bool winphoneBuild) -{ - // The PlatformToolset string corresponds to the name of a directory in - // $(VCTargetsPath)\Platforms\{Win32,x64,...}\PlatformToolsets - // e.g. v90, v100, v110, v110_xp, v120_CTP_Nov, v120, or WindowsSDK7.1 - - // This environment variable may be set by a commandline build - // environment such as the Windows SDK command prompt - QByteArray envVar = qgetenv("PlatformToolset"); - if (!envVar.isEmpty()) - return envVar; - - switch (version) - { - case NET2012: - return winphoneBuild ? "v110_wp80" : "v110"; - case NET2013: - return "v120"; - default: - return QString(); - } -} - QT_END_NAMESPACE diff --git a/qmake/generators/win32/msbuild_objectmodel.h b/qmake/generators/win32/msbuild_objectmodel.h index 2f02e66eb9..8ccb4b8859 100644 --- a/qmake/generators/win32/msbuild_objectmodel.h +++ b/qmake/generators/win32/msbuild_objectmodel.h @@ -184,7 +184,6 @@ private: static void outputFileConfigs(VCProject &project, XmlOutput &xml, XmlOutput &xmlFilter, const VCFilterFile &info, const QString &filtername); static bool outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filename, const QString &filtername, bool fileAllreadyAdded); static QString generateCondition(const VCConfiguration &config); - static QString platformToolSetVersion(const DotNET version, bool winphoneBuild); friend class XTreeNode; friend class XFlatNode; diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index 0aa5736d2a..ac96d55de1 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -901,6 +901,7 @@ public: QString OutputDirectory; QString PrimaryOutput; QString ProgramDatabase; + QString PlatformToolSet; triState RegisterOutput; useOfATL UseOfATL; useOfMfc UseOfMfc; diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index ce9dc6d9ec..ac258e2841 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -384,6 +384,35 @@ QUuid VcprojGenerator::increaseUUID(const QUuid &id) return result; } +QString VcprojGenerator::retrievePlatformToolSet() const +{ + // The PlatformToolset string corresponds to the name of a directory in + // $(VCTargetsPath)\Platforms\{Win32,x64,...}\PlatformToolsets + // e.g. v90, v100, v110, v110_xp, v120_CTP_Nov, v120, or WindowsSDK7.1 + + // This environment variable may be set by a commandline build + // environment such as the Windows SDK command prompt + QByteArray envVar = qgetenv("PlatformToolset"); + if (!envVar.isEmpty()) + return envVar; + + QString suffix; + if (vcProject.Configuration.WinPhone) + suffix = "_wp80"; + else if (project->first("QMAKE_TARGET_OS") == "xp") + suffix = "_xp"; + + switch (vcProject.Configuration.CompilerVersion) + { + case NET2012: + return QStringLiteral("v110") + suffix; + case NET2013: + return QStringLiteral("v120") + suffix; + default: + return QString(); + } +} + ProStringList VcprojGenerator::collectDependencies(QMakeProject *proj, QHash<QString, QString> &projLookup, QHash<QString, QString> &projGuids, QHash<VcsolutionDepend *, QStringList> &extraSubdirs, @@ -969,10 +998,14 @@ void VcprojGenerator::initConfiguration() if (!conf.OutputDirectory.endsWith("\\")) conf.OutputDirectory += '\\'; if (conf.CompilerVersion >= NET2010) { + conf.PlatformToolSet = retrievePlatformToolSet(); + // The target name could have been changed. conf.PrimaryOutput = project->first("TARGET").toQString(); - if ( !conf.PrimaryOutput.isEmpty() && !project->first("TARGET_VERSION_EXT").isEmpty() && project->isActiveConfig("shared")) + if (!conf.PrimaryOutput.isEmpty() && project->first("TEMPLATE") == "vclib" + && project->isActiveConfig("shared")) { conf.PrimaryOutput.append(project->first("TARGET_VERSION_EXT").toQString()); + } } if (conf.CompilerVersion >= NET2012) { diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h index 4a25d11766..7dcd9f72df 100644 --- a/qmake/generators/win32/msvc_vcproj.h +++ b/qmake/generators/win32/msvc_vcproj.h @@ -144,6 +144,7 @@ private: QHash<QString, ProStringList> &subdirProjectLookup, const ProStringList &allDependencies = ProStringList()); QUuid increaseUUID(const QUuid &id); + QString retrievePlatformToolSet() const; friend class VCFilter; }; diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 484062d56e..da81b85e2a 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -883,7 +883,7 @@ QString Win32MakefileGenerator::escapeFilePath(const QString &path) const QString ret = path; if(!ret.isEmpty()) { ret = unescapeFilePath(ret); - if(ret.contains(" ")) + if (ret.contains(' ') || ret.contains('\t')) ret = "\"" + ret + "\""; debug_msg(2, "EscapeFilePath: %s -> %s", path.toLatin1().constData(), ret.toLatin1().constData()); } diff --git a/qmake/library/qmakebuiltins.cpp b/qmake/library/qmakebuiltins.cpp index 36f808197a..5ae99bab92 100644 --- a/qmake/library/qmakebuiltins.cpp +++ b/qmake/library/qmakebuiltins.cpp @@ -1277,9 +1277,9 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( return ReturnFalse; } int cnt = values(map(args.at(0))).count(); + int val = args.at(1).toQString(m_tmp1).toInt(); if (args.count() == 3) { const ProString &comp = args.at(2); - const int val = args.at(1).toQString(m_tmp1).toInt(); if (comp == QLatin1String(">") || comp == QLatin1String("greaterThan")) { return returnBool(cnt > val); } else if (comp == QLatin1String(">=")) { @@ -1290,13 +1290,13 @@ QMakeEvaluator::VisitReturn QMakeEvaluator::evaluateBuiltinConditional( return returnBool(cnt <= val); } else if (comp == QLatin1String("equals") || comp == QLatin1String("isEqual") || comp == QLatin1String("=") || comp == QLatin1String("==")) { - return returnBool(cnt == val); + // fallthrough } else { evalError(fL1S("Unexpected modifier to count(%2).").arg(comp.toQString(m_tmp1))); return ReturnFalse; } } - return returnBool(cnt == args.at(1).toQString(m_tmp1).toInt()); + return returnBool(cnt == val); } case T_GREATERTHAN: case T_LESSTHAN: { |