CMakePM: Add "[cmake] " prefix to all output messages

With this one could easily filter the "[cmake] " messages from all the
messages in the "Generate Messages" pane.

Change-Id: I690650f0ccb0372c9361b95cfec41809737720d7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
Cristian Adam
2023-10-04 17:31:20 +02:00
parent edf4280bd9
commit 16dfd2d374
7 changed files with 50 additions and 24 deletions

View File

@@ -303,8 +303,9 @@ void FileApiReader::makeBackupConfiguration(bool store)
replyPrev.removeRecursively();
QTC_CHECK(!replyPrev.exists());
if (!reply.renameFile(replyPrev))
Core::MessageManager::writeFlashing(Tr::tr("Failed to rename \"%1\" to \"%2\".")
.arg(reply.toString(), replyPrev.toString()));
Core::MessageManager::writeFlashing(
addCMakePrefix(Tr::tr("Failed to rename \"%1\" to \"%2\".")
.arg(reply.toString(), replyPrev.toString())));
}
FilePath cmakeCacheTxt = m_parameters.buildDirectory.pathAppended("CMakeCache.txt");
@@ -315,8 +316,8 @@ void FileApiReader::makeBackupConfiguration(bool store)
if (cmakeCacheTxt.exists())
if (!FileUtils::copyIfDifferent(cmakeCacheTxt, cmakeCacheTxtPrev))
Core::MessageManager::writeFlashing(
Tr::tr("Failed to copy \"%1\" to \"%2\".")
.arg(cmakeCacheTxt.toString(), cmakeCacheTxtPrev.toString()));
addCMakePrefix(Tr::tr("Failed to copy \"%1\" to \"%2\".")
.arg(cmakeCacheTxt.toString(), cmakeCacheTxtPrev.toString())));
}
void FileApiReader::writeConfigurationIntoBuildDirectory(const QStringList &configurationArguments)