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 <oswald.buddenhagen@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
This commit is contained in:
parent
990a413a2e
commit
d41d4a0a35
@ -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);
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user