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:
parent
ba677a8cb7
commit
1919069b12
@ -111,11 +111,9 @@ QString ResourceModel::debugName() const
|
|||||||
|
|
||||||
void ResourceModel::fetchMore(const QModelIndex& parent)
|
void ResourceModel::fetchMore(const QModelIndex& parent)
|
||||||
{
|
{
|
||||||
if (parent.isValid())
|
if (parent.isValid() || m_search_state == SearchState::Finished)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Q_ASSERT(m_next_search_offset != 0);
|
|
||||||
|
|
||||||
search();
|
search();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user