summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qitemselectionmodel.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-07-08 01:02:58 +0200
committerMarc Mutz <marc.mutz@kdab.com>2015-07-18 13:32:48 +0000
commit9ed9787b7e1f74255c63e0ba867fbf9747aaf851 (patch)
tree0562c29436ebc9ed9c3631f76dc78a2cb079d843 /src/corelib/itemmodels/qitemselectionmodel.h
parentb172e8e785a769006aa7d859e4bad9659fe2efe0 (diff)
QItemSelection: declare as shared-come-Qt6
Change-Id: I07fe36777f8e64c4551243b5dfc3273f1783e954 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/corelib/itemmodels/qitemselectionmodel.h')
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h6
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 &);