diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-06-23 10:53:06 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-07-18 22:12:05 +0000 |
commit | aec42f9953954d48a11465f56b5e5ee4987f3b44 (patch) | |
tree | ada418f684da5a9d3ff2f507527b117580e6f8e8 /src/qml/types | |
parent | 7910d9d27d4f6c20734c05fcc9ae6f5237fd19d6 (diff) |
Revert "QQmlAdaptorModel: support dataChanged signals from multi-column models"
No longer needed since TableView will switch to use QQmlTableInstanceModel.
This reverts commit a5d2fb468cabff8dc0702c7ddcd9f5b08993b827.
Change-Id: I10c6217627a77beebd99cfa5668db05bbbe4ed15
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/qml/types')
-rw-r--r-- | src/qml/types/qqmldelegatemodel.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/qml/types/qqmldelegatemodel.cpp b/src/qml/types/qqmldelegatemodel.cpp index 0d82cca001..7a128d7070 100644 --- a/src/qml/types/qqmldelegatemodel.cpp +++ b/src/qml/types/qqmldelegatemodel.cpp @@ -1680,15 +1680,8 @@ void QQmlDelegateModel::_q_rowsMoved( void QQmlDelegateModel::_q_dataChanged(const QModelIndex &begin, const QModelIndex &end, const QVector<int> &roles) { Q_D(QQmlDelegateModel); - if (begin.parent() != d->m_adaptorModel.rootIndex) - return; - - int rowCount = end.row() - begin.row() + 1; - - for (int col = begin.column(); col <= end.column(); ++col) { - int startIndex = d->m_adaptorModel.indexAt(begin.row(), col); - _q_itemsChanged(startIndex, rowCount, roles); - } + if (begin.parent() == d->m_adaptorModel.rootIndex) + _q_itemsChanged(begin.row(), end.row() - begin.row() + 1, roles); } bool QQmlDelegateModel::isDescendantOf(const QPersistentModelIndex& desc, const QList< QPersistentModelIndex >& parents) const |