From a8aad121a2f8450c77d314542722a0b57e411c10 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 23 Sep 2014 16:01:15 +0200 Subject: remove unused member VCFilter::CustomBuild Change-Id: I2b57f0ac020ad1b85ffeb76a214b9cf2f48cb6d3 Reviewed-by: Oswald Buddenhagen --- qmake/generators/win32/msvc_objectmodel.h | 8 -------- qmake/generators/win32/msvc_vcproj.cpp | 8 -------- 2 files changed, 16 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index ed07b1cca4..521f7f2e4a 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -72,12 +72,6 @@ enum DotNET { forcing the tool to utilize default values. False/True values will be in the output... */ -enum customBuildCheck { - none, - mocSrc, - mocHdr, - lexyacc -}; enum triState { unset = -1, _False = 0, @@ -968,8 +962,6 @@ public: VCConfiguration* Config; QList Files; - customBuildCheck CustomBuild; - bool useCustomBuildTool; VCCustomBuildTool CustomBuildTool; diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp index 739b5cbb3c..24421c6c28 100644 --- a/qmake/generators/win32/msvc_vcproj.cpp +++ b/qmake/generators/win32/msvc_vcproj.cpp @@ -1346,7 +1346,6 @@ void VcprojGenerator::initDeploymentTool() if (conf.WinRT) { vcProject.DeploymentFiles.Project = this; vcProject.DeploymentFiles.Config = &(vcProject.Configuration); - vcProject.DeploymentFiles.CustomBuild = none; } } } @@ -1385,7 +1384,6 @@ void VcprojGenerator::initRootFiles() vcProject.RootFiles.Project = this; vcProject.RootFiles.Config = &(vcProject.Configuration); - vcProject.RootFiles.CustomBuild = none; } void VcprojGenerator::initSourceFiles() @@ -1398,7 +1396,6 @@ void VcprojGenerator::initSourceFiles() vcProject.SourceFiles.Project = this; vcProject.SourceFiles.Config = &(vcProject.Configuration); - vcProject.SourceFiles.CustomBuild = none; } void VcprojGenerator::initHeaderFiles() @@ -1450,7 +1447,6 @@ void VcprojGenerator::initLexYaccFiles() vcProject.LexYaccFiles.Project = this; vcProject.LexYaccFiles.Config = &(vcProject.Configuration); - vcProject.LexYaccFiles.CustomBuild = lexyacc; } void VcprojGenerator::initTranslationFiles() @@ -1464,7 +1460,6 @@ void VcprojGenerator::initTranslationFiles() vcProject.TranslationFiles.Project = this; vcProject.TranslationFiles.Config = &(vcProject.Configuration); - vcProject.TranslationFiles.CustomBuild = none; } void VcprojGenerator::initFormFiles() @@ -1476,7 +1471,6 @@ void VcprojGenerator::initFormFiles() vcProject.FormFiles.addFiles(project->values("FORMS")); vcProject.FormFiles.Project = this; vcProject.FormFiles.Config = &(vcProject.Configuration); - vcProject.FormFiles.CustomBuild = none; } void VcprojGenerator::initResourceFiles() @@ -1526,7 +1520,6 @@ void VcprojGenerator::initResourceFiles() vcProject.ResourceFiles.Project = this; vcProject.ResourceFiles.Config = &(vcProject.Configuration); - vcProject.ResourceFiles.CustomBuild = none; } void VcprojGenerator::initExtraCompilerOutputs() @@ -1603,7 +1596,6 @@ void VcprojGenerator::initExtraCompilerOutputs() } extraCompile.Project = this; extraCompile.Config = &(vcProject.Configuration); - extraCompile.CustomBuild = none; vcProject.ExtraCompilersFiles.append(extraCompile); } -- cgit v1.2.3 From 55027c23df76444a128411cfb3ef011f65b40a64 Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 23 Sep 2014 18:44:02 +0200 Subject: introduce VCFilter::findFile Move common code into a function and exit early from simple search loop. Change-Id: I88d1227653e28badc213fbe4ebe1e2a19f6e5793 Reviewed-by: Oswald Buddenhagen --- qmake/generators/win32/msbuild_objectmodel.cpp | 10 ++-------- qmake/generators/win32/msvc_objectmodel.cpp | 23 +++++++++++++++-------- qmake/generators/win32/msvc_objectmodel.h | 1 + 3 files changed, 18 insertions(+), 16 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 6311128d70..035da5059f 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -1872,14 +1872,8 @@ bool VCXProjectWriter::outputFileConfig(VCFilter filter, XmlOutput &xml, XmlOutp filter.CompilerTool = VCCLCompilerTool(); filter.CompilerTool.config = filter.Config; - bool inBuild = false; - VCFilterFile info; - for (int i = 0; i < filter.Files.count(); ++i) { - if (filter.Files.at(i).file == filename) { - info = filter.Files.at(i); - inBuild = true; - } - } + bool inBuild; + VCFilterFile info = filter.findFile(filename, &inBuild); inBuild &= !info.excludeFromBuild; if (inBuild) { diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 75134d9182..f174b654d7 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -2241,6 +2241,19 @@ void VCFilter::modifyPCHstage(QString str) CompilerTool.ForcedIncludeFiles = QStringList("$(NOINHERIT)"); } +VCFilterFile VCFilter::findFile(const QString &filePath, bool *found) const +{ + for (int i = 0; i < Files.count(); ++i) { + const VCFilterFile &f = Files.at(i); + if (f.file == filePath) { + *found = true; + return f; + } + } + *found = false; + return VCFilterFile(); +} + bool VCFilter::addExtraCompiler(const VCFilterFile &info) { const QStringList &extraCompilers = Project->extraCompilerSources.value(info.file); @@ -2974,14 +2987,8 @@ void VCProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, const Q filter.CompilerTool.WarningLevel = warningLevelUnknown; filter.CompilerTool.config = filter.Config; - bool inBuild = false; - VCFilterFile info; - for (int i = 0; i < filter.Files.count(); ++i) { - if (filter.Files.at(i).file == filename) { - info = filter.Files.at(i); - inBuild = true; - } - } + bool inBuild; + VCFilterFile info = filter.findFile(filename, &inBuild); inBuild &= !info.excludeFromBuild; if (inBuild) { diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h index 521f7f2e4a..850f5f0f57 100644 --- a/qmake/generators/win32/msvc_objectmodel.h +++ b/qmake/generators/win32/msvc_objectmodel.h @@ -952,6 +952,7 @@ public: void addFiles(const ProStringList& fileList); bool addExtraCompiler(const VCFilterFile &info); void modifyPCHstage(QString str); + VCFilterFile findFile(const QString &filePath, bool *found) const; // Variables QString Name; -- cgit v1.2.3 From 04d3a89e20d49a3b5015b071bfdedc81973b090c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 23 Sep 2014 18:44:12 +0200 Subject: vcxproj: fix custom build steps in different build variants There's a comment in VCXProjectWriter::outputFileConfigs that states: "We need to check if the file has any custom build step. If there is one then it has to be included with 'CustomBuild Include'". This patch adds the code to the comment... Task-number: QTBUG-30373 Change-Id: Ibfef3c80630e08c743bfadce299a8b6a0c58411f Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann --- qmake/generators/win32/msbuild_objectmodel.cpp | 66 +++++++++++++++----------- qmake/generators/win32/msbuild_objectmodel.h | 9 +++- 2 files changed, 47 insertions(+), 28 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 035da5059f..64a927fb77 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -1845,13 +1845,36 @@ void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, Xml { // We need to check if the file has any custom build step. // If there is one then it has to be included with "CustomBuild Include" - bool fileAdded = false; + bool hasCustomBuildStep = false; + QVarLengthArray data(project.SingleProjects.count()); + for (int i = 0; i < project.SingleProjects.count(); ++i) { + data[i].filter = project.SingleProjects.at(i).filterByName(filtername); + if (!data[i].filter.Config) // only if the filter is not empty + continue; + VCFilter &filter = data[i].filter; + + // Clearing each filter tool + filter.useCustomBuildTool = false; + filter.useCompilerTool = false; + filter.CustomBuildTool = VCCustomBuildTool(); + filter.CustomBuildTool.config = filter.Config; + filter.CompilerTool = VCCLCompilerTool(); + filter.CompilerTool.config = filter.Config; + + VCFilterFile fileInFilter = filter.findFile(info.file, &data[i].inBuild); + data[i].inBuild &= !fileInFilter.excludeFromBuild; + if (data[i].inBuild && filter.addExtraCompiler(fileInFilter)) + hasCustomBuildStep = true; + } + bool fileAdded = false; for (int i = 0; i < project.SingleProjects.count(); ++i) { const VCFilter &filter = project.SingleProjects.at(i).filterByName(filtername); - if (filter.Config) // only if the filter is not empty - if (outputFileConfig(filter, xml, xmlFilter, info.file, fileAdded)) // only add it once. - fileAdded = true; + if (!filter.Config) // only if the filter is not empty + continue; + if (outputFileConfig(&data[i], xml, xmlFilter, info.file, fileAdded, + hasCustomBuildStep)) + fileAdded = true; } if ( !fileAdded ) @@ -1861,36 +1884,25 @@ void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, Xml xmlFilter << closetag(); } -bool VCXProjectWriter::outputFileConfig(VCFilter filter, XmlOutput &xml, XmlOutput &xmlFilter, - const QString &filename, bool fileAdded) +bool VCXProjectWriter::outputFileConfig(OutputFilterData *d, XmlOutput &xml, XmlOutput &xmlFilter, + const QString &filename, bool fileAdded, + bool hasCustomBuildStep) { - // Clearing each filter tool - filter.useCustomBuildTool = false; - filter.useCompilerTool = false; - filter.CustomBuildTool = VCCustomBuildTool(); - filter.CustomBuildTool.config = filter.Config; - filter.CompilerTool = VCCLCompilerTool(); - filter.CompilerTool.config = filter.Config; - - bool inBuild; - VCFilterFile info = filter.findFile(filename, &inBuild); - inBuild &= !info.excludeFromBuild; - - if (inBuild) { - filter.addExtraCompiler(info); + VCFilter &filter = d->filter; + if (d->inBuild) { if (filter.Project->usePCH) - filter.modifyPCHstage(info.file); + filter.modifyPCHstage(filename); } else { // Excluded files uses an empty compiler stage - if(info.excludeFromBuild) + if (d->info.excludeFromBuild) filter.useCompilerTool = true; } // Actual XML output ---------------------------------- - if (filter.useCustomBuildTool || filter.useCompilerTool - || !inBuild || filter.Name.startsWith("Deployment Files")) { + if (hasCustomBuildStep || filter.useCompilerTool + || !d->inBuild || filter.Name.startsWith("Deployment Files")) { - if (filter.useCustomBuildTool) + if (hasCustomBuildStep) { if (!fileAdded) { fileAdded = true; @@ -1919,13 +1931,13 @@ bool VCXProjectWriter::outputFileConfig(VCFilter filter, XmlOutput &xml, XmlOutp } const QString condition = generateCondition(*filter.Config); - if(!inBuild) { + if (!d->inBuild) { xml << tag("ExcludedFromBuild") << attrTag("Condition", condition) << valueTag("true"); } - if (filter.Name.startsWith("Deployment Files") && inBuild) { + if (filter.Name.startsWith("Deployment Files") && d->inBuild) { xml << tag("DeploymentContent") << attrTag("Condition", condition) << valueTag("true"); diff --git a/qmake/generators/win32/msbuild_objectmodel.h b/qmake/generators/win32/msbuild_objectmodel.h index c44897c96a..6ed82233a3 100644 --- a/qmake/generators/win32/msbuild_objectmodel.h +++ b/qmake/generators/win32/msbuild_objectmodel.h @@ -171,10 +171,17 @@ public: void write(XmlOutput &, VCFilter &); private: + struct OutputFilterData + { + VCFilter filter; + VCFilterFile info; + bool inBuild; + }; + static void addFilters(VCProject &project, XmlOutput &xmlFilter, const QString &filterName); static void outputFilter(VCProject &project, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filtername); 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, bool fileAdded); + static bool outputFileConfig(OutputFilterData *d, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filename, bool fileAdded, bool hasCustomBuildStep); static void outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter, const QString &fileName, const QString &filterName); static QString generateCondition(const VCConfiguration &config); -- cgit v1.2.3 From 54853c5f66288a82fc77e4e8c3e01a8565073436 Mon Sep 17 00:00:00 2001 From: Nico Vertriest Date: Thu, 11 Sep 2014 11:57:14 +0200 Subject: Doc: Use title case in section1 titles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Using Python script title-cased.py Task-number: QTBUG-41250 Change-Id: I00d3d7a0b30db7304a7904efd6d63abd9a7b493b Reviewed-by: Topi Reiniö --- qmake/doc/src/qmake-manual.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qmake') diff --git a/qmake/doc/src/qmake-manual.qdoc b/qmake/doc/src/qmake-manual.qdoc index dedb491959..cdac770c9d 100644 --- a/qmake/doc/src/qmake-manual.qdoc +++ b/qmake/doc/src/qmake-manual.qdoc @@ -4328,7 +4328,7 @@ This tutorial teaches you the basics of qmake. The other topics in this manual contain more detailed information about using qmake. - \section1 Starting off Simple + \section1 Starting Off Simple Let's assume that you have just finished a basic implementation of your application, and you have created the following files: -- cgit v1.2.3 From b56ff1f394b30d61f79c549903fa5b686d116868 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 25 Sep 2014 17:54:16 +0200 Subject: write 'all' target later MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit this allows us to extend its dependencies, which we will make use of later. Change-Id: I8809bdffb435455338e88e97049b10beeab0468a Reviewed-by: Morten Johan Sørvig --- qmake/generators/unix/unixmake2.cpp | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index cc375f5c46..2153b24c95 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -376,6 +376,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } } } + QString allDeps; if (!project->values("QMAKE_APP_FLAG").isEmpty() || project->first("TEMPLATE") == "aux") { QString destdir = project->first("DESTDIR").toQString(); if(!project->isEmpty("QMAKE_BUNDLE")) { @@ -436,8 +437,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) deps.prepend(incr_target_dir + " "); incr_deps = "$(OBJECTS)"; } - t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") << "$(TARGET)" - << endl << endl; //real target t << var("TARGET") << ": " << var("PRE_TARGETDEPS") << " " << incr_deps << " " << target_deps @@ -451,9 +450,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "\n\t" << var("QMAKE_POST_LINK"); t << endl << endl; } else { - t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") << "$(TARGET)" - << endl << endl; - t << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) " << target_deps << " " << var("POST_TARGETDEPS") << "\n\t"; if (project->first("TEMPLATE") != "aux") { @@ -467,6 +463,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } t << endl << endl; } + allDeps = " $(TARGET)"; } else if(!project->isActiveConfig("staticlib")) { QString destdir = unescapeFilePath(project->first("DESTDIR").toQString()), incr_deps; if(!project->isEmpty("QMAKE_BUNDLE")) { @@ -526,19 +523,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) incr_deps = "$(OBJECTS)"; } - t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") - << " " << destdir << "$(TARGET)\n\n"; - //real target t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS") << " " << incr_deps << " $(SUBLIBS) " << target_deps << " " << var("POST_TARGETDEPS"); } else { - t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") << " " << - destdir << "$(TARGET)\n\n"; t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) $(SUBLIBS) $(OBJCOMP) " << target_deps << " " << var("POST_TARGETDEPS"); } + allDeps = ' ' + destdir + "$(TARGET)"; if(!destdir.isEmpty()) t << "\n\t" << mkdir_p_asstring(destdir, false); if(!project->isEmpty("QMAKE_PRE_LINK")) @@ -641,9 +634,9 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } } else { QString destdir = project->first("DESTDIR").toQString(); - t << "all: " << escapeDependencyPath(deps) << " " << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")),""," "," ") << destdir << "$(TARGET) " - << varGlue("QMAKE_AR_SUBLIBS", destdir, " " + destdir, "") << "\n\n" - << "staticlib: " << destdir << "$(TARGET)\n\n"; + allDeps = ' ' + destdir + "$(TARGET)" + + varGlue("QMAKE_AR_SUBLIBS", ' ' + destdir, ' ' + destdir, ""); + t << "staticlib: " << destdir << "$(TARGET)\n\n"; if(project->isEmpty("QMAKE_AR_SUBLIBS")) { t << destdir << "$(TARGET): " << var("PRE_TARGETDEPS") << " $(OBJECTS) $(OBJCOMP) " << var("POST_TARGETDEPS") << "\n\t"; @@ -828,6 +821,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } } + t << endl << "all: " << escapeDependencyPath(deps) + << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")), " ", " ", "") + << allDeps << endl << endl; + ProString ddir; ProString packageName(project->first("QMAKE_ORIG_TARGET")); if(!project->isActiveConfig("no_dist_version")) -- cgit v1.2.3 From e9c1e3076c748149eed5296f999688db7a26488b Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 25 Sep 2014 15:28:53 +0200 Subject: make top-level symlinks in bundles point to Current, not the major version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Current already points to the major version, and the other symlinks are supposed to take advantage of that (so a hypothetical change of major versions requires just one symlink to be adjusted). https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html Task-number: QTBUG-32895 Change-Id: I3c3a38c72ba18de6e48b20f2662341672022a274 Reviewed-by: Morten Johan Sørvig --- qmake/generators/unix/unixmake2.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 2153b24c95..55a94bef90 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -794,7 +794,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) bundledFiles << link; t << link << ": \n\t" << mkdir_p_asstring(path) << "\n\t" - << "@$(SYMLINK) " << version << project->first(pkey) << " " << path << endl; + << "@$(SYMLINK) " << project->first(vkey) + "/Current/" << project->first(pkey) + << " " << path << endl; path += version; } path += project->first(pkey).toQString(); -- cgit v1.2.3 From 4849037851b210507df63eb4aed7e467c834be62 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 25 Sep 2014 16:46:15 +0200 Subject: nest bundle-related conditionals for clarity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I97f9d87cb5a114bf4764f13f0fd0d22e9b4da96f Reviewed-by: Morten Johan Sørvig --- qmake/generators/unix/unixmake2.cpp | 39 +++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 19 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 55a94bef90..77170c3e89 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -702,26 +702,27 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << "@$(QMAKE) -prl " << buildArgs() << " " << project->projectFile() << endl; } - if(!project->first("QMAKE_PKGINFO").isEmpty()) { - ProString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO")); - QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents"; - t << pkginfo << ": \n\t"; - if(!destdir.isEmpty()) + if (!project->isEmpty("QMAKE_BUNDLE")) { + if (!project->first("QMAKE_PKGINFO").isEmpty()) { + ProString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO")); + QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents"; + t << pkginfo << ": \n\t"; + if (!destdir.isEmpty()) + t << mkdir_p_asstring(destdir) << "\n\t"; + t << "@$(DEL_FILE) " << pkginfo << "\n\t" + << "@echo \"APPL" + << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") + ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) + << "\" >" << pkginfo << endl; + } + if (!project->first("QMAKE_BUNDLE_RESOURCE_FILE").isEmpty()) { + ProString resources = escapeFilePath(project->first("QMAKE_BUNDLE_RESOURCE_FILE")); + bundledFiles << resources; + QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources"; + t << resources << ": \n\t"; t << mkdir_p_asstring(destdir) << "\n\t"; - t << "@$(DEL_FILE) " << pkginfo << "\n\t" - << "@echo \"APPL" - << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) - << "\" >" << pkginfo << endl; - } - if(!project->first("QMAKE_BUNDLE_RESOURCE_FILE").isEmpty()) { - ProString resources = escapeFilePath(project->first("QMAKE_BUNDLE_RESOURCE_FILE")); - bundledFiles << resources; - QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources"; - t << resources << ": \n\t"; - t << mkdir_p_asstring(destdir) << "\n\t"; - t << "@touch " << resources << "\n\t\n"; - } - if(!project->isEmpty("QMAKE_BUNDLE")) { + t << "@touch " << resources << "\n\t\n"; + } //copy the plist QString info_plist = escapeFilePath(fileFixify(project->first("QMAKE_INFO_PLIST").toQString())), info_plist_out = escapeFilePath(project->first("QMAKE_INFO_PLIST_OUT").toQString()); -- cgit v1.2.3 From 59e8d430e9b8ff270246b64c1096f50151d32ec8 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 25 Sep 2014 16:48:44 +0200 Subject: centralize bundle_dir calculation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I353fb4eafc014bccdec71af42f8625b33488ae0d Reviewed-by: Morten Johan Sørvig --- qmake/generators/unix/unixmake2.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 77170c3e89..d900d28144 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -703,9 +703,10 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } if (!project->isEmpty("QMAKE_BUNDLE")) { + QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/"; if (!project->first("QMAKE_PKGINFO").isEmpty()) { ProString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO")); - QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents"; + QString destdir = bundle_dir + "Contents"; t << pkginfo << ": \n\t"; if (!destdir.isEmpty()) t << mkdir_p_asstring(destdir) << "\n\t"; @@ -718,7 +719,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if (!project->first("QMAKE_BUNDLE_RESOURCE_FILE").isEmpty()) { ProString resources = escapeFilePath(project->first("QMAKE_BUNDLE_RESOURCE_FILE")); bundledFiles << resources; - QString destdir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources"; + QString destdir = bundle_dir + "Contents/Resources"; t << resources << ": \n\t"; t << mkdir_p_asstring(destdir) << "\n\t"; t << "@touch " << resources << "\n\t\n"; @@ -760,7 +761,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << "" << info_plist << " >" << info_plist_out << endl; //copy the icon if(!project->isEmpty("ICON")) { - QString dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/Contents/Resources/"; + QString dir = bundle_dir + "Contents/Resources/"; const QString icon_path = escapeFilePath(dir + icon.section(Option::dir_sep, -1)); bundledFiles << icon_path; t << icon_path << ": " << icon << "\n\t" @@ -781,7 +782,6 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } //copy other data if(!project->isEmpty("QMAKE_BUNDLE_DATA")) { - QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/"; const ProStringList &bundle_data = project->values("QMAKE_BUNDLE_DATA"); for(int i = 0; i < bundle_data.count(); i++) { const ProStringList &files = project->values(ProKey(bundle_data[i] + ".files")); -- cgit v1.2.3 From 10bd8e2104331e26ead4d3e43a41f997693fd494 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Wed, 30 Oct 2013 16:20:35 +0100 Subject: Don't make Info.plist for debug framework bundles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We do so by setting a 'no_plist' config property. Can be overridden with 'force_debug_plist'. The debug version of Info.plist would overwrite the release version, and it also happens to contain invalid data. In particular, CFBundleExecutable would contain the _debug suffixed libname, which it shouldn't. See the entry about CFBundleExecutable on https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html Task-number: QTBUG-32894 Change-Id: Ideb018e4768a7c4e276e1b07d77937451f6db6a2 Reviewed-by: Morten Johan Sørvig --- qmake/generators/unix/unixmake2.cpp | 112 ++++++++++++++++++------------------ 1 file changed, 57 insertions(+), 55 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index d900d28144..50e0ec52a7 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -725,61 +725,63 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) t << "@touch " << resources << "\n\t\n"; } //copy the plist - QString info_plist = escapeFilePath(fileFixify(project->first("QMAKE_INFO_PLIST").toQString())), - info_plist_out = escapeFilePath(project->first("QMAKE_INFO_PLIST_OUT").toQString()); - if (info_plist.isEmpty()) - info_plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE"); - bundledFiles << info_plist_out; - QString destdir = info_plist_out.section(Option::dir_sep, 0, -2); - t << info_plist_out << ": \n\t"; - if(!destdir.isEmpty()) - t << mkdir_p_asstring(destdir, false) << "\n\t"; - ProStringList commonSedArgs; - if (!project->values("VERSION").isEmpty()) - commonSedArgs << "-e \"s,@SHORT_VERSION@," << project->first("VER_MAJ") << "." << project->first("VER_MIN") << ",g\" "; - commonSedArgs << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? - QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "; - if(project->first("TEMPLATE") == "app") { - QString icon = fileFixify(var("ICON")); - QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString(); - if (bundlePrefix.isEmpty()) - bundlePrefix = "com.yourcompany"; - if (bundlePrefix.endsWith(".")) - bundlePrefix.chop(1); - QString bundleIdentifier = bundlePrefix + "." + var("QMAKE_BUNDLE"); - if (bundleIdentifier.endsWith(".app")) - bundleIdentifier.chop(4); - t << "@$(DEL_FILE) " << info_plist_out << "\n\t" - << "@sed "; - foreach (const ProString &arg, commonSedArgs) - t << arg; - t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" " - << "-e \"s,@BUNDLEIDENTIFIER@," << bundleIdentifier << ",g\" " - << "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" " - << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? - QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" " - << "" << info_plist << " >" << info_plist_out << endl; - //copy the icon - if(!project->isEmpty("ICON")) { - QString dir = bundle_dir + "Contents/Resources/"; - const QString icon_path = escapeFilePath(dir + icon.section(Option::dir_sep, -1)); - bundledFiles << icon_path; - t << icon_path << ": " << icon << "\n\t" - << mkdir_p_asstring(dir) << "\n\t" - << "@$(DEL_FILE) " << icon_path << "\n\t" - << "@$(COPY_FILE) " << escapeFilePath(icon) << " " << icon_path << endl; + if (!project->isActiveConfig("no_plist")) { + QString info_plist = escapeFilePath(fileFixify(project->first("QMAKE_INFO_PLIST").toQString())), + info_plist_out = escapeFilePath(project->first("QMAKE_INFO_PLIST_OUT").toQString()); + if (info_plist.isEmpty()) + info_plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE"); + bundledFiles << info_plist_out; + QString destdir = info_plist_out.section(Option::dir_sep, 0, -2); + t << info_plist_out << ": \n\t"; + if (!destdir.isEmpty()) + t << mkdir_p_asstring(destdir, false) << "\n\t"; + ProStringList commonSedArgs; + if (!project->values("VERSION").isEmpty()) + commonSedArgs << "-e \"s,@SHORT_VERSION@," << project->first("VER_MAJ") << "." << project->first("VER_MIN") << ",g\" "; + commonSedArgs << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? + QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "; + if (project->first("TEMPLATE") == "app") { + QString icon = fileFixify(var("ICON")); + QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString(); + if (bundlePrefix.isEmpty()) + bundlePrefix = "com.yourcompany"; + if (bundlePrefix.endsWith(".")) + bundlePrefix.chop(1); + QString bundleIdentifier = bundlePrefix + "." + var("QMAKE_BUNDLE"); + if (bundleIdentifier.endsWith(".app")) + bundleIdentifier.chop(4); + t << "@$(DEL_FILE) " << info_plist_out << "\n\t" + << "@sed "; + foreach (const ProString &arg, commonSedArgs) + t << arg; + t << "-e \"s,@ICON@," << icon.section(Option::dir_sep, -1) << ",g\" " + << "-e \"s,@BUNDLEIDENTIFIER@," << bundleIdentifier << ",g\" " + << "-e \"s,@EXECUTABLE@," << var("QMAKE_ORIG_TARGET") << ",g\" " + << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? + QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" " + << "" << info_plist << " >" << info_plist_out << endl; + //copy the icon + if (!project->isEmpty("ICON")) { + QString dir = bundle_dir + "Contents/Resources/"; + const QString icon_path = escapeFilePath(dir + icon.section(Option::dir_sep, -1)); + bundledFiles << icon_path; + t << icon_path << ": " << icon << "\n\t" + << mkdir_p_asstring(dir) << "\n\t" + << "@$(DEL_FILE) " << icon_path << "\n\t" + << "@$(COPY_FILE) " << escapeFilePath(icon) << " " << icon_path << endl; + } + } else { + t << "@$(DEL_FILE) " << info_plist_out << "\n\t" + << "@sed "; + foreach (const ProString &arg, commonSedArgs) + t << arg; + t << "-e \"s,@LIBRARY@," << var("QMAKE_ORIG_TARGET") << ",g\" " + << "-e \"s,@TYPEINFO@," + << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? + QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" " + << "" << info_plist << " >" << info_plist_out << endl; } - } else { - t << "@$(DEL_FILE) " << info_plist_out << "\n\t" - << "@sed "; - foreach (const ProString &arg, commonSedArgs) - t << arg; - t << "-e \"s,@LIBRARY@," << var("QMAKE_ORIG_TARGET") << ",g\" " - << "-e \"s,@TYPEINFO@," - << (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? - QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" " - << "" << info_plist << " >" << info_plist_out << endl; - } + } // project->isActiveConfig("no_plist") //copy other data if(!project->isEmpty("QMAKE_BUNDLE_DATA")) { const ProStringList &bundle_data = project->values("QMAKE_BUNDLE_DATA"); @@ -1267,7 +1269,7 @@ void UnixMakefileGenerator::init2() project->values("QMAKE_CXXFLAGS") += MD_flag; } - if(!project->isEmpty("QMAKE_BUNDLE")) { + if (!project->isEmpty("QMAKE_BUNDLE") && !project->isActiveConfig("no_plist")) { QString plist = fileFixify(project->first("QMAKE_INFO_PLIST").toQString(), qmake_getpwd()); if(plist.isEmpty()) plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE"); -- cgit v1.2.3 From d6444b2e56927f664635980ba0599cef43fa2d32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Mon, 22 Sep 2014 11:24:13 +0200 Subject: Add CFBundleVersion to the Info.plist files. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add @FULL_VERSION@ -> Qt version substitution to unixmake2. This makes the Qt-generated Info.plist files compliant with the bundle signing/validation process. Task-number: QTBUG-32896 Change-Id: I1818f028c2f740d699629dd78cc0fe6ffaf94a1c Reviewed-by: Jake Petroules Reviewed-by: Morten Johan Sørvig --- qmake/generators/unix/unixmake2.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 50e0ec52a7..d8700b3ba0 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -736,8 +736,13 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if (!destdir.isEmpty()) t << mkdir_p_asstring(destdir, false) << "\n\t"; ProStringList commonSedArgs; - if (!project->values("VERSION").isEmpty()) - commonSedArgs << "-e \"s,@SHORT_VERSION@," << project->first("VER_MAJ") << "." << project->first("VER_MIN") << ",g\" "; + if (!project->values("VERSION").isEmpty()) { + commonSedArgs << "-e \"s,@SHORT_VERSION@," << project->first("VER_MAJ") << "." + << project->first("VER_MIN") << ",g\" "; + commonSedArgs << "-e \"s,@FULL_VERSION@," << project->first("VER_MAJ") << "." + << project->first("VER_MIN") << "." + << project->first("VER_PAT") << ",g\" "; + } commonSedArgs << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "; if (project->first("TEMPLATE") == "app") { -- cgit v1.2.3 From 9fb663e57fa2859682d68928f79d5fadeb03a478 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 25 Sep 2014 19:06:21 +0200 Subject: fix omission of QMAKE_PKGINFO from sliced bundles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iff2c6686eae47e09fa6d046c60523aaf79aadfd5 Reviewed-by: Morten Johan Sørvig --- qmake/generators/unix/unixmake2.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index d8700b3ba0..3ea2961c92 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -706,6 +706,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/"; if (!project->first("QMAKE_PKGINFO").isEmpty()) { ProString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO")); + bundledFiles << pkginfo; QString destdir = bundle_dir + "Contents"; t << pkginfo << ": \n\t"; if (!destdir.isEmpty()) -- cgit v1.2.3 From 8c138054b31ab181c26f5b8135e307ed146d9ec6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 25 Sep 2014 19:10:19 +0200 Subject: redo bundle file dependency tracking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit instead of duplicating the plist/icon/bundled_files logic just to obtain the dependencies, create them as a side effect of the actual target creation. Change-Id: I6a0fe26c82c490b1040a7a06d5d0e7a4567ae1af Reviewed-by: Morten Johan Sørvig --- qmake/generators/unix/unixmake.cpp | 2 -- qmake/generators/unix/unixmake2.cpp | 57 +++++++++++-------------------------- 2 files changed, 16 insertions(+), 43 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 5ea47cc867..5b619a6fb4 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -310,8 +310,6 @@ UnixMakefileGenerator::init() } if(!bundle.isEmpty()) { project->values("QMAKE_BUNDLE") = ProStringList(bundle); - project->values("ALL_DEPS") += project->first("QMAKE_PKGINFO"); - project->values("ALL_DEPS") += project->first("QMAKE_BUNDLE_RESOURCE_FILE"); } else { project->values("QMAKE_BUNDLE").clear(); project->values("QMAKE_BUNDLE_LOCATION").clear(); diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 3ea2961c92..1f7d1ecf3e 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -703,10 +703,12 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } if (!project->isEmpty("QMAKE_BUNDLE")) { + ProStringList &alldeps = project->values("ALL_DEPS"); QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/"; if (!project->first("QMAKE_PKGINFO").isEmpty()) { ProString pkginfo = escapeFilePath(project->first("QMAKE_PKGINFO")); bundledFiles << pkginfo; + alldeps << pkginfo; QString destdir = bundle_dir + "Contents"; t << pkginfo << ": \n\t"; if (!destdir.isEmpty()) @@ -720,18 +722,25 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if (!project->first("QMAKE_BUNDLE_RESOURCE_FILE").isEmpty()) { ProString resources = escapeFilePath(project->first("QMAKE_BUNDLE_RESOURCE_FILE")); bundledFiles << resources; + alldeps << resources; QString destdir = bundle_dir + "Contents/Resources"; t << resources << ": \n\t"; t << mkdir_p_asstring(destdir) << "\n\t"; t << "@touch " << resources << "\n\t\n"; } //copy the plist - if (!project->isActiveConfig("no_plist")) { - QString info_plist = escapeFilePath(fileFixify(project->first("QMAKE_INFO_PLIST").toQString())), - info_plist_out = escapeFilePath(project->first("QMAKE_INFO_PLIST_OUT").toQString()); + while (!project->isActiveConfig("no_plist")) { // 'while' just to be able to 'break' + QString info_plist = escapeFilePath(fileFixify(project->first("QMAKE_INFO_PLIST").toQString())); if (info_plist.isEmpty()) info_plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE"); + if (!exists(Option::fixPathToLocalOS(info_plist))) { + warn_msg(WarnLogic, "Could not resolve Info.plist: '%s'. Check if QMAKE_INFO_PLIST points to a valid file.", + info_plist.toLatin1().constData()); + break; + } + QString info_plist_out = escapeFilePath(bundle_dir + "Contents/Info.plist"); bundledFiles << info_plist_out; + alldeps << info_plist_out; QString destdir = info_plist_out.section(Option::dir_sep, 0, -2); t << info_plist_out << ": \n\t"; if (!destdir.isEmpty()) @@ -771,6 +780,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) QString dir = bundle_dir + "Contents/Resources/"; const QString icon_path = escapeFilePath(dir + icon.section(Option::dir_sep, -1)); bundledFiles << icon_path; + alldeps << icon_path; t << icon_path << ": " << icon << "\n\t" << mkdir_p_asstring(dir) << "\n\t" << "@$(DEL_FILE) " << icon_path << "\n\t" @@ -787,6 +797,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" " << "" << info_plist << " >" << info_plist_out << endl; } + break; } // project->isActiveConfig("no_plist") //copy other data if(!project->isEmpty("QMAKE_BUNDLE_DATA")) { @@ -801,6 +812,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) project->first("QMAKE_FRAMEWORK_VERSION") + "/"; QString link = Option::fixPathToLocalOS(path + project->first(pkey)); bundledFiles << link; + alldeps << link; t << link << ": \n\t" << mkdir_p_asstring(path) << "\n\t" << "@$(SYMLINK) " << project->first(vkey) + "/Current/" << project->first(pkey) @@ -817,6 +829,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) src = escapeFilePath(src); const QString dst = escapeFilePath(path + Option::dir_sep + fileInfo(fn).fileName()); bundledFiles << dst; + alldeps << dst; t << dst << ": " << src << "\n\t" << mkdir_p_asstring(path) << "\n\t"; QFileInfo fi(fileInfo(fn)); @@ -1274,44 +1287,6 @@ void UnixMakefileGenerator::init2() project->values("QMAKE_CFLAGS") += MD_flag; project->values("QMAKE_CXXFLAGS") += MD_flag; } - - if (!project->isEmpty("QMAKE_BUNDLE") && !project->isActiveConfig("no_plist")) { - QString plist = fileFixify(project->first("QMAKE_INFO_PLIST").toQString(), qmake_getpwd()); - if(plist.isEmpty()) - plist = specdir() + QDir::separator() + "Info.plist." + project->first("TEMPLATE"); - if(exists(Option::fixPathToLocalOS(plist))) { - project->values("QMAKE_INFO_PLIST_OUT").append(project->first("DESTDIR") + - project->first("QMAKE_BUNDLE") + - "/Contents/Info.plist"); - project->values("ALL_DEPS") += project->first("QMAKE_INFO_PLIST_OUT"); - if(!project->isEmpty("ICON") && project->first("TEMPLATE") == "app") - project->values("ALL_DEPS") += project->first("DESTDIR") + - project->first("QMAKE_BUNDLE") + - "/Contents/Resources/" + project->first("ICON").toQString().section('/', -1); - if(!project->isEmpty("QMAKE_BUNDLE_DATA")) { - QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/"; - ProStringList &alldeps = project->values("ALL_DEPS"); - const ProStringList &bundle_data = project->values("QMAKE_BUNDLE_DATA"); - for(int i = 0; i < bundle_data.count(); i++) { - const ProStringList &files = project->values(ProKey(bundle_data[i] + ".files")); - QString path = bundle_dir; - const ProKey vkey(bundle_data[i] + ".version"); - const ProKey pkey(bundle_data[i] + ".path"); - if (!project->isEmpty(vkey)) { - alldeps += Option::fixPathToLocalOS(path + Option::dir_sep + project->first(pkey)); - path += project->first(vkey) + "/" + - project->first("QMAKE_FRAMEWORK_VERSION") + "/"; - } - path += project->first(pkey); - path = Option::fixPathToLocalOS(path); - for(int file = 0; file < files.count(); file++) - alldeps += path + Option::dir_sep + fileInfo(files[file].toQString()).fileName(); - } - } - } else { - warn_msg(WarnLogic, "Could not resolve Info.plist: '%s'. Check if QMAKE_INFO_PLIST points to a valid file.", plist.toLatin1().constData()); - } - } } QString -- cgit v1.2.3 From 6c6b5ff8fb8dfdc9f9057e4d9db5f467131a3a04 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 25 Sep 2014 17:14:40 +0200 Subject: de-duplicate top-level bundle symlink creation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit multiple QMAKE_BUNDLE_DATA entries can install into the same directory, but it obviously makes no sense to symlink that repeatedly. Change-Id: If65f7acdf4e158e33511917a027a380e642e2f28 Reviewed-by: Morten Johan Sørvig --- qmake/generators/unix/unixmake2.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 1f7d1ecf3e..556036b692 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -703,6 +703,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } if (!project->isEmpty("QMAKE_BUNDLE")) { + QHash symlinks; ProStringList &alldeps = project->values("ALL_DEPS"); QString bundle_dir = project->first("DESTDIR") + project->first("QMAKE_BUNDLE") + "/"; if (!project->first("QMAKE_PKGINFO").isEmpty()) { @@ -810,13 +811,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if (!project->isEmpty(vkey)) { QString version = project->first(vkey) + "/" + project->first("QMAKE_FRAMEWORK_VERSION") + "/"; - QString link = Option::fixPathToLocalOS(path + project->first(pkey)); - bundledFiles << link; - alldeps << link; - t << link << ": \n\t" - << mkdir_p_asstring(path) << "\n\t" - << "@$(SYMLINK) " << project->first(vkey) + "/Current/" << project->first(pkey) - << " " << path << endl; + symlinks[Option::fixPathToLocalOS(path + project->first(pkey))] = + project->first(vkey) + "/Current/" + project->first(pkey); path += version; } path += project->first(pkey).toQString(); @@ -842,6 +838,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } } } + QHash::ConstIterator symIt = symlinks.constBegin(), + symEnd = symlinks.constEnd(); + for (; symIt != symEnd; ++symIt) { + bundledFiles << symIt.key(); + alldeps << symIt.key(); + t << symIt.key() << ":\n\t" + << mkdir_p_asstring(bundle_dir) << "\n\t" + << "@$(SYMLINK) " << symIt.value() << " " << bundle_dir << endl; + } } t << endl << "all: " << escapeDependencyPath(deps) -- cgit v1.2.3 From 9cd9dfb0b1203c1c00356f5fdd7905888b6f7021 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 25 Sep 2014 19:15:27 +0200 Subject: don't try to create nested top-level bundle dir symlinks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit the target path may have multiple components, e.g. Headers/private. obviously, only the first component must be linked in such cases. Task-number: QTBUG-32895 Change-Id: If632b3b72c170a9fde36e62c165e06ded53deda3 Reviewed-by: Morten Johan Sørvig --- qmake/generators/unix/unixmake2.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 556036b692..27ffb9f40d 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -811,8 +811,12 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) if (!project->isEmpty(vkey)) { QString version = project->first(vkey) + "/" + project->first("QMAKE_FRAMEWORK_VERSION") + "/"; - symlinks[Option::fixPathToLocalOS(path + project->first(pkey))] = - project->first(vkey) + "/Current/" + project->first(pkey); + ProString name = project->first(pkey); + int pos = name.indexOf('/'); + if (pos > 0) + name = name.mid(0, pos); + symlinks[Option::fixPathToLocalOS(path + name)] = + project->first(vkey) + "/Current/" + name; path += version; } path += project->first(pkey).toQString(); -- cgit v1.2.3 From bd8c18cca5cd7f4c9901edb5f70752005b3fac9a Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 25 Sep 2014 20:32:18 +0200 Subject: fix Info.plist location in framework bundles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to Apple's documentation [1], framework bundles don't have a 'Contents' folder. Instead, each version folder gets a 'Resources' folder which contains the Info.plist file, and which is also symlinked at the top-level framework folder. [1]: https://developer.apple.com/library/mac/documentation/macosx/conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html Task-number: QTBUG-32895 Change-Id: I5e55cc097b179012add0ceb7c567dace8e282895 Reviewed-by: Morten Johan Sørvig --- qmake/generators/unix/unixmake2.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 27ffb9f40d..8bc5b00fd9 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -739,7 +739,11 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) info_plist.toLatin1().constData()); break; } - QString info_plist_out = escapeFilePath(bundle_dir + "Contents/Info.plist"); + bool isApp = (project->first("TEMPLATE") == "app"); + QString info_plist_out = escapeFilePath( + bundle_dir + (isApp ? "Contents/Info.plist" + : "Versions/" + project->first("QMAKE_FRAMEWORK_VERSION") + + "/Resources/Info.plist")); bundledFiles << info_plist_out; alldeps << info_plist_out; QString destdir = info_plist_out.section(Option::dir_sep, 0, -2); @@ -756,7 +760,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } commonSedArgs << "-e \"s,@TYPEINFO@,"<< (project->isEmpty("QMAKE_PKGINFO_TYPEINFO") ? QString::fromLatin1("????") : project->first("QMAKE_PKGINFO_TYPEINFO").left(4)) << ",g\" "; - if (project->first("TEMPLATE") == "app") { + if (isApp) { QString icon = fileFixify(var("ICON")); QString bundlePrefix = project->first("QMAKE_TARGET_BUNDLE_PREFIX").toQString(); if (bundlePrefix.isEmpty()) @@ -788,6 +792,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) << "@$(COPY_FILE) " << escapeFilePath(icon) << " " << icon_path << endl; } } else { + symlinks[bundle_dir + "Resources"] = "Versions/Current/Resources"; t << "@$(DEL_FILE) " << info_plist_out << "\n\t" << "@sed "; foreach (const ProString &arg, commonSedArgs) -- cgit v1.2.3 From 7f18406878764d56cbb5b681650b6911c439a280 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 29 Sep 2014 15:06:40 +0200 Subject: wrap ALL_DEPS somewhat sanely MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit otherwise we'll produce lines with tens of thousands columns when dealing with QMAKE_BUNDLE_DATA. Change-Id: Ia2a70f25e4ee1d3fe976027a7c46d234809a3f70 Reviewed-by: Morten Johan Sørvig --- qmake/generators/unix/unixmake2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qmake') diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index 8bc5b00fd9..eb8161a18b 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -859,7 +859,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) } t << endl << "all: " << escapeDependencyPath(deps) - << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")), " ", " ", "") + << valGlue(escapeDependencyPaths(project->values("ALL_DEPS")), " \\\n\t\t", " \\\n\t\t", "") << allDeps << endl << endl; ProString ddir; -- cgit v1.2.3 From e5a8134765cdc69ba916416166f4d416137e2ffc Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 7 Oct 2014 16:20:58 +0200 Subject: fix vcxproj generation for CONFIG-=flat Commit 4f21eb03 broke the generation of non-flat vcxprojs. XTreeNode passes filter names to outputFileConfigs that have the source subdirectory suffixed (e.g. "Generated Files\subdir"). That's why the original code tested the filter names with QString::startsWith. I've changed the signature of outputFileConfigs to take a filterId parameter which contains the unaltered filter name (e.g. "Generated Files") that will determine the correct filter. Task-number: QTBUG-41746 Change-Id: If33428526a098f433cd6ceb8ab6608bd9f94ef17 Reviewed-by: Oswald Buddenhagen --- qmake/generators/win32/msbuild_objectmodel.cpp | 28 +++++++++++++++----------- qmake/generators/win32/msbuild_objectmodel.h | 11 ++++++---- 2 files changed, 23 insertions(+), 16 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index 64a927fb77..6751dc0f6b 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -341,7 +341,8 @@ static QStringList unquote(const QStringList &values) } // Tree file generation --------------------------------------------- -void XTreeNode::generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCProject &tool, const QString &filter) { +void XTreeNode::generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, + VCProject &tool, const QString &filter, const QString &filterId) { if (children.size()) { // Filter @@ -362,38 +363,39 @@ void XTreeNode::generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString if ((*it)->children.size()) { if ( !tempFilterName.isEmpty() ) - (*it)->generateXML(xml, xmlFilter, it.key(), tool, tempFilterName); + (*it)->generateXML(xml, xmlFilter, it.key(), tool, tempFilterName, filterId); else - (*it)->generateXML(xml, xmlFilter, it.key(), tool, filter); + (*it)->generateXML(xml, xmlFilter, it.key(), tool, filter, filterId); } // Second round, do leafs for (it = children.constBegin(); it != end; ++it) if (!(*it)->children.size()) { if ( !tempFilterName.isEmpty() ) - (*it)->generateXML(xml, xmlFilter, it.key(), tool, tempFilterName); + (*it)->generateXML(xml, xmlFilter, it.key(), tool, tempFilterName, filterId); else - (*it)->generateXML(xml, xmlFilter, it.key(), tool, filter); + (*it)->generateXML(xml, xmlFilter, it.key(), tool, filter, filterId); } } else { // Leaf xml << tag(_ItemGroup); xmlFilter << tag(_ItemGroup); - VCXProjectWriter::outputFileConfigs(tool, xml, xmlFilter, info, filter); + VCXProjectWriter::outputFileConfigs(tool, xml, xmlFilter, info, filter, filterId); xmlFilter << closetag(); xml << closetag(); } } // Flat file generation --------------------------------------------- -void XFlatNode::generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &/*tagName*/, VCProject &tool, const QString &filter) { +void XFlatNode::generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &/*tagName*/, + VCProject &tool, const QString &filter, const QString &filterId) { if (children.size()) { ChildrenMapFlat::ConstIterator it = children.constBegin(); ChildrenMapFlat::ConstIterator end = children.constEnd(); xml << tag(_ItemGroup); xmlFilter << tag(_ItemGroup); for (; it != end; ++it) { - VCXProjectWriter::outputFileConfigs(tool, xml, xmlFilter, (*it), filter); + VCXProjectWriter::outputFileConfigs(tool, xml, xmlFilter, (*it), filter, filterId); } xml << closetag(); xmlFilter << closetag(); @@ -1836,19 +1838,21 @@ void VCXProjectWriter::outputFilter(VCProject &project, XmlOutput &xml, XmlOutpu if (!root->hasElements()) return; - root->generateXML(xml, xmlFilter, "", project, filtername); // output root tree + root->generateXML(xml, xmlFilter, "", project, filtername, filtername); // output root tree } // Output all configurations (by filtername) for a file (by info) // A filters config output is in VCFilter.outputFileConfig() -void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, XmlOutput &xmlFilter, const VCFilterFile &info, const QString &filtername) +void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, XmlOutput &xmlFilter, + const VCFilterFile &info, const QString &filtername, + const QString &filterId) { // We need to check if the file has any custom build step. // If there is one then it has to be included with "CustomBuild Include" bool hasCustomBuildStep = false; QVarLengthArray data(project.SingleProjects.count()); for (int i = 0; i < project.SingleProjects.count(); ++i) { - data[i].filter = project.SingleProjects.at(i).filterByName(filtername); + data[i].filter = project.SingleProjects.at(i).filterByName(filterId); if (!data[i].filter.Config) // only if the filter is not empty continue; VCFilter &filter = data[i].filter; @@ -1869,7 +1873,7 @@ void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, Xml bool fileAdded = false; for (int i = 0; i < project.SingleProjects.count(); ++i) { - const VCFilter &filter = project.SingleProjects.at(i).filterByName(filtername); + const VCFilter &filter = project.SingleProjects.at(i).filterByName(filterId); if (!filter.Config) // only if the filter is not empty continue; if (outputFileConfig(&data[i], xml, xmlFilter, info.file, fileAdded, diff --git a/qmake/generators/win32/msbuild_objectmodel.h b/qmake/generators/win32/msbuild_objectmodel.h index 6ed82233a3..a562cc364b 100644 --- a/qmake/generators/win32/msbuild_objectmodel.h +++ b/qmake/generators/win32/msbuild_objectmodel.h @@ -56,7 +56,8 @@ public: } virtual void addElement(const QString &filepath, const VCFilterFile &allInfo) = 0; virtual void removeElements()= 0; - virtual void generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCProject &tool, const QString &filter) = 0; + virtual void generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, + VCProject &tool, const QString &filter, const QString &filterId) = 0; virtual bool hasElements() = 0; }; @@ -106,7 +107,8 @@ public: children.clear(); } - void generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCProject &tool, const QString &filter); + void generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCProject &tool, + const QString &filter, const QString &filterId); bool hasElements() { return children.size() != 0; } @@ -146,7 +148,8 @@ public: children.clear(); } - void generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCProject &proj, const QString &filter); + void generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString &tagName, VCProject &proj, + const QString &filter, const QString &filterId); bool hasElements() { return children.size() != 0; } @@ -180,7 +183,7 @@ private: static void addFilters(VCProject &project, XmlOutput &xmlFilter, const QString &filterName); static void outputFilter(VCProject &project, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filtername); - static void outputFileConfigs(VCProject &project, XmlOutput &xml, XmlOutput &xmlFilter, const VCFilterFile &info, const QString &filtername); + static void outputFileConfigs(VCProject &project, XmlOutput &xml, XmlOutput &xmlFilter, const VCFilterFile &info, const QString &filtername, const QString &filterId); static bool outputFileConfig(OutputFilterData *d, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filename, bool fileAdded, bool hasCustomBuildStep); static void outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter, const QString &fileName, const QString &filterName); static QString generateCondition(const VCConfiguration &config); -- cgit v1.2.3 From 6e6c6f986840d5151d06689dcae35d6caf49a78c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 7 Oct 2014 16:53:32 +0200 Subject: fix VS 2008 project file generation Commit 4f21eb03 utterly broke the project file generation for VS 2008. The introduced filterByName convenience methods looks for filter names like "Generated Files", but the code path for VS <= 2008 used filter names like "GeneratedFiles". The generated projects were valid but empty. This commit ensures that both VS generators use the same filter names. Task-number: QTBUG-41821 Change-Id: I828fa911bae8d835b073a4c2260316127cc72cda Reviewed-by: Oswald Buddenhagen Reviewed-by: Joerg Bornemann --- qmake/generators/win32/msvc_objectmodel.cpp | 36 ++++++++++++++--------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'qmake') diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index f174b654d7..f8e67718f7 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -2521,14 +2521,14 @@ void VCProjectWriter::write(XmlOutput &xml, VCProjectSingleConfig &tool) // XML output functionality VCProject tempProj; tempProj.SingleProjects += tool; - outputFilter(tempProj, xml, "Sources"); - outputFilter(tempProj, xml, "Headers"); - outputFilter(tempProj, xml, "GeneratedFiles"); - outputFilter(tempProj, xml, "LexYaccFiles"); - outputFilter(tempProj, xml, "TranslationFiles"); - outputFilter(tempProj, xml, "FormFiles"); - outputFilter(tempProj, xml, "ResourceFiles"); - outputFilter(tempProj, xml, "DeploymentFiles"); + outputFilter(tempProj, xml, "Source Files"); + outputFilter(tempProj, xml, "Header Files"); + outputFilter(tempProj, xml, "Generated Files"); + outputFilter(tempProj, xml, "LexYacc Files"); + outputFilter(tempProj, xml, "Translation Files"); + outputFilter(tempProj, xml, "Form Files"); + outputFilter(tempProj, xml, "Resource Files"); + outputFilter(tempProj, xml, "Deployment Files"); QSet extraCompilersInProject; for (int i = 0; i < tool.ExtraCompilersFiles.count(); ++i) { @@ -2542,7 +2542,7 @@ void VCProjectWriter::write(XmlOutput &xml, VCProjectSingleConfig &tool) for (int x = 0; x < tempProj.ExtraCompilers.count(); ++x) { outputFilter(tempProj, xml, tempProj.ExtraCompilers.at(x)); } - outputFilter(tempProj, xml, "RootFiles"); + outputFilter(tempProj, xml, "Root Files"); xml << closetag(q_Files) << tag(_Globals) << data(); // No "/>" end tag @@ -2574,18 +2574,18 @@ void VCProjectWriter::write(XmlOutput &xml, VCProject &tool) write(xml, tool.SingleProjects.at(i).Configuration); xml << closetag(_Configurations) << tag(q_Files); - outputFilter(tool, xml, "Sources"); - outputFilter(tool, xml, "Headers"); - outputFilter(tool, xml, "GeneratedFiles"); - outputFilter(tool, xml, "LexYaccFiles"); - outputFilter(tool, xml, "TranslationFiles"); - outputFilter(tool, xml, "FormFiles"); - outputFilter(tool, xml, "ResourceFiles"); - outputFilter(tool, xml, "DeploymentFiles"); + outputFilter(tool, xml, "Source Files"); + outputFilter(tool, xml, "Header Files"); + outputFilter(tool, xml, "Generated Files"); + outputFilter(tool, xml, "LexYacc Files"); + outputFilter(tool, xml, "Translation Files"); + outputFilter(tool, xml, "Form Files"); + outputFilter(tool, xml, "Resource Files"); + outputFilter(tool, xml, "Deployment Files"); for (int x = 0; x < tool.ExtraCompilers.count(); ++x) { outputFilter(tool, xml, tool.ExtraCompilers.at(x)); } - outputFilter(tool, xml, "RootFiles"); + outputFilter(tool, xml, "Root Files"); xml << closetag(q_Files) << tag(_Globals) << data(); // No "/>" end tag -- cgit v1.2.3 From 106487387d493dab934e19b33bfed55b8df62d67 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 9 Sep 2014 15:18:54 +0200 Subject: Removing a few unneeded "? true : false" Change-Id: Ib13f0ddd65fe78f5559f343f2fc30756b1d3ef76 Reviewed-by: Oswald Buddenhagen Reviewed-by: Orgad Shaneh Reviewed-by: Marc Mutz --- qmake/generators/win32/cesdkhandler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qmake') diff --git a/qmake/generators/win32/cesdkhandler.cpp b/qmake/generators/win32/cesdkhandler.cpp index 97ee4eca09..f2e6758704 100644 --- a/qmake/generators/win32/cesdkhandler.cpp +++ b/qmake/generators/win32/cesdkhandler.cpp @@ -97,7 +97,7 @@ bool CeSdkHandler::parse() return false; } - return m_list.size() > 0 ? true : false; + return m_list.size() > 0; } QString CeSdkHandler::fixPaths(QString path) const -- cgit v1.2.3