From 1919069b12b012a74ff90981a8ec70579909f2d2 Mon Sep 17 00:00:00 2001 From: flow Date: Tue, 3 Jan 2023 16:26:07 -0300 Subject: [PATCH] fix(RD): don't assert search offset on fetchMore() in ResourceModel This allows the standard QAbstractItemModelTester to work without shenanigans! Signed-off-by: flow --- launcher/ui/pages/modplatform/ResourceModel.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/launcher/ui/pages/modplatform/ResourceModel.cpp b/launcher/ui/pages/modplatform/ResourceModel.cpp index be5ead90..eb723159 100644 --- a/launcher/ui/pages/modplatform/ResourceModel.cpp +++ b/launcher/ui/pages/modplatform/ResourceModel.cpp @@ -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(); }