Fix qHash(const QModelIndex &index)

The default seed = 0 parameter was missing, so, it was never used.
Manifested as a failing test in Qt for Python (bug_PYSIDE-41.py).
Amends c6cdf38e75.

Change-Id: Ia3db8b6123a695d839fbec419b8d316991d18bf7
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
Friedemann Kleint 2020-08-18 09:37:33 +02:00
parent 32c09ea5b0
commit 0a4b984421

View File

@ -424,7 +424,7 @@ inline QVariant QModelIndex::data(int arole) const
inline Qt::ItemFlags QModelIndex::flags() const
{ return m ? m->flags(*this) : Qt::ItemFlags(); }
inline size_t qHash(const QModelIndex &index, size_t seed) noexcept
inline size_t qHash(const QModelIndex &index, size_t seed = 0) noexcept
{ return size_t((size_t(index.row()) << 4) + size_t(index.column()) + index.internalId()) ^ seed; }
QT_END_NAMESPACE