refs #247 Removed hashing based on address, which is very wrong.

This commit is contained in:
Mathew Sutcliffe
2014-11-11 23:21:40 +00:00
parent a2c0a893c0
commit dae235881c

View File

@@ -66,14 +66,6 @@ namespace BlackMisc
uint CVariant::getValueHash() const uint CVariant::getValueHash() const
{ {
uint h = 0; uint h = 0;
if (!this->isValid() || this->isNull())
{
QString hs;
hs.sprintf("%p", this);
h = ::qHash(hs);
}
else
{
QVariant qv = this->toQVariant(); QVariant qv = this->toQVariant();
switch (qv.type()) switch (qv.type())
{ {
@@ -142,14 +134,11 @@ namespace BlackMisc
else else
{ {
// no value object // no value object
QString hs; Q_ASSERT(false);
hs.sprintf("%p", this);
h = ::qHash(hs);
} }
} }
break; break;
} }
}
return h; return h;
} }