summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@qt.io>2020-01-17 11:07:43 +0100
committerDominik Holland <dominik.holland@qt.io>2020-01-17 11:32:56 +0100
commit5521135b4587e4126d3d0257b04370bd02741d20 (patch)
tree3d3e1789976facfa6aeb55a3c9269ca29160a1df
parent2f3a9d031f2237684ee2c3b7991d72fde7f1384d (diff)
downloadqtivi-5521135b4587e4126d3d0257b04370bd02741d20.tar.gz
QIviPagingModel: Only use the onCountChanged slot in DataChanged mode
Only in the DataChanged mode we want to use the onCountChanged signal from the backend to fill the model with placeholders, as the new fetched Data will replace these. This fixes the check to ignore the signal as long as the FetchMore mode is used. Change-Id: I323f6f1c04d7386a5ca35d1bdd3ab2cff13bacdd Reviewed-by: Robert Griebl <robert.griebl@qt.io>
-rw-r--r--src/ivicore/qivipagingmodel.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ivicore/qivipagingmodel.cpp b/src/ivicore/qivipagingmodel.cpp
index 5986138..0ddf289 100644
--- a/src/ivicore/qivipagingmodel.cpp
+++ b/src/ivicore/qivipagingmodel.cpp
@@ -151,7 +151,7 @@ void QIviPagingModelPrivate::onDataFetched(const QUuid &identifier, const QList<
void QIviPagingModelPrivate::onCountChanged(const QUuid &identifier, int new_length)
{
- if (!identifier.isNull() && (identifier != m_identifier || m_loadingType != QIviPagingModel::DataChanged || m_itemList.count() == new_length))
+ if (m_loadingType != QIviPagingModel::DataChanged || (!identifier.isNull() && identifier != m_identifier) || m_itemList.count() == new_length)
return;
Q_Q(QIviPagingModel);