forked from qt-creator/qt-creator
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user