From 49b58cf58265a5ecde3b771c5a3ce74de56c7e4c Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Mon, 20 Jan 2014 13:00:39 +0100 Subject: [PATCH] Fixed hash for PQ, was based on long (which of course did not work properly) --- src/blackmisc/pqphysicalquantity.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/blackmisc/pqphysicalquantity.cpp b/src/blackmisc/pqphysicalquantity.cpp index ee91eb860..fa3ace5fc 100644 --- a/src/blackmisc/pqphysicalquantity.cpp +++ b/src/blackmisc/pqphysicalquantity.cpp @@ -270,8 +270,9 @@ namespace BlackMisc template uint CPhysicalQuantity::getValueHash() const { QList hashs; - hashs << this->m_unit.getValueHash(); - hashs << qHash(static_cast(this->m_value)); + // there is no double qHash + // also unit and rounding has to be considered + hashs << qHash(this->valueRoundedWithUnit(MU::defaultUnit())); return BlackMisc::calculateHash(hashs, "PQ"); }