QtSupport: Prevent misleading message about ABI mismatch

MSVC 2015/17/19 are ABI compatible, but BaseQtVersion::validateKit()
would emit a warning when using e.g. a Qt MSVC 2017 build with an MSVC
2019 toolchain.

Change-Id: I50ba026ae7b55e052b26826076ef962f369a05a1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Christian Kandeler
2020-02-27 13:15:30 +01:00
parent 171ad62aed
commit bd03041428
3 changed files with 8 additions and 1 deletions

View File

@@ -666,6 +666,12 @@ bool Abi::isCompatibleWith(const Abi &other) const
return isCompat;
}
bool Abi::isFullyCompatibleWith(const Abi &other) const
{
return *this == other || (wordWidth() == other.wordWidth()
&& compatibleMSVCFlavors(osFlavor(), other.osFlavor()));
}
bool Abi::isValid() const
{
return m_architecture != UnknownArchitecture

View File

@@ -134,6 +134,7 @@ public:
bool operator != (const Abi &other) const;
bool operator == (const Abi &other) const;
bool isCompatibleWith(const Abi &other) const;
bool isFullyCompatibleWith(const Abi &other) const;
bool isValid() const;
bool isNull() const;

View File

@@ -523,7 +523,7 @@ Tasks BaseQtVersion::validateKit(const Kit *k)
qtAbiString.append(qtAbi.toString());
if (!fullMatch)
fullMatch = (targetAbi == qtAbi);
fullMatch = targetAbi.isFullyCompatibleWith(qtAbi);
if (!fuzzyMatch)
fuzzyMatch = targetAbi.isCompatibleWith(qtAbi);
}