summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authorMartin Petersson <martin.petersson@nokia.com>2011-03-22 16:36:29 (GMT)
committerMartin Petersson <martin.petersson@nokia.com>2011-03-22 16:44:07 (GMT)
commit7627d9d5316430e01a7ecb1d20d3a56b4b4c740a (patch)
tree5a548270943725974ec04c8abe68dbdcba60367c /qmake/generators
parent8ad504b31a53ea2a7993f5217c68d0c4aa203b2d (diff)
downloadQt-7627d9d5316430e01a7ecb1d20d3a56b4b4c740a.zip
Qt-7627d9d5316430e01a7ecb1d20d3a56b4b4c740a.tar.gz
Qt-7627d9d5316430e01a7ecb1d20d3a56b4b4c740a.tar.bz2
qmake vcxproj generator: fix non flat projects for VS2010
The filters for files in the non flat projects will start with the base filter name and then the path to the file. So the detection of the filter needs to be done by the start of the filter namse so that we correctly add the compile commands for the added files. Task-number: QTBUG-13928 Reviewed-by: Joerg Bornemann
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/win32/msbuild_objectmodel.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/qmake/generators/win32/msbuild_objectmodel.cpp b/qmake/generators/win32/msbuild_objectmodel.cpp
index 9fd5fa9..d4d2400 100644
--- a/qmake/generators/win32/msbuild_objectmodel.cpp
+++ b/qmake/generators/win32/msbuild_objectmodel.cpp
@@ -1670,21 +1670,21 @@ void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, Xml
for (int i = 0; i < project.SingleProjects.count(); ++i) {
VCFilter filter;
const VCProjectSingleConfig &singleCfg = project.SingleProjects.at(i);
- if (filtername == "Root Files") {
+ if (filtername.startsWith("Root Files")) {
filter = singleCfg.RootFiles;
- } else if (filtername == "Source Files") {
+ } else if (filtername.startsWith("Source Files")) {
filter = singleCfg.SourceFiles;
- } else if (filtername == "Header Files") {
+ } else if (filtername.startsWith("Header Files")) {
filter = singleCfg.HeaderFiles;
- } else if (filtername == "Generated Files") {
+ } else if (filtername.startsWith("Generated Files")) {
filter = singleCfg.GeneratedFiles;
- } else if (filtername == "LexYacc Files") {
+ } else if (filtername.startsWith("LexYacc Files")) {
filter = singleCfg.LexYaccFiles;
- } else if (filtername == "Translation Files") {
+ } else if (filtername.startsWith("Translation Files")) {
filter = singleCfg.TranslationFiles;
- } else if (filtername == "Form Files") {
+ } else if (filtername.startsWith("Form Files")) {
filter = singleCfg.FormFiles;
- } else if (filtername == "Resource Files") {
+ } else if (filtername.startsWith("Resource Files")) {
filter = singleCfg.ResourceFiles;
} else {
// ExtraCompilers
@@ -1698,7 +1698,7 @@ void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, Xml
if ( !fileAdded )
{
- if (filtername == "Source Files") {
+ if (filtername.startsWith("Source Files")) {
xmlFilter << tag("ClCompile")
<< attrTag("Include",Option::fixPathToLocalOS(info.file))
@@ -1707,7 +1707,7 @@ void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, Xml
xml << tag("ClCompile")
<< attrTag("Include",Option::fixPathToLocalOS(info.file));
- } else if(filtername == "Header Files") {
+ } else if(filtername.startsWith("Header Files")) {
xmlFilter << tag("ClInclude")
<< attrTag("Include",Option::fixPathToLocalOS(info.file))
@@ -1715,7 +1715,7 @@ void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, Xml
xml << tag("ClInclude")
<< attrTag("Include",Option::fixPathToLocalOS(info.file));
- } else if(filtername == "Generated Files" || filtername == "Form Files") {
+ } else if(filtername.startsWith("Generated Files") || filtername.startsWith("Form Files")) {
if (info.file.endsWith(".h")) {
@@ -1751,7 +1751,7 @@ void VCXProjectWriter::outputFileConfigs(VCProject &project, XmlOutput &xml, Xml
<< attrTag("Include",Option::fixPathToLocalOS(info.file));
}
- } else if(filtername == "Root Files") {
+ } else if(filtername.startsWith("Root Files")) {
if (info.file.endsWith(".rc")) {
@@ -1831,7 +1831,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
xml << tag("CustomBuild")
<< attrTag("Include",Option::fixPathToLocalOS(filename));
- if ( filtername == "Form Files" || filtername == "Generated Files" || filtername == "Resource Files" )
+ if ( filtername.startsWith("Form Files") || filtername.startsWith("Generated Files") || filtername.startsWith("Resource Files") )
xml << attrTagS("FileType", "Document");
}
@@ -1842,7 +1842,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
{
fileAdded = true;
- if (filtername == "Source Files") {
+ if (filtername.startsWith("Source Files")) {
xmlFilter << tag("ClCompile")
<< attrTag("Include",Option::fixPathToLocalOS(filename))
@@ -1851,7 +1851,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
xml << tag("ClCompile")
<< attrTag("Include",Option::fixPathToLocalOS(filename));
- } else if(filtername == "Header Files") {
+ } else if(filtername.startsWith("Header Files")) {
xmlFilter << tag("ClInclude")
<< attrTag("Include",Option::fixPathToLocalOS(filename))
@@ -1859,7 +1859,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
xml << tag("ClInclude")
<< attrTag("Include",Option::fixPathToLocalOS(filename));
- } else if(filtername == "Generated Files" || filtername == "Form Files") {
+ } else if(filtername.startsWith("Generated Files") || filtername.startsWith("Form Files")) {
if (filename.endsWith(".h")) {
@@ -1894,7 +1894,7 @@ bool VCXProjectWriter::outputFileConfig(VCFilter &filter, XmlOutput &xml, XmlOut
xml << tag("CustomBuild")
<< attrTag("Include",Option::fixPathToLocalOS(filename));
}
- } else if(filtername == "Root Files") {
+ } else if(filtername.startsWith("Root Files")) {
if (filename.endsWith(".rc")) {