From 9ed9787b7e1f74255c63e0ba867fbf9747aaf851 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 8 Jul 2015 01:02:58 +0200 Subject: QItemSelection: declare as shared-come-Qt6 Change-Id: I07fe36777f8e64c4551243b5dfc3273f1783e954 Reviewed-by: Thiago Macieira --- src/corelib/itemmodels/qitemselectionmodel.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/corelib/itemmodels') 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 { public: - QItemSelection() {} + QItemSelection() Q_DECL_NOTHROW : QList() {} 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 &); -- cgit v1.2.3