Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 6.0.2
-
None
-
-
fa071d03cc (qt-creator/qt-creator/7.0) fa071d03cc (qt-creator/qt-creator/master) fa071d03cc (qt-creator/tqtc-qt-creator/7.0) fa071d03cc (qt-creator/tqtc-qt-creator/master) fa071d03cc (qt-creator/tqtc-qt-creator/qds-3.1)
Description
findCompilerCandidates modifies nameFilters and assigns result to same variable in a loop for each path in searchPaths
nameFilters = transform(nameFilters, [](const QString &baseName) { return HostOsInfo::withExecutableSuffix(baseName); });
so for nth path namefilters become something like
("clang++.exe.exe.exe.exe.exe.exe.exe.exe", "clang++-[1-9]*.exe.exe.exe.exe.exe.exe.exe.exe", "*-clang++.exe.exe.exe.exe.exe.exe.exe.exe", "*-clang++-[1-9]*.exe.exe.exe.exe.exe.exe.exe.exe", "*-*-*-clang++.exe.exe.exe.exe.exe.exe.exe.exe", "*-*-*-clang++-[1-9]*.exe.exe.exe.exe.exe.exe.exe.exe", "*-*-*-*-clang++.exe.exe.exe.exe.exe.exe.exe.exe", "*-*-*-*-clang++-[1-9]*.exe.exe.exe.exe.exe.exe.exe.exe")
as a sesult
binDir.entryList(nameFilters, QDir::Files | QDir::Executable);
returns empty list instead of detected compiler.
This bug can be easily fixed by adding temporary variable or by moving transformation out of the loop. Patch in attachement.