diff options
author | Liang Qi <liang.qi@qt.io> | 2016-08-09 17:59:51 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-08-09 17:59:51 +0200 |
commit | 22e96c4d342de3bfe4fc27f4cd7233edcfe737cc (patch) | |
tree | 6bdd02cdd8603cf16383fb339a2cfdbce82491da /src/corelib/itemmodels | |
parent | bd79c4e28c307ba87aca02155b845774c7ffec1f (diff) | |
parent | fa95eb055401f5264cbc6aca761cb9b5feb4affc (diff) |
Merge remote-tracking branch 'origin/5.7' into dev
Change-Id: I36e6b890b65d12bf6931757540bcc9c553b5eb8f
Diffstat (limited to 'src/corelib/itemmodels')
-rw-r--r-- | src/corelib/itemmodels/qsortfilterproxymodel.cpp | 6 | ||||
-rw-r--r-- | src/corelib/itemmodels/qstringlistmodel.cpp | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/src/corelib/itemmodels/qsortfilterproxymodel.cpp b/src/corelib/itemmodels/qsortfilterproxymodel.cpp index 2b684b855b..b0ddfa879d 100644 --- a/src/corelib/itemmodels/qsortfilterproxymodel.cpp +++ b/src/corelib/itemmodels/qsortfilterproxymodel.cpp @@ -1328,6 +1328,7 @@ void QSortFilterProxyModelPrivate::_q_sourceReset() void QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint) { Q_Q(QSortFilterProxyModel); + Q_UNUSED(hint); // We can't forward Hint because we might filter additional rows or columns saved_persistent_indexes.clear(); QList<QPersistentModelIndex> parents; @@ -1346,7 +1347,7 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<Q if (!sourceParents.isEmpty() && parents.isEmpty()) return; - emit q->layoutAboutToBeChanged(parents, hint); + emit q->layoutAboutToBeChanged(parents); if (persistent.indexes.isEmpty()) return; @@ -1356,6 +1357,7 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutAboutToBeChanged(const QList<Q void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged(const QList<QPersistentModelIndex> &sourceParents, QAbstractItemModel::LayoutChangeHint hint) { Q_Q(QSortFilterProxyModel); + Q_UNUSED(hint); // We can't forward Hint because we might filter additional rows or columns // Optimize: We only actually have to clear the mapping related to the contents of // sourceParents, not everything. @@ -1385,7 +1387,7 @@ void QSortFilterProxyModelPrivate::_q_sourceLayoutChanged(const QList<QPersisten if (!sourceParents.isEmpty() && parents.isEmpty()) return; - emit q->layoutChanged(parents, hint); + emit q->layoutChanged(parents); } void QSortFilterProxyModelPrivate::_q_sourceRowsAboutToBeInserted( diff --git a/src/corelib/itemmodels/qstringlistmodel.cpp b/src/corelib/itemmodels/qstringlistmodel.cpp index f70c318ff7..407419edb2 100644 --- a/src/corelib/itemmodels/qstringlistmodel.cpp +++ b/src/corelib/itemmodels/qstringlistmodel.cpp @@ -307,9 +307,9 @@ QStringList QStringListModel::stringList() const */ void QStringListModel::setStringList(const QStringList &strings) { - emit beginResetModel(); + beginResetModel(); lst = strings; - emit endResetModel(); + endResetModel(); } /*! |