From e22331fa0305d8a0a2b8b6d37203dac1ed3524e9 Mon Sep 17 00:00:00 2001 From: Jeremy Rimpo Date: Sat, 23 Sep 2023 19:00:41 -0500 Subject: Restructure category refresh action - Remove plugins class - Route signals to run Nexus API call from MainWindow - Pass Dialog instance to route response data - Revert CategoryFactory::instance to return reference --- src/modlistsortproxy.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modlistsortproxy.cpp') diff --git a/src/modlistsortproxy.cpp b/src/modlistsortproxy.cpp index e61f9494..704ec10b 100644 --- a/src/modlistsortproxy.cpp +++ b/src/modlistsortproxy.cpp @@ -171,11 +171,11 @@ bool ModListSortProxy::lessThan(const QModelIndex& left, const QModelIndex& righ lt = true; else { try { - CategoryFactory* categories = CategoryFactory::instance(); - QString leftCatName = categories->getCategoryName( - categories->getCategoryIndex(leftMod->primaryCategory())); - QString rightCatName = categories->getCategoryName( - categories->getCategoryIndex(rightMod->primaryCategory())); + CategoryFactory& categories = CategoryFactory::instance(); + QString leftCatName = categories.getCategoryName( + categories.getCategoryIndex(leftMod->primaryCategory())); + QString rightCatName = categories.getCategoryName( + categories.getCategoryIndex(rightMod->primaryCategory())); lt = leftCatName < rightCatName; } catch (const std::exception& e) { log::error("failed to compare categories: {}", e.what()); -- cgit v1.3.1