From 5521135b4587e4126d3d0257b04370bd02741d20 Mon Sep 17 00:00:00 2001 From: Dominik Holland Date: Fri, 17 Jan 2020 11:07:43 +0100 Subject: 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 --- src/ivicore/qivipagingmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.1