ProjectExplorer: (Re-)start using strings for mkspecs

Even if this is part of a directory name it is naturally closer to a
"string" id than a file path.

Change-Id: If66f930526744379ce86e2b18bd9eac7fabfe773
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-05-27 14:22:15 +02:00
parent 774d2063d0
commit cc877949ca
15 changed files with 93 additions and 118 deletions

View File

@@ -123,7 +123,7 @@ void QmakeKitAspect::setup(Kit *k)
ToolChain *tc = ToolChainKitAspect::toolChain(k, ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (!tc || (!tc->suggestedMkspecList().empty() && !tc->suggestedMkspecList().contains(spec))) {
if (!tc || (!tc->suggestedMkspecList().empty() && !tc->suggestedMkspecList().contains(spec.toString()))) {
const QList<ToolChain *> possibleTcs = ToolChainManager::toolChains(
[version](const ToolChain *t) {
return t->isValid()
@@ -133,7 +133,7 @@ void QmakeKitAspect::setup(Kit *k)
if (!possibleTcs.isEmpty()) {
const QList<ToolChain *> goodTcs = Utils::filtered(possibleTcs,
[&spec](const ToolChain *t) {
return t->suggestedMkspecList().contains(spec);
return t->suggestedMkspecList().contains(spec.toString());
});
// Hack to prefer a tool chain from PATH (e.g. autodetected) over other matches.
// This improves the situation a bit if a cross-compilation tool chain has the