diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2016-04-18 12:07:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-04-19 16:52:36 (GMT) |
commit | 47e60bc5a09f5b3a71ce015025cd93af4270afb5 (patch) | |
tree | be7c89eee9986477f52f55d229c8ceb0683b7a3b /Source/cmQtAutoGenerators.cxx | |
parent | cf679ea8dcd04c1217cd7c664117439fdd370f10 (diff) | |
download | CMake-47e60bc5a09f5b3a71ce015025cd93af4270afb5.zip CMake-47e60bc5a09f5b3a71ce015025cd93af4270afb5.tar.gz CMake-47e60bc5a09f5b3a71ce015025cd93af4270afb5.tar.bz2 |
Autogen: Split out UI file generation code to dedicated method
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 38 |
1 files changed, 26 insertions, 12 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 7f7dbad..91bacce 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -595,20 +595,10 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile) { this->GenerateMocFiles ( includedMocs, notIncludedMocs ); } - - for(std::map<std::string, std::vector<std::string> >::const_iterator - it = includedUis.begin(); - it != includedUis.end(); - ++it) + if(!this->UicExecutable.empty()) { - for (std::vector<std::string>::const_iterator nit = it->second.begin(); - nit != it->second.end(); - ++nit) - { - this->GenerateUi(it->first, *nit); - } + this->GenerateUiFiles ( includedUis ); } - if(!this->RccExecutable.empty()) { this->GenerateQrcFiles(); @@ -1227,6 +1217,30 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile, return false; } + +bool cmQtAutoGenerators::GenerateUiFiles( + const std::map<std::string, std::vector<std::string> >& includedUis ) +{ + for(std::map<std::string, std::vector<std::string> >::const_iterator + it = includedUis.begin(); it != includedUis.end(); ++it) + { + for (std::vector<std::string>::const_iterator nit = it->second.begin(); + nit != it->second.end(); ++nit) + { + if (!this->GenerateUi(it->first, *nit) ) + { + if (this->RunUicFailed) + { + return false; + } + } + } + } + + return true; +} + + bool cmQtAutoGenerators::GenerateUi(const std::string& realName, const std::string& uiFileName) { |