diff --git a/src/plugins/projectexplorer/msvctoolchain.cpp b/src/plugins/projectexplorer/msvctoolchain.cpp index 543aaec3ef8..26e5e3818d6 100644 --- a/src/plugins/projectexplorer/msvctoolchain.cpp +++ b/src/plugins/projectexplorer/msvctoolchain.cpp @@ -648,6 +648,14 @@ QPair MsvcToolChain::autoDetectCdbDebugger() return result; } +bool MsvcToolChain::operator ==(const ToolChain &other) const +{ + if (!AbstractMsvcToolChain::operator ==(other)) + return false; + const MsvcToolChain *msvcTc = static_cast(&other); + return m_varsBatArg == msvcTc->m_varsBatArg; +} + bool MsvcToolChainFactory::canRestore(const QVariantMap &data) { return idFromMap(data).startsWith(QLatin1String(Constants::MSVC_TOOLCHAIN_ID) + QLatin1Char(':')); diff --git a/src/plugins/projectexplorer/msvctoolchain.h b/src/plugins/projectexplorer/msvctoolchain.h index bc51c189d4b..3ecd49eb516 100644 --- a/src/plugins/projectexplorer/msvctoolchain.h +++ b/src/plugins/projectexplorer/msvctoolchain.h @@ -74,6 +74,8 @@ public: static QPair autoDetectCdbDebugger(); + bool operator == (const ToolChain &) const; + protected: Utils::Environment readEnvironmentSetting(Utils::Environment& env) const; QByteArray msvcPredefinedMacros(const Utils::Environment &env) const; diff --git a/src/plugins/projectexplorer/wincetoolchain.cpp b/src/plugins/projectexplorer/wincetoolchain.cpp index a3f86c40190..87a2d834e7e 100644 --- a/src/plugins/projectexplorer/wincetoolchain.cpp +++ b/src/plugins/projectexplorer/wincetoolchain.cpp @@ -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(&other); + return m_ceVer == ceTc->m_ceVer; +} + ToolChain *WinCEToolChainFactory::restore(const QVariantMap &data) { return WinCEToolChain::readFromMap(data); diff --git a/src/plugins/projectexplorer/wincetoolchain.h b/src/plugins/projectexplorer/wincetoolchain.h index 836c85f79c6..603c86d2a14 100644 --- a/src/plugins/projectexplorer/wincetoolchain.h +++ b/src/plugins/projectexplorer/wincetoolchain.h @@ -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;