summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerator.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-04-06 10:27:08 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-04-06 15:37:12 (GMT)
commit95e72c0157ecd9c603fc541fa7e9fa246b777969 (patch)
tree9c74c3856b75c7389c6fe89149af090fe14cf9dd /Source/cmQtAutoGenerator.cxx
parentf161cfe5a8fa00d6d203885e9c1985ec53d7d625 (diff)
downloadCMake-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.cxx')
-rw-r--r--Source/cmQtAutoGenerator.cxx48
1 files changed, 4 insertions, 44 deletions
diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx
index c1e6aab..83a00cf 100644
--- a/Source/cmQtAutoGenerator.cxx
+++ b/Source/cmQtAutoGenerator.cxx
@@ -261,6 +261,10 @@ bool cmQtAutoGenerator::FileWrite(std::string const& filename,
}();
}
+cmQtAutoGenerator::FileSystem::FileSystem() = default;
+
+cmQtAutoGenerator::FileSystem::~FileSystem() = default;
+
std::string cmQtAutoGenerator::FileSystem::GetRealPath(
std::string const& filename)
{
@@ -380,18 +384,6 @@ bool cmQtAutoGenerator::FileSystem::FileRead(std::string& content,
return cmQtAutoGenerator::FileRead(content, filename, error);
}
-bool cmQtAutoGenerator::FileSystem::FileRead(GenT genType,
- std::string& content,
- std::string const& filename)
-{
- std::string error;
- if (!FileRead(content, filename, &error)) {
- Log()->ErrorFile(genType, filename, error);
- return false;
- }
- return true;
-}
-
bool cmQtAutoGenerator::FileSystem::FileWrite(std::string const& filename,
std::string const& content,
std::string* error)
@@ -400,18 +392,6 @@ bool cmQtAutoGenerator::FileSystem::FileWrite(std::string const& filename,
return cmQtAutoGenerator::FileWrite(filename, content, error);
}
-bool cmQtAutoGenerator::FileSystem::FileWrite(GenT genType,
- std::string const& filename,
- std::string const& content)
-{
- std::string error;
- if (!FileWrite(filename, content, &error)) {
- Log()->ErrorFile(genType, filename, error);
- return false;
- }
- return true;
-}
-
bool cmQtAutoGenerator::FileSystem::FileDiffers(std::string const& filename,
std::string const& content)
{
@@ -444,16 +424,6 @@ bool cmQtAutoGenerator::FileSystem::MakeDirectory(std::string const& dirname)
return cmSystemTools::MakeDirectory(dirname);
}
-bool cmQtAutoGenerator::FileSystem::MakeDirectory(GenT genType,
- std::string const& dirname)
-{
- if (!MakeDirectory(dirname)) {
- Log()->ErrorFile(genType, dirname, "Could not create directory");
- return false;
- }
- return true;
-}
-
bool cmQtAutoGenerator::FileSystem::MakeParentDirectory(
std::string const& filename)
{
@@ -461,16 +431,6 @@ bool cmQtAutoGenerator::FileSystem::MakeParentDirectory(
return cmQtAutoGenerator::MakeParentDirectory(filename);
}
-bool cmQtAutoGenerator::FileSystem::MakeParentDirectory(
- GenT genType, std::string const& filename)
-{
- if (!MakeParentDirectory(filename)) {
- Log()->ErrorFile(genType, filename, "Could not create parent directory");
- return false;
- }
- return true;
-}
-
int cmQtAutoGenerator::ReadOnlyProcessT::PipeT::init(uv_loop_t* uv_loop,
ReadOnlyProcessT* process)
{