refs #413 Decomposed hash-related functions of CValueObject into Mixin::HashByTuple.

This commit is contained in:
Mathew Sutcliffe
2015-04-29 01:31:19 +01:00
parent d9faa031d2
commit 2f55caf7c6
11 changed files with 67 additions and 35 deletions

View File

@@ -279,10 +279,10 @@ namespace BlackMisc
//! Unequal operator !=
bool operator != (const CMeasurementUnit &other) const;
//! \copydoc CValueObject::getValueHash
virtual uint getValueHash() const override
//! \copydoc CValueObject::qHash
friend uint qHash(const CMeasurementUnit &unit)
{
return qHash(this->getName());
return ::qHash(unit.getName());
}
//! Name such as "meter"

View File

@@ -198,8 +198,11 @@ namespace BlackMisc
//! \copydoc CValueObject::unmarshallFromDbus
virtual void unmarshallFromDbus(const QDBusArgument &argument) override;
//! \copydoc CValueObject::getValueHash
virtual uint getValueHash() const override;
//! \copydoc CValueObject::qHash
uint getValueHash() const;
//! \copydoc CValueObject::qHash
friend uint qHash(const PQ &pq) { return pq.getValueHash(); };
//! \copydoc CValueObject::toJson
virtual QJsonObject toJson() const override;