summaryrefslogtreecommitdiffstats
path: root/src/widgets/itemviews/qtreeview.cpp
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2011-12-15 16:31:21 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-06 17:21:39 +0100
commit054a4aa7dddacbe31778c5c5e9ffc9d41f803353 (patch)
treee0c1d717913cb5fbd1425106555003abce0dadc5 /src/widgets/itemviews/qtreeview.cpp
parent9eacf32de9c61417887e1550915c310c3187ac10 (diff)
Add roles to the dataChanged slots in views.
This is a source incompatible change. This is for consistency with the signal for the lifetime of Qt5. I could imagine people trying to override a virtual function (in a new class while using the Qt5 library) with the arguments of the signal and have that fail due to the arguments not being correct. It also allows ignoring dataChange events when they are known not to be for roles which are relevant to particular views or delegates. Change-Id: Ica191835125c1c8fdaf665debb62d635e81700dc Reviewed-by: David Faure <faure@kde.org> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/widgets/itemviews/qtreeview.cpp')
-rw-r--r--src/widgets/itemviews/qtreeview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/itemviews/qtreeview.cpp b/src/widgets/itemviews/qtreeview.cpp
index acff457de4..5da2185bd1 100644
--- a/src/widgets/itemviews/qtreeview.cpp
+++ b/src/widgets/itemviews/qtreeview.cpp
@@ -664,7 +664,7 @@ void QTreeView::setFirstColumnSpanned(int row, const QModelIndex &parent, bool s
/*!
\reimp
*/
-void QTreeView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
+void QTreeView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &roles)
{
Q_D(QTreeView);
@@ -706,7 +706,7 @@ void QTreeView::dataChanged(const QModelIndex &topLeft, const QModelIndex &botto
d->updateScrollBars();
d->viewport->update();
}
- QAbstractItemView::dataChanged(topLeft, bottomRight);
+ QAbstractItemView::dataChanged(topLeft, bottomRight, roles);
}
/*!