aboutsummaryrefslogtreecommitdiffstats
path: root/src/ivicore/qivipagingmodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ivicore/qivipagingmodel.cpp')
-rw-r--r--src/ivicore/qivipagingmodel.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ivicore/qivipagingmodel.cpp b/src/ivicore/qivipagingmodel.cpp
index 5986138..b9bd4df 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);
@@ -169,12 +169,14 @@ void QIviPagingModelPrivate::onDataChanged(const QUuid &identifier, const QList<
return;
if (start < 0 || start > m_itemList.count()) {
- qWarning("provided start argument is out of range");
+ if (m_loadingType == QIviPagingModel::DataChanged)
+ qWarning("The provided start argument is out of range. Please make sure to emit the countChanged() before emitting dataChanged()");
return;
}
if (count < 0 || count > m_itemList.count() - start) {
- qWarning("provided count argument is out of range");
+ if (m_loadingType == QIviPagingModel::DataChanged)
+ qWarning("The provided start argument is out of range. Please make sure to emit the countChanged() before emitting dataChanged()");
return;
}