Fix the qHash implementation for QMatrix / QTransform
The order of the arguments of QHashCombine::operator() was accidentally swapped -- the first is supposed to be the accumlated value, the second the new value to combine. [ChangeLog][QtGui][QMatrix] The qHash() implementation for QMatrix has been changed. [ChangeLog][QtGui][QTransform] The qHash() implementation for QTransform has been changed. Change-Id: Iba13f76ff734a2184c96184ee0e5748c05db07fa Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
af837f9647
commit
67776febd5
@ -992,12 +992,12 @@ bool QMatrix::operator==(const QMatrix &m) const
|
||||
uint qHash(const QMatrix &key, uint seed) Q_DECL_NOTHROW
|
||||
{
|
||||
QtPrivate::QHashCombine hash;
|
||||
seed = hash(key.m11(), seed);
|
||||
seed = hash(key.m12(), seed);
|
||||
seed = hash(key.m21(), seed);
|
||||
seed = hash(key.m22(), seed);
|
||||
seed = hash(key.dx(), seed);
|
||||
seed = hash(key.dy(), seed);
|
||||
seed = hash(seed, key.m11());
|
||||
seed = hash(seed, key.m12());
|
||||
seed = hash(seed, key.m21());
|
||||
seed = hash(seed, key.m22());
|
||||
seed = hash(seed, key.dx());
|
||||
seed = hash(seed, key.dy());
|
||||
return seed;
|
||||
}
|
||||
|
||||
|
@ -798,15 +798,15 @@ bool QTransform::operator==(const QTransform &o) const
|
||||
uint qHash(const QTransform &key, uint seed) Q_DECL_NOTHROW
|
||||
{
|
||||
QtPrivate::QHashCombine hash;
|
||||
seed = hash(key.m11(), seed);
|
||||
seed = hash(key.m12(), seed);
|
||||
seed = hash(key.m21(), seed);
|
||||
seed = hash(key.m22(), seed);
|
||||
seed = hash(key.dx(), seed);
|
||||
seed = hash(key.dy(), seed);
|
||||
seed = hash(key.m13(), seed);
|
||||
seed = hash(key.m23(), seed);
|
||||
seed = hash(key.m33(), seed);
|
||||
seed = hash(seed, key.m11());
|
||||
seed = hash(seed, key.m12());
|
||||
seed = hash(seed, key.m21());
|
||||
seed = hash(seed, key.m22());
|
||||
seed = hash(seed, key.dx());
|
||||
seed = hash(seed, key.dy());
|
||||
seed = hash(seed, key.m13());
|
||||
seed = hash(seed, key.m23());
|
||||
seed = hash(seed, key.m33());
|
||||
return seed;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user