Utils: Avoid a use of FilePath::toFileInfo() in FileInProjectFinder

Doesn't work with remote files.

Change-Id: I04a837013520f4f872599d0bb957c6da7ad9bf02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2021-07-14 15:31:22 +02:00
parent 426f8185c2
commit 86149d9299

View File

@@ -88,9 +88,8 @@ void FileInProjectFinder::setProjectDirectory(const FilePath &absoluteProjectPat
if (absoluteProjectPath == m_projectDir) if (absoluteProjectPath == m_projectDir)
return; return;
const QFileInfo infoPath = absoluteProjectPath.toFileInfo();
QTC_CHECK(absoluteProjectPath.isEmpty() QTC_CHECK(absoluteProjectPath.isEmpty()
|| (infoPath.exists() && infoPath.isAbsolute())); || (absoluteProjectPath.exists() && absoluteProjectPath.isAbsolutePath()));
m_projectDir = absoluteProjectPath; m_projectDir = absoluteProjectPath;
m_cache.clear(); m_cache.clear();