fix(RD): don't assert search offset on fetchMore() in ResourceModel

This allows the standard QAbstractItemModelTester to work without
shenanigans!

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2023-01-03 16:26:07 -03:00
parent ba677a8cb7
commit 1919069b12
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -111,11 +111,9 @@ QString ResourceModel::debugName() const
void ResourceModel::fetchMore(const QModelIndex& parent)
{
if (parent.isValid())
if (parent.isValid() || m_search_state == SearchState::Finished)
return;
Q_ASSERT(m_next_search_offset != 0);
search();
}