Improve kit auto-detection

The old code was too simplistic: Basically, we just took a random
toolchain, slapped a random Qt onto it and made that the default kit.
Instead, we now go through all toolchains, try to find a matching Qt
version, debugger etc and create a kit for that combination unless there
is a better one.

Fixes: QTCREATORBUG-22138
Change-Id: Ib57ca4453a93ee9253c75398328c3bca33087dc6
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2019-03-14 18:07:56 +01:00
parent a2c7257c9b
commit e94f5b496e
7 changed files with 125 additions and 19 deletions

View File

@@ -626,8 +626,10 @@ bool Abi::isCompatibleWith(const Abi &other) const
if (isCompat && (osFlavor() == AndroidLinuxFlavor || other.osFlavor() == AndroidLinuxFlavor))
isCompat = (architecture() == other.architecture()) && (osFlavor() == other.osFlavor());
if (!isCompat && compatibleMSVCFlavors(osFlavor(), other.osFlavor()))
if (!isCompat && wordWidth() == other.wordWidth()
&& compatibleMSVCFlavors(osFlavor(), other.osFlavor())) {
isCompat = true;
}
return isCompat;
}