diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-09-01 12:28:26 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-09-07 16:03:13 (GMT) |
commit | 9468e926b0fb01b2f11b9d4c9c13f7ad64b328e2 (patch) | |
tree | 0bc182683aecaea39e2d5f6afda0475d675b8a2b /Source/cmQtAutoGenerators.h | |
parent | 2ba1b2812290e962e33aa884989b7f57d43b8491 (diff) | |
download | CMake-9468e926b0fb01b2f11b9d4c9c13f7ad64b328e2.zip CMake-9468e926b0fb01b2f11b9d4c9c13f7ad64b328e2.tar.gz CMake-9468e926b0fb01b2f11b9d4c9c13f7ad64b328e2.tar.bz2 |
Autogen: Refactor logging
Diffstat (limited to 'Source/cmQtAutoGenerators.h')
-rw-r--r-- | Source/cmQtAutoGenerators.h | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h index d7f4f63..1bacd49 100644 --- a/Source/cmQtAutoGenerators.h +++ b/Source/cmQtAutoGenerators.h @@ -112,6 +112,9 @@ private: const std::string& fileName, const std::string& contentText, std::map<std::string, std::vector<std::string>>& includedUis); + std::string MocMacroNamesString() const; + std::string MocHeaderSuffixesString() const; + bool MocParseSourceContent( const std::string& absFilename, const std::string& contentText, std::map<std::string, std::string>& mocsIncluded, @@ -146,15 +149,29 @@ private: bool RccGenerateAll(); bool RccGenerateFile(const RccJob& rccJob); - // -- Logging - void LogErrorNameCollision( - const std::string& message, - const std::multimap<std::string, std::string>& collisions) const; + // -- Log info void LogBold(const std::string& message) const; - void LogInfo(const std::string& message) const; - void LogWarning(const std::string& message) const; - void LogError(const std::string& message) const; - void LogCommand(const std::vector<std::string>& command) const; + void LogInfo(cmQtAutoGen::GeneratorType genType, + const std::string& message) const; + // -- Log warning + void LogWarning(cmQtAutoGen::GeneratorType genType, + const std::string& message) const; + void LogFileWarning(cmQtAutoGen::GeneratorType genType, + const std::string& filename, + const std::string& message) const; + // -- Log error + void LogError(cmQtAutoGen::GeneratorType genType, + const std::string& message) const; + void LogFileError(cmQtAutoGen::GeneratorType genType, + const std::string& filename, + const std::string& message) const; + void LogCommandError(cmQtAutoGen::GeneratorType genType, + const std::string& message, + const std::vector<std::string>& command, + const std::string& output) const; + void LogNameCollisionError( + cmQtAutoGen::GeneratorType genType, const std::string& message, + const std::multimap<std::string, std::string>& collisions) const; // -- Utility bool NameCollisionTest( @@ -169,8 +186,8 @@ private: bool FileWrite(cmQtAutoGen::GeneratorType genType, const std::string& filename, const std::string& content); - bool RunCommand(const std::vector<std::string>& command, std::string& output, - bool verbose = true) const; + bool RunCommand(const std::vector<std::string>& command, + std::string& output) const; bool FindHeader(std::string& header, const std::string& testBasePath) const; |