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/modinforegular.cpp | |
| parent | 4fd45b937c0577a0c5c1699726e8132b97be8f5d (diff) | |
WIP: Category QObj refactor
Diffstat (limited to 'src/modinforegular.cpp')
| -rw-r--r-- | src/modinforegular.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/modinforegular.cpp b/src/modinforegular.cpp index 4c1004e6..275b76a3 100644 --- a/src/modinforegular.cpp +++ b/src/modinforegular.cpp @@ -210,8 +210,7 @@ void ModInfoRegular::readMeta() // ignore invalid id continue; } - if (ok && (categoryID != 0) && - (CategoryFactory::instance().categoryExists(categoryID))) { + if (ok && (categoryID != 0) && (CategoryFactory::instance()->categoryExists(categoryID))) { m_Categories.insert(categoryID); if (iter == categories.begin()) { m_PrimaryCategory = categoryID; @@ -575,7 +574,7 @@ void ModInfoRegular::setInstallationFile(const QString& fileName) void ModInfoRegular::addNexusCategory(int categoryID) { - m_Categories.insert(CategoryFactory::instance().resolveNexusID(categoryID)); + m_Categories.insert(CategoryFactory::instance()->resolveNexusID(categoryID)); } void ModInfoRegular::setIsEndorsed(bool endorsed) @@ -731,15 +730,15 @@ QString ModInfoRegular::getDescription() const const std::set<int>& categories = getCategories(); std::wostringstream categoryString; categoryString << ToWString(tr("Categories: <br>")); - CategoryFactory& categoryFactory = CategoryFactory::instance(); + CategoryFactory* categoryFactory = CategoryFactory::instance(); for (std::set<int>::const_iterator catIter = categories.begin(); catIter != categories.end(); ++catIter) { if (catIter != categories.begin()) { categoryString << " , "; } categoryString << "<span style=\"white-space: nowrap;\"><i>" - << ToWString(categoryFactory.getCategoryName( - categoryFactory.getCategoryIndex(*catIter))) + << ToWString(categoryFactory->getCategoryName( + categoryFactory->getCategoryIndex(*catIter))) << "</font></span>"; } |
