diff options
-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); |