diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2011-11-21 13:34:24 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-11-21 14:24:36 +0100 |
commit | 100908e400be65fea74184caaee754abc3a5afcb (patch) | |
tree | 0e99ca3012c603cbbfc65f09245dba6d606bc67d /src/corelib/kernel/qabstractitemmodel.cpp | |
parent | 448e1e620ca206236bf6d03406fceb9b9eb20c15 (diff) |
Add a roles argument to the dataChanged signal.
This allows more granular reporting of what has changed.
This change is binary incompatible and source compatible.
Change-Id: I7c5beaee651a24780cc94e41383f7a80210bc603
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/kernel/qabstractitemmodel.cpp')
-rw-r--r-- | src/corelib/kernel/qabstractitemmodel.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp index bda25c301e..fbeb59a553 100644 --- a/src/corelib/kernel/qabstractitemmodel.cpp +++ b/src/corelib/kernel/qabstractitemmodel.cpp @@ -1415,7 +1415,7 @@ QAbstractItemModel::~QAbstractItemModel() */ /*! - \fn void QAbstractItemModel::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight) + \fn void QAbstractItemModel::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QSet<int> &roles = QSet<int>()) This signal is emitted whenever the data in an existing item changes. @@ -1426,6 +1426,10 @@ QAbstractItemModel::~QAbstractItemModel() When reimplementing the setData() function, this signal must be emitted explicitly. + The optional roles argument can be used to specify which data roles have actually + been modified. An empty set in the roles argument means that all roles should be + considered modified. + \sa headerDataChanged(), setData(), layoutChanged() */ |