summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoRcc.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-08-06 08:40:49 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-08-07 17:48:02 (GMT)
commitca2923110c9999c5cd538a91ec61b10d0b336c48 (patch)
tree24d145f2a2ae0ce07a4298a5f3539f7445eaa015 /Source/cmQtAutoRcc.cxx
parentd02a99d9d3aa8d8f33efbd3255c78d6b87a99a22 (diff)
downloadCMake-ca2923110c9999c5cd538a91ec61b10d0b336c48.zip
CMake-ca2923110c9999c5cd538a91ec61b10d0b336c48.tar.gz
CMake-ca2923110c9999c5cd538a91ec61b10d0b336c48.tar.bz2
Autogen: Modernize to use cmStrCat for string concatenation
Diffstat (limited to 'Source/cmQtAutoRcc.cxx')
-rw-r--r--Source/cmQtAutoRcc.cxx43
1 files changed, 16 insertions, 27 deletions
diff --git a/Source/cmQtAutoRcc.cxx b/Source/cmQtAutoRcc.cxx
index 59f632d..c75b2ca 100644
--- a/Source/cmQtAutoRcc.cxx
+++ b/Source/cmQtAutoRcc.cxx
@@ -36,9 +36,7 @@ bool cmQtAutoRcc::Init(cmMakefile* makefile)
this](std::string const& key) -> std::string {
const char* valueConf = nullptr;
{
- std::string keyConf = key;
- keyConf += '_';
- keyConf += InfoConfig();
+ std::string keyConf = cmStrCat(key, '_', InfoConfig());
valueConf = makefile->GetDefinition(keyConf);
}
if (valueConf == nullptr) {
@@ -82,9 +80,8 @@ bool cmQtAutoRcc::Init(cmMakefile* makefile)
// - Rcc executable
RccExecutable_ = InfoGet("ARCC_RCC_EXECUTABLE");
if (!RccExecutableTime_.Load(RccExecutable_)) {
- std::string error = "The rcc executable ";
- error += Quoted(RccExecutable_);
- error += " does not exist.";
+ std::string error = cmStrCat("The rcc executable ", Quoted(RccExecutable_),
+ " does not exist.");
return LogInfoError(error);
}
RccListOptions_ = InfoGetList("ARCC_RCC_LIST_OPTIONS");
@@ -179,10 +176,8 @@ bool cmQtAutoRcc::Process()
std::string cmQtAutoRcc::MultiConfigOutput() const
{
static std::string const suffix = "_CMAKE_";
- std::string res;
- res += RccPathChecksum_;
- res += '/';
- res += AppendFilenameSuffix(RccFileName_, suffix);
+ std::string res = cmStrCat(RccPathChecksum_, '/',
+ AppendFilenameSuffix(RccFileName_, suffix));
return res;
}
@@ -273,9 +268,7 @@ bool cmQtAutoRcc::SettingsFileWrite()
Log().Info(GenT::RCC, "Writing settings file " + Quoted(SettingsFile_));
}
// Write settings file
- std::string content = "rcc:";
- content += SettingsString_;
- content += '\n';
+ std::string content = cmStrCat("rcc:", SettingsString_, '\n');
std::string error;
if (!FileWrite(SettingsFile_, content, &error)) {
Log().ErrorFile(GenT::RCC, SettingsFile_,
@@ -403,10 +396,9 @@ bool cmQtAutoRcc::TestInfoFile()
// Test if the rcc output file is older than the info file
if (RccFileTime_.Older(InfoFileTime())) {
if (Log().Verbose()) {
- std::string reason = "Touching ";
- reason += Quoted(RccFileOutput_);
- reason += " because it is older than ";
- reason += Quoted(InfoFile());
+ std::string reason =
+ cmStrCat("Touching ", Quoted(RccFileOutput_),
+ " because it is older than ", Quoted(InfoFile()));
Log().Info(GenT::RCC, reason);
}
// Touch build file
@@ -457,10 +449,9 @@ bool cmQtAutoRcc::GenerateRcc()
if (!result || (retVal != 0)) {
// rcc process failed
{
- std::string err = "The rcc process failed to compile\n ";
- err += Quoted(QrcFile_);
- err += "\ninto\n ";
- err += Quoted(RccFileOutput_);
+ std::string err =
+ cmStrCat("The rcc process failed to compile\n ", Quoted(QrcFile_),
+ "\ninto\n ", Quoted(RccFileOutput_));
Log().ErrorCommand(GenT::RCC, err, cmd, rccStdOut + rccStdErr);
}
cmSystemTools::RemoveFile(RccFileOutput_);
@@ -482,12 +473,10 @@ bool cmQtAutoRcc::GenerateWrapper()
// Generate a wrapper source file on demand
if (IsMultiConfig()) {
// Wrapper file content
- std::string content;
- content += "// This is an autogenerated configuration wrapper file.\n";
- content += "// Changes will be overwritten.\n";
- content += "#include <";
- content += MultiConfigOutput();
- content += ">\n";
+ std::string content =
+ cmStrCat("// This is an autogenerated configuration wrapper file.\n",
+ "// Changes will be overwritten.\n", "#include <",
+ MultiConfigOutput(), ">\n");
// Compare with existing file content
bool fileDiffers = true;