mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-11 23:05:34 +08:00
using hashes to perform comparisons between blackmisc value objects stored inside of QVariant
refs #81
This commit is contained in:
committed by
Mathew Sutcliffe
parent
67a5dbfe48
commit
a280d239e6
@@ -16,6 +16,7 @@
|
||||
#include <QDebug>
|
||||
#include <QSharedData>
|
||||
#include <QSharedDataPointer>
|
||||
#include <QHash>
|
||||
|
||||
namespace BlackMisc
|
||||
{
|
||||
@@ -301,6 +302,14 @@ namespace BlackMisc
|
||||
return i18n ? QCoreApplication::translate("CMeasurementUnit", this->m_symbol.toStdString().c_str()) : this->m_symbol;
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Value hash
|
||||
* \return
|
||||
*/
|
||||
virtual uint getValueHash() const
|
||||
{
|
||||
return qHash(this->getName());
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Rounded value
|
||||
|
||||
Reference in New Issue
Block a user