diff options
author | hjk <hjk@qt.io> | 2022-11-30 13:41:49 +0100 |
---|---|---|
committer | hjk <hjk@qt.io> | 2022-11-30 13:32:05 +0000 |
commit | 7e9d50a2c935d7487a1f01cc39caafa4daa7ef58 (patch) | |
tree | a4769fa230d2839a35f9725a2958bed2aa85712f | |
parent | 76804a08397aa36bee0f2448ba981ed2f9c8cc3f (diff) |
Remove a few now-unnecessary cleanPath in conjunction with resolvePath
Change-Id: I05ee0116183a30e907fbd8e0b4faae9e6e58723d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
-rw-r--r-- | src/libs/utils/filepath.cpp | 3 | ||||
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp | 3 | ||||
-rw-r--r-- | src/plugins/cmakeprojectmanager/fileapidataextractor.cpp | 6 | ||||
-rw-r--r-- | src/plugins/cmakeprojectmanager/fileapiparser.cpp | 4 | ||||
-rw-r--r-- | src/plugins/qmakeprojectmanager/makefileparse.cpp | 2 |
5 files changed, 8 insertions, 10 deletions
diff --git a/src/libs/utils/filepath.cpp b/src/libs/utils/filepath.cpp index 13aa1b3f6b..79d9bb5d3e 100644 --- a/src/libs/utils/filepath.cpp +++ b/src/libs/utils/filepath.cpp @@ -1559,8 +1559,7 @@ FilePath FilePath::resolvePath(const FilePath &tail) const */ FilePath FilePath::resolvePath(const QString &tail) const { - FilePath tailPath = FilePath::fromString(doCleanPath(tail)); - return resolvePath(tailPath); + return resolvePath(FilePath::fromString(tail)); } // Cleans path part similar to QDir::cleanPath() diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index 8a05bd2bfb..823f091e6c 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -306,8 +306,7 @@ FilePaths CMakeBuildSystem::filesGeneratedFrom(const FilePath &sourceFile) const if (sourceFile.suffix() == "ui") { generatedFilePath = generatedFilePath - .pathAppended("ui_" + sourceFile.completeBaseName() + ".h") - .cleanPath(); + .pathAppended("ui_" + sourceFile.completeBaseName() + ".h"); return {generatedFilePath}; } if (sourceFile.suffix() == "scxml") { diff --git a/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp b/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp index da791d5164..be182ec43a 100644 --- a/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp +++ b/src/plugins/cmakeprojectmanager/fileapidataextractor.cpp @@ -464,7 +464,7 @@ FilePath directorySourceDir(const Configuration &c, const FilePath &sourceDir, i const size_t di = static_cast<size_t>(directoryIndex); QTC_ASSERT(di < c.directories.size(), return FilePath()); - return sourceDir.resolvePath(c.directories[di].sourcePath).cleanPath(); + return sourceDir.resolvePath(c.directories[di].sourcePath); } FilePath directoryBuildDir(const Configuration &c, const FilePath &buildDir, int directoryIndex) @@ -472,7 +472,7 @@ FilePath directoryBuildDir(const Configuration &c, const FilePath &buildDir, int const size_t di = static_cast<size_t>(directoryIndex); QTC_ASSERT(di < c.directories.size(), return FilePath()); - return buildDir.resolvePath(c.directories[di].buildPath).cleanPath(); + return buildDir.resolvePath(c.directories[di].buildPath); } void addProjects(const QHash<Utils::FilePath, ProjectNode *> &cmakeListsNodes, @@ -542,7 +542,7 @@ void addCompileGroups(ProjectNode *targetRoot, std::vector<std::vector<std::unique_ptr<FileNode>>> sourceGroupFileNodes{td.sourceGroups.size()}; for (const SourceInfo &si : td.sources) { - const FilePath sourcePath = topSourceDirectory.resolvePath(si.path).cleanPath(); + const FilePath sourcePath = topSourceDirectory.resolvePath(si.path); // Filter out already known files: const int count = alreadyListed.count(); diff --git a/src/plugins/cmakeprojectmanager/fileapiparser.cpp b/src/plugins/cmakeprojectmanager/fileapiparser.cpp index 0d6eefe634..4bd91cfbe2 100644 --- a/src/plugins/cmakeprojectmanager/fileapiparser.cpp +++ b/src/plugins/cmakeprojectmanager/fileapiparser.cpp @@ -919,9 +919,9 @@ FilePath FileApiParser::scanForCMakeReplyFile(const FilePath &buildDirectory) FilePaths FileApiParser::cmakeQueryFilePaths(const FilePath &buildDirectory) { - FilePath queryDir = buildDirectory / CMAKE_RELATIVE_QUERY_PATH; + const FilePath queryDir = buildDirectory / CMAKE_RELATIVE_QUERY_PATH; return transform(CMAKE_QUERY_FILENAMES, [&queryDir](const QString &name) { - return queryDir.resolvePath(FilePath::fromString(name)); + return queryDir.resolvePath(name); }); } diff --git a/src/plugins/qmakeprojectmanager/makefileparse.cpp b/src/plugins/qmakeprojectmanager/makefileparse.cpp index bd0f8f657f..c24450a510 100644 --- a/src/plugins/qmakeprojectmanager/makefileparse.cpp +++ b/src/plugins/qmakeprojectmanager/makefileparse.cpp @@ -252,7 +252,7 @@ MakeFileParse::MakeFileParse(const FilePath &makefile, Mode mode) : m_mode(mode) project = project.trimmed(); // Src Pro file - m_srcProFile = makefile.parentDir().resolvePath(project).cleanPath(); + m_srcProFile = makefile.parentDir().resolvePath(project); qCDebug(logging()) << " source .pro file:" << m_srcProFile; QString command = findQMakeLine(makefile, QLatin1String("# Command:")).trimmed(); |