Deprecate QItemSelectionModel::intersect().
authorStephen Kelly <stephen.kelly@kdab.com>
Mon, 2 Apr 2012 14:08:15 +0000 (16:08 +0200)
committerQt by Nokia <qt-info@nokia.com>
Mon, 2 Apr 2012 18:29:23 +0000 (20:29 +0200)
It is already obsolete since the beginning of time (Qt 4.5).

Change-Id: Ia2f9d934f0c0bd2038d693a29d1315867a526dfe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
src/corelib/itemmodels/qitemselectionmodel.cpp
src/corelib/itemmodels/qitemselectionmodel.h

index c6c1f6f..fa34acd 100644 (file)
@@ -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()),
index 6f438d8..7a8c238 100644 (file)
@@ -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); }