QtAutogen: New common bold logging method

This commit is contained in:
Sebastian Holtermann 2016-11-30 22:08:41 +01:00 committed by Brad King
parent 49f8687e16
commit 8c6f990fb6
2 changed files with 16 additions and 16 deletions

View File

@ -1077,11 +1077,9 @@ bool cmQtAutoGenerators::GenerateMocFiles(
// actually write _automoc.cpp
{
std::string msg = "Generating moc compilation ";
std::string msg = "Generating MOC compilation ";
msg += this->OutMocCppFilenameRel;
cmSystemTools::MakefileColorEcho(cmsysTerminal_Color_ForegroundBlue |
cmsysTerminal_Color_ForegroundBold,
msg.c_str(), true, this->ColorOutput);
this->LogBold(msg);
}
// Make sure the parent directory exists
bool success = this->makeParentDirectory(this->OutMocCppFilenameAbs);
@ -1119,11 +1117,9 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile,
&sourceNewerThanMoc);
if (this->GenerateAll || !success || sourceNewerThanMoc >= 0) {
{
std::string msg = "Generating moc source ";
std::string msg = "Generating MOC source ";
msg += mocFileName;
cmSystemTools::MakefileColorEcho(cmsysTerminal_Color_ForegroundBlue |
cmsysTerminal_Color_ForegroundBold,
msg.c_str(), true, this->ColorOutput);
this->LogBold(msg);
}
// Make sure the parent directory exists
@ -1245,11 +1241,9 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& realName,
&sourceNewerThanUi);
if (this->GenerateAll || !success || sourceNewerThanUi >= 0) {
{
std::string msg = "Generating ui header ";
std::string msg = "Generating UIC header ";
msg += uiOutputFile;
cmSystemTools::MakefileColorEcho(cmsysTerminal_Color_ForegroundBlue |
cmsysTerminal_Color_ForegroundBold,
msg.c_str(), true, this->ColorOutput);
this->LogBold(msg);
}
// Make sure the parent directory exists
@ -1395,11 +1389,9 @@ bool cmQtAutoGenerators::GenerateQrc(const std::string& qrcInputFile,
if (this->GenerateAll || generateQrc) {
{
std::string msg = "Generating qrc source ";
std::string msg = "Generating QRC source ";
msg += qrcOutputFile;
cmSystemTools::MakefileColorEcho(cmsysTerminal_Color_ForegroundBlue |
cmsysTerminal_Color_ForegroundBold,
msg.c_str(), true, this->ColorOutput);
this->LogBold(msg);
}
// Make sure the parent directory exists
@ -1493,6 +1485,13 @@ void cmQtAutoGenerators::LogErrorNameCollision(
this->LogError(err.str());
}
void cmQtAutoGenerators::LogBold(const std::string& message)
{
cmSystemTools::MakefileColorEcho(cmsysTerminal_Color_ForegroundBlue |
cmsysTerminal_Color_ForegroundBold,
message.c_str(), true, this->ColorOutput);
}
void cmQtAutoGenerators::LogInfo(const std::string& message)
{
std::cout << message.c_str();

View File

@ -80,6 +80,7 @@ private:
void LogErrorNameCollision(
const std::string& message,
const std::multimap<std::string, std::string>& collisions);
void LogBold(const std::string& message);
void LogInfo(const std::string& message);
void LogWarning(const std::string& message);
void LogError(const std::string& message);