summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/itemmodels')
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp10
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.h6
2 files changed, 9 insertions, 7 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
index 9e0e9c06de..87bcb6dfdc 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.cpp
+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
@@ -3517,11 +3517,13 @@ bool QAbstractListModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
*/
/*!
- \fn uint qHash(const QPersistentModelIndex &index)
- \since 4.5
+ \fn uint qHash(const QPersistentModelIndex &index, uint seed = 0)
+ \since 5.0
+ \relates QPersistentModelIndex
- Returns a hash of the QPersistentModelIndex
- */
+ Returns a hash of the QPersistentModelIndex \a index, using \a seed to
+ seed the calculation.
+*/
/*!
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h
index 66af606dac..4cdafdd9d8 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.h
+++ b/src/corelib/itemmodels/qabstractitemmodel.h
@@ -134,15 +134,15 @@ public:
bool isValid() const;
private:
QPersistentModelIndexData *d;
- friend uint qHash(const QPersistentModelIndex &);
+ friend uint qHash(const QPersistentModelIndex &, uint seed = 0);
#ifndef QT_NO_DEBUG_STREAM
friend Q_CORE_EXPORT QDebug operator<<(QDebug, const QPersistentModelIndex &);
#endif
};
Q_DECLARE_SHARED(QPersistentModelIndex)
-inline uint qHash(const QPersistentModelIndex &index)
-{ return qHash(index.d); }
+inline uint qHash(const QPersistentModelIndex &index, uint seed)
+{ return qHash(index.d, seed); }
#ifndef QT_NO_DEBUG_STREAM