summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels/qitemselectionmodel.h
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2020-05-13 21:09:38 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2020-05-23 10:53:30 +0200
commit865729617349c7fbd39e00079e96863c1107ad00 (patch)
treea3d8b829b265716c6ba7c29ef3df839a231c5be8 /src/corelib/itemmodels/qitemselectionmodel.h
parentf9874ad7bd822b9c3e38b0996ead89af173b9e55 (diff)
QItemSelectionModel: simplify QItemSelectionRange
Simplify QItemSelectionRange by removing the unneeded user-defined functions - the compiler can generate them by it's own. Change-Id: I49c00f937df98bb1ad18057b7bae7a0e06919909 Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/corelib/itemmodels/qitemselectionmodel.h')
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/corelib/itemmodels/qitemselectionmodel.h b/src/corelib/itemmodels/qitemselectionmodel.h
index b332158c27..529dc6f100 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.h
+++ b/src/corelib/itemmodels/qitemselectionmodel.h
@@ -55,18 +55,7 @@ class Q_CORE_EXPORT QItemSelectionRange
{
public:
- inline QItemSelectionRange() : tl(), br() {}
-#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
- // ### Qt 6: remove them all, the compiler-generated ones are fine
- inline QItemSelectionRange(const QItemSelectionRange &other)
- : tl(other.tl), br(other.br) {}
- QItemSelectionRange(QItemSelectionRange &&other) noexcept
- : tl(std::move(other.tl)), br(std::move(other.br)) {}
- QItemSelectionRange &operator=(QItemSelectionRange &&other) noexcept
- { tl = std::move(other.tl); br = std::move(other.br); return *this; }
- QItemSelectionRange &operator=(const QItemSelectionRange &other)
- { tl = other.tl; br = other.br; return *this; }
-#endif // Qt < 6
+ QItemSelectionRange() = default;
QItemSelectionRange(const QModelIndex &topL, const QModelIndex &bottomR) : tl(topL), br(bottomR) {}
explicit QItemSelectionRange(const QModelIndex &index) : tl(index), br(tl) {}
@@ -103,10 +92,6 @@ public:
}
bool intersects(const QItemSelectionRange &other) const;
-#if QT_DEPRECATED_SINCE(5, 0)
- inline QItemSelectionRange intersect(const QItemSelectionRange &other) const
- { return intersected(other); }
-#endif
QItemSelectionRange intersected(const QItemSelectionRange &other) const;