diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-02-15 09:18:17 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-02-19 11:35:42 (GMT) |
commit | 2f3ecd4ea9518b2a110b995fe9ac171f026ccad5 (patch) | |
tree | 7ab4f8888687c835ebe617a2203eb1fb075b52b4 | |
parent | 739592c9256fb6f89ee15081c3944d42515ef8db (diff) | |
download | CMake-2f3ecd4ea9518b2a110b995fe9ac171f026ccad5.zip CMake-2f3ecd4ea9518b2a110b995fe9ac171f026ccad5.tar.gz CMake-2f3ecd4ea9518b2a110b995fe9ac171f026ccad5.tar.bz2 |
Autogen: Inline settings string generation methods
-rw-r--r-- | Source/cmQtAutoGenerators.cxx | 58 | ||||
-rw-r--r-- | Source/cmQtAutoGenerators.h | 3 |
2 files changed, 20 insertions, 41 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index d3fbd02..99f5ef7 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -427,51 +427,33 @@ bool cmQtAutoGenerators::ReadAutogenInfoFile( return true; } -std::string cmQtAutoGenerators::SettingsStringGenMoc() const +void cmQtAutoGenerators::SettingsFileRead(cmMakefile* makefile, + const std::string& targetDirectory) { - std::string res; + // Compose current settings strings if (this->MocEnabled()) { - res += this->MocCompileDefinitionsStr; - res += " ~~~ "; - res += this->MocIncludesStr; - res += " ~~~ "; - res += this->MocOptionsStr; - res += " ~~~ "; - res += this->IncludeProjectDirsBefore ? "TRUE" : "FALSE"; - res += " ~~~ "; + std::string& str = this->SettingsStringMoc; + str += this->MocCompileDefinitionsStr; + str += " ~~~ "; + str += this->MocIncludesStr; + str += " ~~~ "; + str += this->MocOptionsStr; + str += " ~~~ "; + str += this->IncludeProjectDirsBefore ? "TRUE" : "FALSE"; + str += " ~~~ "; } - return res; -} - -std::string cmQtAutoGenerators::SettingsStringGenUic() const -{ - std::string res; if (this->UicEnabled()) { - res += cmJoin(this->UicTargetOptions, "@osep@"); - res += " ~~~ "; - res += JoinOptions(this->UicOptions); - res += " ~~~ "; + std::string& str = this->SettingsStringUic; + str += cmJoin(this->UicTargetOptions, "@osep@"); + str += " ~~~ "; + str += JoinOptions(this->UicOptions); + str += " ~~~ "; } - return res; -} - -std::string cmQtAutoGenerators::SettingsStringGenRcc() const -{ - std::string res; if (this->RccEnabled()) { - res += JoinOptions(this->RccOptions); - res += " ~~~ "; + std::string& str = this->SettingsStringRcc; + str += JoinOptions(this->RccOptions); + str += " ~~~ "; } - return res; -} - -void cmQtAutoGenerators::SettingsFileRead(cmMakefile* makefile, - const std::string& targetDirectory) -{ - // Compose current settings strings - this->SettingsStringMoc = this->SettingsStringGenMoc(); - this->SettingsStringUic = this->SettingsStringGenUic(); - this->SettingsStringRcc = this->SettingsStringGenRcc(); // Read old settings const std::string filename = SettingsFile(targetDirectory); diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index 7383c99..78d0314 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -28,9 +28,6 @@ private: const std::string& config); // - Settings file - std::string SettingsStringGenMoc() const; - std::string SettingsStringGenUic() const; - std::string SettingsStringGenRcc() const; void SettingsFileRead(cmMakefile* makefile, const std::string& targetDirectory); bool SettingsFileWrite(const std::string& targetDirectory); |