diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-04-06 10:27:08 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-04-06 15:37:12 (GMT) |
commit | 95e72c0157ecd9c603fc541fa7e9fa246b777969 (patch) | |
tree | 9c74c3856b75c7389c6fe89149af090fe14cf9dd /Source/cmQtAutoGenerator.h | |
parent | f161cfe5a8fa00d6d203885e9c1985ec53d7d625 (diff) | |
download | CMake-95e72c0157ecd9c603fc541fa7e9fa246b777969.zip CMake-95e72c0157ecd9c603fc541fa7e9fa246b777969.tar.gz CMake-95e72c0157ecd9c603fc541fa7e9fa246b777969.tar.bz2 |
Autogen: Make cmQtAutoGenerator::FileSystem Logger free
`cmQtAutoGenerator::FileSystem` used to have a reference to a
`cmQtAutoGenerator::Logger` instances. This was used for utility methods
that automatically generated an error message on demand. Unfortunately this
resulted in double error messages in some places. To fix these and with
the additional purpose of removing the dependency of
`cmQtAutoGenerator::FileSystem` to `cmQtAutoGenerator::Logger`, this patch
removes the `Logger` reference in `cmQtAutoGenerator::FileSystem`.
In the process some silent error conditions gained error messages and
some existing error messages were extended.
Diffstat (limited to 'Source/cmQtAutoGenerator.h')
-rw-r--r-- | Source/cmQtAutoGenerator.h | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/Source/cmQtAutoGenerator.h b/Source/cmQtAutoGenerator.h index 2993946..862b18d 100644 --- a/Source/cmQtAutoGenerator.h +++ b/Source/cmQtAutoGenerator.h @@ -78,13 +78,8 @@ public: class FileSystem { public: - FileSystem(Logger* log) - : Log_(log) - { - } - - /// @brief Logger - Logger* Log() const { return Log_; } + FileSystem(); + ~FileSystem(); // -- Paths /// @brief Wrapper for cmSystemTools::GetRealPath @@ -125,15 +120,9 @@ public: bool FileRead(std::string& content, std::string const& filename, std::string* error = nullptr); - /// @brief Error logging version - bool FileRead(GenT genType, std::string& content, - std::string const& filename); bool FileWrite(std::string const& filename, std::string const& content, std::string* error = nullptr); - /// @brief Error logging version - bool FileWrite(GenT genType, std::string const& filename, - std::string const& content); bool FileDiffers(std::string const& filename, std::string const& content); @@ -142,17 +131,11 @@ public: // -- Directory access bool MakeDirectory(std::string const& dirname); - /// @brief Error logging version - bool MakeDirectory(GenT genType, std::string const& dirname); - bool MakeParentDirectory(std::string const& filename); - /// @brief Error logging version - bool MakeParentDirectory(GenT genType, std::string const& filename); private: std::mutex Mutex_; cmFilePathChecksum FilePathChecksum_; - Logger* Log_; }; /// @brief Return value and output of an external process |