diff options
author | Martin Petersson <martin.petersson@nokia.com> | 2010-11-25 11:57:13 (GMT) |
---|---|---|
committer | Martin Petersson <martin.petersson@nokia.com> | 2010-11-25 12:06:29 (GMT) |
commit | ea814440efc8a4b956ba3a4cddd1f269f1734c96 (patch) | |
tree | 3d70299d688256cb5c1bd1fb891b0b1f5525b536 | |
parent | 5200f708c46d4bc737d6706691965c726c063292 (diff) | |
download | Qt-ea814440efc8a4b956ba3a4cddd1f269f1734c96.zip Qt-ea814440efc8a4b956ba3a4cddd1f269f1734c96.tar.gz Qt-ea814440efc8a4b956ba3a4cddd1f269f1734c96.tar.bz2 |
Fix QTBUG-13928 non flat mode for project files in VS2010.
Reviewed-by: Joerg
Task-number: QTBUG-13928
-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(); } } |