summaryrefslogtreecommitdiffstats
path: root/src/corelib
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
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')
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp15
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h17
2 files changed, 1 insertions, 31 deletions
diff --git a/src/corelib/itemmodels/qitemselectionmodel.cpp b/src/corelib/itemmodels/qitemselectionmodel.cpp
index 418c425810..fe7be8753b 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.cpp
+++ b/src/corelib/itemmodels/qitemselectionmodel.cpp
@@ -87,14 +87,6 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \fn QItemSelectionRange::QItemSelectionRange(const QItemSelectionRange &other)
-
- Copy constructor. Constructs a new selection range with the same contents
- as the \a other range given.
-
-*/
-
-/*!
\fn QItemSelectionRange::QItemSelectionRange(const QModelIndex &topLeft, const QModelIndex &bottomRight)
Constructs a new selection range containing only the index specified
@@ -231,13 +223,6 @@ bool QItemSelectionRange::intersects(const QItemSelectionRange &other) const
}
/*!
- \fn QItemSelectionRange QItemSelectionRange::intersect(const QItemSelectionRange &other) const
- \obsolete
-
- Use intersected(\a other) instead.
-*/
-
-/*!
\fn QItemSelectionRange QItemSelectionRange::intersected(const QItemSelectionRange &other) const
\since 4.2
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;