From 02affdb8913c9b2633d918000e0b23bf5e3cf3ec Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 20 Jul 2015 01:26:03 +0200 Subject: QItemSelectionRange: add nothrow member-swap Change-Id: Ie550f4a66b3c623b0ec630c18f38bcd96f6bbc99 Reviewed-by: Friedemann Kleint Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/itemmodels/qitemselectionmodel.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/corelib/itemmodels/qitemselectionmodel.h') 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(); } -- cgit v1.2.1