QmakeProjectManager: Remove bogus condition from importer

Fixes: QTCREATORBUG-18150
Change-Id: If9c7aaa7745b9cd0ef57d3ecd71308ffb2991c48
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Christian Kandeler
2023-09-25 13:34:54 +02:00
parent cd94514dbb
commit e374f809ad

View File

@@ -61,11 +61,7 @@ QmakeProjectImporter::QmakeProjectImporter(const FilePath &path) :
FilePaths QmakeProjectImporter::importCandidates()
{
FilePaths candidates;
const FilePath pfp = projectFilePath();
const QString prefix = pfp.baseName();
candidates << pfp.absolutePath();
FilePaths candidates{projectFilePath().absolutePath()};
for (Kit *k : KitManager::kits()) {
const FilePath sbdir = QmakeBuildConfiguration::shadowBuildDirectory
@@ -73,7 +69,7 @@ FilePaths QmakeProjectImporter::importCandidates()
const FilePath baseDir = sbdir.absolutePath();
for (const FilePath &path : baseDir.dirEntries(QDir::Dirs | QDir::NoDotAndDotDot)) {
if (path.fileName().startsWith(prefix) && !candidates.contains(path))
if (!candidates.contains(path))
candidates << path;
}
}