summaryrefslogtreecommitdiffstats
path: root/src/corelib/itemmodels
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/itemmodels')
-rw-r--r--src/corelib/itemmodels/qabstractitemmodel.cpp4
-rw-r--r--src/corelib/itemmodels/qabstractproxymodel.h2
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.cpp2
-rw-r--r--src/corelib/itemmodels/qitemselectionmodel.h9
-rw-r--r--src/corelib/itemmodels/qsortfilterproxymodel.h2
-rw-r--r--src/corelib/itemmodels/qstringlistmodel.h2
6 files changed, 13 insertions, 8 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.cpp b/src/corelib/itemmodels/qabstractitemmodel.cpp
index c6f174bcf8..3d9af90682 100644
--- a/src/corelib/itemmodels/qabstractitemmodel.cpp
+++ b/src/corelib/itemmodels/qabstractitemmodel.cpp
@@ -2096,7 +2096,9 @@ QModelIndex QAbstractItemModel::buddy(const QModelIndex &index) const
Returns a list of indexes for the items in the column of the \a start index
where data stored under the given \a role matches the specified \a value.
The way the search is performed is defined by the \a flags given. The list
- that is returned may be empty.
+ that is returned may be empty. Note also that the order of results in the
+ list may not correspond to the order in the model, if for example a proxy
+ model is used. The order of the results can not be relied upon.
The search begins from the \a start index, and continues until the number
of matching data items equals \a hits, the search reaches the last row, or
diff --git a/src/corelib/itemmodels/qabstractproxymodel.h b/src/corelib/itemmodels/qabstractproxymodel.h
index 3c82199038..d80fcb683c 100644
--- a/src/corelib/itemmodels/qabstractproxymodel.h
+++ b/src/corelib/itemmodels/qabstractproxymodel.h
@@ -59,7 +59,7 @@ class Q_CORE_EXPORT QAbstractProxyModel : public QAbstractItemModel
Q_OBJECT
public:
- QAbstractProxyModel(QObject *parent = 0);
+ explicit QAbstractProxyModel(QObject *parent = 0);
~QAbstractProxyModel();
virtual void setSourceModel(QAbstractItemModel *sourceModel);
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); }
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.h b/src/corelib/itemmodels/qsortfilterproxymodel.h
index 8c7433d307..f18b1fccb1 100644
--- a/src/corelib/itemmodels/qsortfilterproxymodel.h
+++ b/src/corelib/itemmodels/qsortfilterproxymodel.h
@@ -73,7 +73,7 @@ class Q_CORE_EXPORT QSortFilterProxyModel : public QAbstractProxyModel
Q_PROPERTY(int filterRole READ filterRole WRITE setFilterRole)
public:
- QSortFilterProxyModel(QObject *parent = 0);
+ explicit QSortFilterProxyModel(QObject *parent = 0);
~QSortFilterProxyModel();
void setSourceModel(QAbstractItemModel *sourceModel);
diff --git a/src/corelib/itemmodels/qstringlistmodel.h b/src/corelib/itemmodels/qstringlistmodel.h
index d8b3f87f4a..a6bc4e7bd3 100644
--- a/src/corelib/itemmodels/qstringlistmodel.h
+++ b/src/corelib/itemmodels/qstringlistmodel.h
@@ -57,7 +57,7 @@ class Q_CORE_EXPORT QStringListModel : public QAbstractListModel
Q_OBJECT
public:
explicit QStringListModel(QObject *parent = 0);
- QStringListModel(const QStringList &strings, QObject *parent = 0);
+ explicit QStringListModel(const QStringList &strings, QObject *parent = 0);
int rowCount(const QModelIndex &parent = QModelIndex()) const;