Autogen: Protected calls to cmSystemTools::CollapseCombinedPath
This commit is contained in:
parent
61fd4c7420
commit
14a86c9ea7
@ -146,13 +146,20 @@ void cmQtAutoGenerator::Logger::ErrorCommand(
|
||||
}
|
||||
}
|
||||
|
||||
std::string cmQtAutoGenerator::FileSystem::RealPath(
|
||||
std::string cmQtAutoGenerator::FileSystem::GetRealPath(
|
||||
std::string const& filename)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(Mutex_);
|
||||
return cmSystemTools::GetRealPath(filename);
|
||||
}
|
||||
|
||||
std::string cmQtAutoGenerator::FileSystem::CollapseCombinedPath(
|
||||
std::string const& dir, std::string const& file)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(Mutex_);
|
||||
return cmSystemTools::CollapseCombinedPath(dir, file);
|
||||
}
|
||||
|
||||
bool cmQtAutoGenerator::FileSystem::FileExists(std::string const& filename)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(Mutex_);
|
||||
|
@ -68,8 +68,17 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
/// @brief Logger
|
||||
Logger* Log() const { return Log_; }
|
||||
std::string RealPath(std::string const& filename);
|
||||
|
||||
// -- Paths
|
||||
/// @brief Wrapper for cmSystemTools::GetRealPath
|
||||
std::string GetRealPath(std::string const& filename);
|
||||
/// @brief Wrapper for cmSystemTools::CollapseCombinedPath
|
||||
std::string CollapseCombinedPath(std::string const& dir,
|
||||
std::string const& file);
|
||||
|
||||
// -- File access
|
||||
bool FileExists(std::string const& filename);
|
||||
bool FileIsOlderThan(std::string const& buildFile,
|
||||
std::string const& sourceFile,
|
||||
@ -92,6 +101,7 @@ public:
|
||||
bool FileRemove(std::string const& filename);
|
||||
bool Touch(std::string const& filename);
|
||||
|
||||
// -- Directory access
|
||||
bool MakeDirectory(std::string const& dirname);
|
||||
/// @brief Error logging version
|
||||
bool MakeDirectory(GeneratorT genType, std::string const& dirname);
|
||||
|
@ -26,7 +26,7 @@
|
||||
std::string cmQtAutoGeneratorMocUic::BaseSettingsT::AbsoluteBuildPath(
|
||||
std::string const& relativePath) const
|
||||
{
|
||||
return cmSystemTools::CollapseCombinedPath(AutogenBuildDir, relativePath);
|
||||
return FileSys->CollapseCombinedPath(AutogenBuildDir, relativePath);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -106,7 +106,7 @@ std::string cmQtAutoGeneratorMocUic::MocSettingsT::FindIncludedFile(
|
||||
std::string testPath = sourcePath;
|
||||
testPath += includeString;
|
||||
if (FileSys->FileExists(testPath)) {
|
||||
return FileSys->RealPath(testPath);
|
||||
return FileSys->GetRealPath(testPath);
|
||||
}
|
||||
}
|
||||
// Search in include directories
|
||||
@ -115,7 +115,7 @@ std::string cmQtAutoGeneratorMocUic::MocSettingsT::FindIncludedFile(
|
||||
fullPath.push_back('/');
|
||||
fullPath += includeString;
|
||||
if (FileSys->FileExists(fullPath)) {
|
||||
return FileSys->RealPath(fullPath);
|
||||
return FileSys->GetRealPath(fullPath);
|
||||
}
|
||||
}
|
||||
// Return empty string
|
||||
@ -487,7 +487,7 @@ std::string cmQtAutoGeneratorMocUic::JobParseT::MocFindIncludedHeader(
|
||||
}
|
||||
// Sanitize
|
||||
if (!header.empty()) {
|
||||
header = wrk.FileSys().RealPath(header);
|
||||
header = wrk.FileSys().GetRealPath(header);
|
||||
}
|
||||
return header;
|
||||
}
|
||||
@ -569,7 +569,7 @@ std::string cmQtAutoGeneratorMocUic::JobParseT::UicFindIncludedFile(
|
||||
// Search for the .ui file!
|
||||
for (std::string const& testFile : testFiles) {
|
||||
if (wrk.FileSys().FileExists(testFile)) {
|
||||
res = wrk.FileSys().RealPath(testFile);
|
||||
res = wrk.FileSys().GetRealPath(testFile);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user