forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user