mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 10:45:37 +08:00
refs #247 Removed hashing based on address, which is very wrong.
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user