summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-25 00:26:27 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-03-25 00:39:03 (GMT)
commit71a11252e95797113ecb1a969386f496b7d4861b (patch)
treeb5cac8379fc7a3aa35a055ded585498195e7b930 /Source/cmQtAutoGenerators.cxx
parent261acd91093ba5f2bf79f38a9632887ab2dd5f1c (diff)
downloadCMake-71a11252e95797113ecb1a969386f496b7d4861b.zip
CMake-71a11252e95797113ecb1a969386f496b7d4861b.tar.gz
CMake-71a11252e95797113ecb1a969386f496b7d4861b.tar.bz2
QtAutogen: Fix use of multiple ui files in a single target.
Don't store a mapping of the directory to the ui file. The directory will be a unique key, allowing only one ui file to be specified. Use the source file name instead as the mapping key.
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r--Source/cmQtAutoGenerators.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index fcc898a..a8bb317 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -1786,8 +1786,8 @@ void cmQtAutoGenerators::ParseForUic(const std::string& absFilename,
std::string::size_type matchOffset = 0;
- const std::string absPath = cmsys::SystemTools::GetFilenamePath(
- cmsys::SystemTools::GetRealPath(absFilename.c_str())) + '/';
+ const std::string realName =
+ cmsys::SystemTools::GetRealPath(absFilename.c_str());
matchOffset = 0;
if ((strstr(contentsString.c_str(), "ui_") != NULL)
@@ -1804,7 +1804,7 @@ void cmQtAutoGenerators::ParseForUic(const std::string& absFilename,
// finding the correct header, so we need to remove the ui_ part
basename = basename.substr(3);
- includedUis[absPath] = basename;
+ includedUis[realName] = basename;
matchOffset += uiIncludeRegExp.end();
} while(uiIncludeRegExp.find(contentsString.c_str() + matchOffset));
@@ -1960,7 +1960,7 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile,
return false;
}
-bool cmQtAutoGenerators::GenerateUi(const std::string& path,
+bool cmQtAutoGenerators::GenerateUi(const std::string& realName,
const std::string& uiFileName)
{
if (!cmsys::SystemTools::FileExists(this->Builddir.c_str(), false))
@@ -1968,6 +1968,9 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& path,
cmsys::SystemTools::MakeDirectory(this->Builddir.c_str());
}
+ const std::string path = cmsys::SystemTools::GetFilenamePath(
+ realName.c_str()) + '/';
+
std::string ui_output_file = "ui_" + uiFileName + ".h";
std::string ui_input_file = path + uiFileName + ".ui";