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:
Tobias Hunger
2016-08-25 12:47:39 +02:00
parent 32468cf0ec
commit b5c3b3159c
5 changed files with 29 additions and 6 deletions

View File

@@ -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