Utils: Simplify part of OutputLineParser::absoluteFilePath

Change-Id: I65be5e622b2a2bde8cbd25c8642c87f889ee5bdd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
hjk
2023-01-12 13:43:54 +01:00
parent 21ef25a0f5
commit 7c35363cda

View File

@@ -115,13 +115,13 @@ FilePath OutputLineParser::absoluteFilePath(const FilePath &filePath) const
{
if (filePath.isEmpty())
return filePath;
if (filePath.toFileInfo().isAbsolute())
if (filePath.isAbsolutePath())
return filePath.cleanPath();
FilePaths candidates;
for (const FilePath &dir : searchDirectories()) {
FilePath candidate = dir.pathAppended(filePath.toString());
FilePath candidate = dir.resolvePath(filePath);
if (candidate.exists() || d->skipFileExistsCheck) {
candidate = FilePath::fromString(QDir::cleanPath(candidate.toString()));
candidate = candidate.cleanPath();
if (!candidates.contains(candidate))
candidates << candidate;
}