From c9b6b5d4fda410932f96a1ae89505bf6d685f1d1 Mon Sep 17 00:00:00 2001 From: David Schulz Date: Tue, 10 Aug 2021 12:54:11 +0200 Subject: [PATCH] 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 --- src/plugins/qtsupport/qtkitinformation.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/qtsupport/qtkitinformation.cpp b/src/plugins/qtsupport/qtkitinformation.cpp index f7614bdb2ef..54f61ec5912 100644 --- a/src/plugins/qtsupport/qtkitinformation.cpp +++ b/src/plugins/qtsupport/qtkitinformation.cpp @@ -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);