diff options
authorJoerg Bornemann <>2014-09-23 14:42:54 +0200
committerJoerg Bornemann <>2014-09-24 14:54:31 +0200
commitd41d4a0a358c98cbe56838b9fbb0ac422d43b15e (patch)
parent990a413a2e3c557edb260a12843a0ea0e1802a2f (diff)
remove special handling for the "Deployment Files" filter
Files in "Deployment Files" should be added as static content, which happens to be the fallback in the case where checkDeploymentFiles is false. Also, the calling code expects that an XML tag is added in all cases. This did not happen for the "Resource Files" filter when checkDeploymentFiles was false, which led to unmatched closing tags. This fixes the issue that files added to RESOURCES in different build variants produced invalid vcxproj files. Task-number: QTBUG-30373 Change-Id: Ibb27e67641ba63150938cf826ea1881d182fb841 Reviewed-by: Oswald Buddenhagen <> Reviewed-by: Joerg Bornemann <>
2 files changed, 5 insertions, 6 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 58e600c48e..6cf6b96ab2 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -1855,7 +1855,7 @@ void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, Xml
if ( !fileAdded )
- outputFileConfig(xml, xmlFilter, info.file, filtername, false);
+ outputFileConfig(xml, xmlFilter, info.file, filtername);
xml << closetag();
xmlFilter << closetag();
@@ -1928,7 +1928,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
if ( !fileAdded && !fileAllreadyAdded )
fileAdded = true;
- outputFileConfig(xml, xmlFilter, filename, filtername, true);
+ outputFileConfig(xml, xmlFilter, filename, filtername);
const QString condition = generateCondition(*filter.Config);
@@ -1968,8 +1968,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
void VCXProjectWriter::outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter,
- const QString &filePath, const QString &filterName,
- bool checkDeploymentFilter)
+ const QString &filePath, const QString &filterName)
const QString nativeFilePath = Option::fixPathToLocalOS(filePath);
if (filterName.startsWith("Source Files")) {
@@ -2017,7 +2016,7 @@ void VCXProjectWriter::outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter,
xml << tag("ResourceCompile")
<< attrTag("Include", nativeFilePath);
- } else if (!checkDeploymentFilter || filterName.startsWith("Deployment Files")) {
+ } else {
xmlFilter << tag("None")
<< attrTag("Include", nativeFilePath)
<< attrTagS("Filter", filterName);
diff --git a/qmake/generators/win32/msbuild_objectmodel.h b/qmake/generators/win32/msbuild_objectmodel.h
index 336904d87c..63e71ec55e 100644
--- a/qmake/generators/win32/msbuild_objectmodel.h
+++ b/qmake/generators/win32/msbuild_objectmodel.h
@@ -175,7 +175,7 @@ private:
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, const QString &filtername, bool fileAllreadyAdded);
- static void outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter, const QString &fileName, const QString &filterName, bool checkDeploymentFilter);
+ static void outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter, const QString &fileName, const QString &filterName);
static QString generateCondition(const VCConfiguration &config);
friend class XTreeNode;