diff options
-rw-r--r-- | qmake/generators/win32/msbuild_objectmodel.cpp | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp index c3436b4..3381d53 100644 --- a/qmake/generators/win32/msbuild_objectmodel.cpp +++ b/qmake/generators/win32/msbuild_objectmodel.cpp @@ -2908,26 +2908,43 @@ void XTreeNode::generateXML(XmlOutput &xml, XmlOutput &xmlFilter, const QString if (children.size()) { // Filter + QString tempFilterName; ChildrenMap::ConstIterator it, end = children.constEnd(); if (!tagName.isEmpty()) { + tempFilterName.append(filter); + tempFilterName.append("\\"); + tempFilterName.append(tagName); + xmlFilter << tag(_ItemGroup); xmlFilter << tag("Filter") - << attrTag("Include", tagName) - << attrTagS("Extensions", ""); + << attrTag("Include", tempFilterName) + << closetag(); + xmlFilter << closetag(); } // First round, do nested filters for (it = children.constBegin(); it != end; ++it) if ((*it)->children.size()) - (*it)->generateXML(xml, xmlFilter, it.key(), tool, filter); + { + if ( !tempFilterName.isEmpty() ) + (*it)->generateXML(xml, xmlFilter, it.key(), tool, tempFilterName); + else + (*it)->generateXML(xml, xmlFilter, it.key(), tool, filter); + } // Second round, do leafs for (it = children.constBegin(); it != end; ++it) if (!(*it)->children.size()) - (*it)->generateXML(xml, xmlFilter, it.key(), tool, filter); - - if (!tagName.isEmpty()) - xml << closetag("Filter"); + { + if ( !tempFilterName.isEmpty() ) + (*it)->generateXML(xml, xmlFilter, it.key(), tool, tempFilterName); + else + (*it)->generateXML(xml, xmlFilter, it.key(), tool, filter); + } } else { // Leaf + xml << tag(_ItemGroup); + xmlFilter << tag(_ItemGroup); tool.outputFileConfigs(xml, xmlFilter, info, filter); + xmlFilter << closetag(); + xml << closetag(); } } |