diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-08-22 12:18:16 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-08-22 17:10:32 (GMT) |
commit | 0f2e178f6528c9cd20f4d6a68c0e5e068cd64f58 (patch) | |
tree | 0bfb27ec0915669aa7b59994381a7ea492b2b1c4 /Source/cmQtAutoGeneratorInitializer.cxx | |
parent | 13bb716f046e33d9dbd20ac2156deb0f677797d3 (diff) | |
download | CMake-0f2e178f6528c9cd20f4d6a68c0e5e068cd64f58.zip CMake-0f2e178f6528c9cd20f4d6a68c0e5e068cd64f58.tar.gz CMake-0f2e178f6528c9cd20f4d6a68c0e5e068cd64f58.tar.bz2 |
Autogen: Don't use cmMakefile::GetQtUiFilesWithOptions
The purpose of this patch is to allow later removal of
AUTOGEN specific variables in cmMakefile and cmSourceFile.
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.cxx')
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.cxx | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.cxx b/Source/cmQtAutoGeneratorInitializer.cxx index 9e31371..a8e2bca 100644 --- a/Source/cmQtAutoGeneratorInitializer.cxx +++ b/Source/cmQtAutoGeneratorInitializer.cxx @@ -531,25 +531,25 @@ static void SetupAutoTargetUic(cmGeneratorTarget const* target, std::vector<std::string> uiFileFiles; std::vector<std::string> uiFileOptions; { - const std::set<std::string> skipped(setup.uicSkip.begin(), - setup.uicSkip.end()); - - const std::vector<cmSourceFile*> uiFilesWithOptions = - makefile->GetQtUiFilesWithOptions(); - for (std::vector<cmSourceFile*>::const_iterator fileIt = - uiFilesWithOptions.begin(); - fileIt != uiFilesWithOptions.end(); ++fileIt) { - cmSourceFile* sf = *fileIt; - const std::string absFile = - cmsys::SystemTools::GetRealPath(sf->GetFullPath()); - if (skipped.find(absFile) == skipped.end()) { - // The file wasn't skipped - uiFileFiles.push_back(absFile); - { - std::string opts = sf->GetProperty("AUTOUIC_OPTIONS"); - cmSystemTools::ReplaceString(opts, ";", - cmQtAutoGeneratorCommon::listSep); - uiFileOptions.push_back(opts); + const std::string uiExt = "ui"; + const std::vector<cmSourceFile*>& srcFiles = makefile->GetSourceFiles(); + for (std::vector<cmSourceFile*>::const_iterator fit = srcFiles.begin(); + fit != srcFiles.end(); ++fit) { + cmSourceFile* sf = *fit; + // sf->GetExtension() is only valid after sf->GetFullPath() ... + const std::string& fPath = sf->GetFullPath(); + if (sf->GetExtension() == uiExt) { + // Check if the files has uic options + std::string uicOpts = sf->GetProperty("AUTOUIC_OPTIONS"); + if (!uicOpts.empty()) { + const std::string absFile = cmsys::SystemTools::GetRealPath(fPath); + // Check if file isn't skipped + if (setup.uicSkip.count(absFile) == 0) { + uiFileFiles.push_back(absFile); + cmSystemTools::ReplaceString(uicOpts, ";", + cmQtAutoGeneratorCommon::listSep); + uiFileOptions.push_back(uicOpts); + } } } } |