diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-09-09 15:04:51 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-09-16 16:18:48 (GMT) |
commit | f9e5441eb43d3238211685cded447141082e37b8 (patch) | |
tree | a4332235879289fc5e23e64e6c37988d0d632b26 /Source/cmQtAutoMocUic.h | |
parent | 51676cf65590f7a9bc3ad247151ee5bdc768eb77 (diff) | |
download | CMake-f9e5441eb43d3238211685cded447141082e37b8.zip CMake-f9e5441eb43d3238211685cded447141082e37b8.tar.gz CMake-f9e5441eb43d3238211685cded447141082e37b8.tar.bz2 |
Autogen: Abbreviate file paths in messages
This introduces the `cmQtAutoGenerator::MessagePath` method, that abbreviates
paths by placing a
- "SRC:" prefix in place of the project source directory
- "BIN:" prefix in place of the project binary directory
The method is used in `AUTO{MOC,UIC,RCC}` when paths are displayed in
messages. This makes the messages generated by `AUTO{MOC,UIC,RCC}` shorter
and improves their readability.
Diffstat (limited to 'Source/cmQtAutoMocUic.h')
-rw-r--r-- | Source/cmQtAutoMocUic.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/cmQtAutoMocUic.h b/Source/cmQtAutoMocUic.h index e480751..d77e774 100644 --- a/Source/cmQtAutoMocUic.h +++ b/Source/cmQtAutoMocUic.h @@ -169,10 +169,6 @@ public: bool MultiConfig = false; unsigned int QtVersionMajor = 4; // - Directories - std::string ProjectSourceDir; - std::string ProjectBinaryDir; - std::string CurrentSourceDir; - std::string CurrentBinaryDir; std::string AutogenBuildDir; std::string AutogenIncludeDir; // - Files @@ -218,7 +214,6 @@ public: cmFileTime ExecutableTime; std::string Executable; std::string CompFileAbs; - std::string PredefsFileRel; std::string PredefsFileAbs; std::unordered_set<std::string> SkipList; std::vector<std::string> IncludePaths; @@ -313,10 +308,13 @@ public: UicSettingsT const& UicConst() const { return Gen()->UicConst(); } UicEvalT& UicEval() const { return Gen()->UicEval(); } - // -- Error logging with automatic abort + // -- Logging + std::string MessagePath(cm::string_view path) const + { + return Gen()->MessagePath(path); + } + // - Error logging with automatic abort void LogError(GenT genType, cm::string_view message) const; - void LogFileError(GenT genType, cm::string_view filename, - cm::string_view message) const; void LogCommandError(GenT genType, cm::string_view message, std::vector<std::string> const& command, std::string const& output) const; |