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/modlistviewactions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/modlistviewactions.cpp') diff --git a/src/modlistviewactions.cpp b/src/modlistviewactions.cpp index d82dca87..983574ab 100644 --- a/src/modlistviewactions.cpp +++ b/src/modlistviewactions.cpp @@ -288,13 +288,13 @@ void ModListViewActions::assignCategories() const nexusCategory = downloadMeta.value("category", 0).toInt(); } } - int newCategory = CategoryFactory::instance()->resolveNexusID(nexusCategory); + int newCategory = CategoryFactory::instance().resolveNexusID(nexusCategory); if (newCategory != 0) { for (auto category : modInfo->categories()) { modInfo->removeCategory(category); } } - modInfo->setCategory(CategoryFactory::instance()->getCategoryID(newCategory), true); + modInfo->setCategory(CategoryFactory::instance().getCategoryID(newCategory), true); } } @@ -1136,10 +1136,10 @@ void ModListViewActions::remapCategory(const QModelIndexList& indices) const } } unsigned int categoryIndex = - CategoryFactory::instance()->resolveNexusID(categoryID); + CategoryFactory::instance().resolveNexusID(categoryID); if (categoryIndex != 0) modInfo->setPrimaryCategory( - CategoryFactory::instance()->getCategoryID(categoryIndex)); + CategoryFactory::instance().getCategoryID(categoryIndex)); } } -- cgit v1.3.1