diff options
Diffstat (limited to 'src/corelib/itemmodels/qitemselectionmodel.h')
-rw-r--r-- | src/corelib/itemmodels/qitemselectionmodel.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/itemmodels/qitemselectionmodel.h b/src/corelib/itemmodels/qitemselectionmodel.h index 1d98110a4e..c5caa1c69e 100644 --- a/src/corelib/itemmodels/qitemselectionmodel.h +++ b/src/corelib/itemmodels/qitemselectionmodel.h @@ -235,8 +235,11 @@ inline uint qHash(const QItemSelectionRange &) { return 0; } class Q_CORE_EXPORT QItemSelection : public QList<QItemSelectionRange> { public: - QItemSelection() {} + QItemSelection() Q_DECL_NOTHROW : QList<QItemSelectionRange>() {} QItemSelection(const QModelIndex &topLeft, const QModelIndex &bottomRight); + + // reusing QList::swap() here is OK! + void select(const QModelIndex &topLeft, const QModelIndex &bottomRight); bool contains(const QModelIndex &index) const; QModelIndexList indexes() const; @@ -245,6 +248,7 @@ public: const QItemSelectionRange &other, QItemSelection *result); }; +Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6(QItemSelection) #ifndef QT_NO_DEBUG_STREAM Q_CORE_EXPORT QDebug operator<<(QDebug, const QItemSelectionRange &); |