simplify VCXProjectWriter::outputFileConfig a bit
We don't need the filtername parameter. Change-Id: I653db4a200c83d095520b47e1451dfe59b956d92 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
parent
8b65e72b2d
commit
8ee2e497ae
@ -1850,7 +1850,7 @@ void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, Xml
|
||||
for (int i = 0; i < project.SingleProjects.count(); ++i) {
|
||||
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, filtername, fileAdded)) // only add it once.
|
||||
if (outputFileConfig(filter, xml, xmlFilter, info.file, fileAdded)) // only add it once.
|
||||
fileAdded = true;
|
||||
}
|
||||
|
||||
@ -1861,7 +1861,7 @@ void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, Xml
|
||||
xmlFilter << closetag();
|
||||
}
|
||||
|
||||
bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filename, const QString &filtername, bool fileAllreadyAdded)
|
||||
bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filename, bool fileAllreadyAdded)
|
||||
{
|
||||
bool fileAdded = false;
|
||||
|
||||
@ -1902,7 +1902,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
|
||||
|
||||
// Actual XML output ----------------------------------
|
||||
if (filter.useCustomBuildTool || filter.useCompilerTool
|
||||
|| !inBuild || filtername.startsWith("Deployment Files")) {
|
||||
|| !inBuild || filter.Name.startsWith("Deployment Files")) {
|
||||
|
||||
if (filter.useCustomBuildTool)
|
||||
{
|
||||
@ -1912,13 +1912,15 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
|
||||
|
||||
xmlFilter << tag("CustomBuild")
|
||||
<< attrTag("Include",Option::fixPathToLocalOS(filename))
|
||||
<< attrTagS("Filter", filtername);
|
||||
<< attrTagS("Filter", filter.Name);
|
||||
|
||||
xml << tag("CustomBuild")
|
||||
<< attrTag("Include",Option::fixPathToLocalOS(filename));
|
||||
|
||||
if (filtername.startsWith("Form Files") || filtername.startsWith("Generated Files")
|
||||
|| filtername.startsWith("Resource Files") || filtername.startsWith("Deployment Files"))
|
||||
if (filter.Name.startsWith("Form Files")
|
||||
|| filter.Name.startsWith("Generated Files")
|
||||
|| filter.Name.startsWith("Resource Files")
|
||||
|| filter.Name.startsWith("Deployment Files"))
|
||||
xml << attrTagS("FileType", "Document");
|
||||
}
|
||||
|
||||
@ -1928,7 +1930,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
|
||||
if ( !fileAdded && !fileAllreadyAdded )
|
||||
{
|
||||
fileAdded = true;
|
||||
outputFileConfig(xml, xmlFilter, filename, filtername);
|
||||
outputFileConfig(xml, xmlFilter, filename, filter.Name);
|
||||
}
|
||||
|
||||
const QString condition = generateCondition(*filter.Config);
|
||||
@ -1938,7 +1940,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
|
||||
<< valueTag("true");
|
||||
}
|
||||
|
||||
if (filtername.startsWith("Deployment Files") && inBuild) {
|
||||
if (filter.Name.startsWith("Deployment Files") && inBuild) {
|
||||
xml << tag("DeploymentContent")
|
||||
<< attrTag("Condition", condition)
|
||||
<< valueTag("true");
|
||||
|
@ -174,7 +174,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 bool outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filename, const QString &filtername, bool fileAllreadyAdded);
|
||||
static bool outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filename, bool fileAllreadyAdded);
|
||||
static void outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter, const QString &fileName, const QString &filterName);
|
||||
static QString generateCondition(const VCConfiguration &config);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user