diff options
| author | Silarn <jrim@rimpo.org> | 2019-12-23 23:16:36 -0600 |
|---|---|---|
| committer | Jeremy Rimpo <jeremy.rimpo@servermonkey.com> | 2023-09-21 17:03:43 -0500 |
| commit | 127db7799ed4847b151a35a16cefab6c494128ef (patch) | |
| tree | dd31c995fee70d2fd0367eeaa6ad916755060256 /src/modinfo.cpp | |
| parent | 4fd45b937c0577a0c5c1699726e8132b97be8f5d (diff) | |
WIP: Category QObj refactor
Diffstat (limited to 'src/modinfo.cpp')
| -rw-r--r-- | src/modinfo.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/modinfo.cpp b/src/modinfo.cpp index 1d30ac95..68c8ea9e 100644 --- a/src/modinfo.cpp +++ b/src/modinfo.cpp @@ -493,16 +493,16 @@ void ModInfo::setPluginSelected(const bool& isSelected) void ModInfo::addCategory(const QString& categoryName) { - int id = CategoryFactory::instance().getCategoryID(categoryName); + int id = CategoryFactory::instance()->getCategoryID(categoryName); if (id == -1) { - id = CategoryFactory::instance().addCategory(categoryName, std::vector<int>(), 0); + id = CategoryFactory::instance()->addCategory(categoryName, std::vector<CategoryFactory::NexusCategory>(), 0); } setCategory(id, true); } bool ModInfo::removeCategory(const QString& categoryName) { - int id = CategoryFactory::instance().getCategoryID(categoryName); + int id = CategoryFactory::instance()->getCategoryID(categoryName); if (id == -1) { return false; } @@ -517,9 +517,9 @@ QStringList ModInfo::categories() const { QStringList result; - CategoryFactory& catFac = CategoryFactory::instance(); + CategoryFactory* catFac = CategoryFactory::instance(); for (int id : m_Categories) { - result.append(catFac.getCategoryName(catFac.getCategoryIndex(id))); + result.append(catFac->getCategoryName(catFac->getCategoryIndex(id))); } return result; @@ -549,7 +549,7 @@ bool ModInfo::categorySet(int categoryID) const for (std::set<int>::const_iterator iter = m_Categories.begin(); iter != m_Categories.end(); ++iter) { if ((*iter == categoryID) || - (CategoryFactory::instance().isDescendantOf(*iter, categoryID))) { + (CategoryFactory::instance()->isDecendantOf(*iter, categoryID))) { return true; } } |
