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.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'qmake/generators/win32/msbuild_objectmodel.h') 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