summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qitemselectionmodel.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/itemmodels/qitemselectionmodel.h')
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/itemmodels/qitemselectionmodel.h b/src/corelib/itemmodels/qitemselectionmodel.h
index c5caa1c69e..e548a49b3d 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.h
+++ b/src/corelib/itemmodels/qitemselectionmodel.h
@@ -55,6 +55,12 @@ public:
explicit inline QItemSelectionRange(const QModelIndex &index)
{ tl = index; br = tl; }
+ void swap(QItemSelectionRange &other) Q_DECL_NOTHROW
+ {
+ qSwap(tl, other.tl);
+ qSwap(br, other.br);
+ }
+
inline int top() const { return tl.row(); }
inline int left() const { return tl.column(); }
inline int bottom() const { return br.row(); }