diff options
author | David Schulz <david.schulz@qt.io> | 2021-08-10 12:54:11 +0200 |
---|---|---|
committer | David Schulz <david.schulz@qt.io> | 2021-08-11 13:53:39 +0000 |
commit | c9b6b5d4fda410932f96a1ae89505bf6d685f1d1 (patch) | |
tree | fc231e500ff98a50e555c82e3bcd652f7b774552 | |
parent | 04c42db0ad8115d1abd8efec85fb183a14b01698 (diff) |
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>
-rw-r--r-- | src/plugins/qtsupport/qtkitinformation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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); |