summaryrefslogtreecommitdiff
path: root/src/modlistviewactions.cpp
diff options
context:
space:
mode:
authorJeremy Rimpo <jeremy.rimpo@servermonkey.com>2023-09-18 21:44:45 -0500
committerJeremy Rimpo <jeremy.rimpo@servermonkey.com>2023-09-21 17:35:05 -0500
commitf6bb73deb21228acf0e7f74500f50421143aa739 (patch)
tree85e5f9460282555857d455ab71e0a27a026e6f61 /src/modlistviewactions.cpp
parent4342fe3ce16e1e14fb44cf2676e3887002f67ec4 (diff)
Clang cleanup
Diffstat (limited to 'src/modlistviewactions.cpp')
-rw-r--r--src/modlistviewactions.cpp18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/modlistviewactions.cpp b/src/modlistviewactions.cpp
index 5fc2aea9..aa962c1e 100644
--- a/src/modlistviewactions.cpp
+++ b/src/modlistviewactions.cpp
@@ -264,17 +264,18 @@ void ModListViewActions::assignCategories() const
{
for (auto mod : m_core.modList()->allMods()) {
ModInfo::Ptr modInfo = ModInfo::getByName(mod);
- QString file = modInfo->installationFile();
- auto download = m_core.downloadManager()->getDownloadIndex(file);
+ QString file = modInfo->installationFile();
+ auto download = m_core.downloadManager()->getDownloadIndex(file);
if (download >= 0) {
int nexusCategory = m_core.downloadManager()->getCategoryID(download);
- 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);
}
}
}
@@ -1107,12 +1108,15 @@ void ModListViewActions::remapCategory(const QModelIndexList& indices) const
for (auto& idx : indices) {
ModInfo::Ptr modInfo = ModInfo::getByIndex(idx.data(ModList::IndexRole).toInt());
- int downloadIndex = m_core.downloadManager()->getDownloadIndex(modInfo->installationFile());
+ int downloadIndex =
+ m_core.downloadManager()->getDownloadIndex(modInfo->installationFile());
if (downloadIndex >= 0) {
auto downloadInfo = m_core.downloadManager()->getFileInfo(downloadIndex);
- unsigned int categoryIndex = CategoryFactory::instance()->resolveNexusID(downloadInfo->categoryID);
+ unsigned int categoryIndex =
+ CategoryFactory::instance()->resolveNexusID(downloadInfo->categoryID);
if (categoryIndex != 0)
- modInfo->setPrimaryCategory(CategoryFactory::instance()->getCategoryID(categoryIndex));
+ modInfo->setPrimaryCategory(
+ CategoryFactory::instance()->getCategoryID(categoryIndex));
}
}
}