diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index d325768ba4..fcdea4a0a8 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -1861,10 +1861,9 @@ void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, Xml xmlFilter << closetag(); } -bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filename, bool fileAllreadyAdded) +bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOutput &xmlFilter, + const QString &filename, bool fileAdded) { - bool fileAdded = false; - // Clearing each filter tool filter.useCustomBuildTool = false; filter.useCompilerTool = false; @@ -1906,8 +1905,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut if (filter.useCustomBuildTool) { - if ( !fileAllreadyAdded ) { - + if (!fileAdded) { fileAdded = true; xmlFilter << tag("CustomBuild") @@ -1927,7 +1925,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut filter.Project->projectWriter->write(xml, filter.CustomBuildTool); } - if ( !fileAdded && !fileAllreadyAdded ) + if (!fileAdded) { fileAdded = true; outputFileConfig(xml, xmlFilter, filename, filter.Name); diff --git a/qmake/generators/win32/msbuild_objectmodel.h b/qmake/generators/win32/msbuild_objectmodel.h index 0b0cab0c7d..5ac72a60e7 100644 --- a/qmake/generators/win32/msbuild_objectmodel.h +++ b/qmake/generators/win32/msbuild_objectmodel.h @@ -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, bool fileAllreadyAdded); + static bool outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOutput &xmlFilter, const QString &filename, bool fileAdded); static void outputFileConfig(XmlOutput &xml, XmlOutput &xmlFilter, const QString &fileName, const QString &filterName); static QString generateCondition(const VCConfiguration &config);