forked from qt-creator/qt-creator
Win: Add comparison operator to MSVC and WinCE tool chain
The comparison operator on the abstractmsvctoolchain is not enough. Change-Id: I5d8db422d4a996e561a25dc754a9eba151b75ff1 Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
@@ -648,6 +648,14 @@ QPair<Utils::FileName, Utils::FileName> MsvcToolChain::autoDetectCdbDebugger()
|
||||
return result;
|
||||
}
|
||||
|
||||
bool MsvcToolChain::operator ==(const ToolChain &other) const
|
||||
{
|
||||
if (!AbstractMsvcToolChain::operator ==(other))
|
||||
return false;
|
||||
const MsvcToolChain *msvcTc = static_cast<const MsvcToolChain *>(&other);
|
||||
return m_varsBatArg == msvcTc->m_varsBatArg;
|
||||
}
|
||||
|
||||
bool MsvcToolChainFactory::canRestore(const QVariantMap &data)
|
||||
{
|
||||
return idFromMap(data).startsWith(QLatin1String(Constants::MSVC_TOOLCHAIN_ID) + QLatin1Char(':'));
|
||||
|
@@ -74,6 +74,8 @@ public:
|
||||
|
||||
static QPair<Utils::FileName, Utils::FileName> autoDetectCdbDebugger();
|
||||
|
||||
bool operator == (const ToolChain &) const;
|
||||
|
||||
protected:
|
||||
Utils::Environment readEnvironmentSetting(Utils::Environment& env) const;
|
||||
QByteArray msvcPredefinedMacros(const Utils::Environment &env) const;
|
||||
|
@@ -461,6 +461,15 @@ bool WinCEToolChainFactory::canRestore(const QVariantMap &data)
|
||||
return idFromMap(data).startsWith(QLatin1String(Constants::WINCE_TOOLCHAIN_ID) + QLatin1Char(':'));
|
||||
}
|
||||
|
||||
bool WinCEToolChain::operator ==(const ToolChain &other) const
|
||||
{
|
||||
if (!AbstractMsvcToolChain::operator ==(other))
|
||||
return false;
|
||||
|
||||
const WinCEToolChain *ceTc = static_cast<const WinCEToolChain *>(&other);
|
||||
return m_ceVer == ceTc->m_ceVer;
|
||||
}
|
||||
|
||||
ToolChain *WinCEToolChainFactory::restore(const QVariantMap &data)
|
||||
{
|
||||
return WinCEToolChain::readFromMap(data);
|
||||
|
@@ -76,6 +76,7 @@ public:
|
||||
|
||||
static QString autoDetectCdbDebugger(QStringList *checkedDirectories = 0);
|
||||
|
||||
bool operator ==(const ToolChain &other) const;
|
||||
protected:
|
||||
Utils::Environment readEnvironmentSetting(Utils::Environment& env) const;
|
||||
|
||||
|
Reference in New Issue
Block a user