forked from qt-creator/qt-creator
BuildInfo: Fix operator == to work better with subtypes
Different buildconfigurationfactories will always return different BuildInfo, as the factories will turn the information into a different set of objects (even if the information those objects are created from are identical). Each factory will always produce the same (sub-)type of BuildInfo, as they need that information to proceed. So using the factory-address as a kind of type-identifier is save. Change-Id: Ia30355c26e045d453c0c2b75da893a4bac38b048 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
@@ -177,4 +177,10 @@ QString CMakeConfigItem::toString() const
|
||||
return QString::fromUtf8(key) + QLatin1Char(':') + typeStr + QLatin1Char('=') + QString::fromUtf8(value);
|
||||
}
|
||||
|
||||
bool CMakeConfigItem::operator==(const CMakeConfigItem &o) const
|
||||
{
|
||||
// type, isAdvanced and documentation do not matter for a match!
|
||||
return o.key == key && o.value == value;
|
||||
}
|
||||
|
||||
} // namespace CMakeProjectManager
|
||||
|
||||
Reference in New Issue
Block a user