QtSupport: use preferred toolchain when fixing kits

currently we use the least preferred toolchain when looking
through all possible toolchains

Change-Id: I520a21bf380c4d1550a62dd9174fd2b67e12bc8e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
David Schulz
2021-08-10 12:54:11 +02:00
parent 04c42db0ad
commit c9b6b5d4fd

View File

@@ -252,7 +252,7 @@ void QtKitAspect::fix(Kit *k)
return systemEnvironment.path().contains(t->compilerCommand().parentDir());
});
if (!bestTc) {
bestTc = goodTcs.isEmpty() ? possibleTcs.last() : goodTcs.last();
bestTc = goodTcs.isEmpty() ? possibleTcs.first() : goodTcs.first();
}
if (bestTc)
ToolChainKitAspect::setAllToolChainsToMatch(k, bestTc);