summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp2
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h9
2 files changed, 7 insertions, 4 deletions
diff --git a/src/corelib/itemmodels/qitemselectionmodel.cpp b/src/corelib/itemmodels/qitemselectionmodel.cpp
index c6c1f6f3cf..fa34acdd18 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.cpp
+++ b/src/corelib/itemmodels/qitemselectionmodel.cpp
@@ -235,7 +235,7 @@ bool QItemSelectionRange::intersects(const QItemSelectionRange &other) const
both the selection range and the \a other selection range.
*/
-QItemSelectionRange QItemSelectionRange::intersect(const QItemSelectionRange &other) const
+QItemSelectionRange QItemSelectionRange::intersected(const QItemSelectionRange &other) const
{
if (model() == other.model() && parent() == other.parent()) {
QModelIndex topLeft = model()->index(qMax(top(), other.top()),
diff --git a/src/corelib/itemmodels/qitemselectionmodel.h b/src/corelib/itemmodels/qitemselectionmodel.h
index 6f438d8c68..7a8c238184 100644
--- a/src/corelib/itemmodels/qitemselectionmodel.h
+++ b/src/corelib/itemmodels/qitemselectionmodel.h
@@ -92,9 +92,12 @@ public:
}
bool intersects(const QItemSelectionRange &other) const;
- QItemSelectionRange intersect(const QItemSelectionRange &other) const; // ### Qt 5: make QT4_SUPPORT
- inline QItemSelectionRange intersected(const QItemSelectionRange &other) const
- { return intersect(other); }
+#if QT_DEPRECATED_SINCE(5, 0)
+ inline QItemSelectionRange intersect(const QItemSelectionRange &other) const
+ { return intersected(other); }
+#endif
+ QItemSelectionRange intersected(const QItemSelectionRange &other) const;
+
inline bool operator==(const QItemSelectionRange &other) const
{ return (tl == other.tl && br == other.br); }