diff options
author | flow <flowlnlnln@gmail.com> | 2023-01-03 16:26:07 -0300 |
---|---|---|
committer | flow <flowlnlnln@gmail.com> | 2023-01-13 16:23:09 -0300 |
commit | 1919069b12b012a74ff90981a8ec70579909f2d2 (patch) | |
tree | 010af761ca56e7a2f8be35757eeadbc03ee5c0c6 /launcher | |
parent | ba677a8cb76dd6cde4a08ff4b6f142f7be1bdb29 (diff) | |
download | PrismLauncher-1919069b12b012a74ff90981a8ec70579909f2d2.tar.gz PrismLauncher-1919069b12b012a74ff90981a8ec70579909f2d2.tar.bz2 PrismLauncher-1919069b12b012a74ff90981a8ec70579909f2d2.zip |
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>
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/ui/pages/modplatform/ResourceModel.cpp | 4 |
1 files changed, 1 insertions, 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(); } |