summaryrefslogtreecommitdiff
path: root/src/modlist.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-13 13:00:54 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-13 13:00:54 +0100
commitc93cf33c8324052b321fc0428c394016abcee115 (patch)
tree52280bbb9f687c3aebff2becf038eca49d6f846f /src/modlist.cpp
parent163b33f22817fda6ead29de8f9d9624434766be9 (diff)
Remove OrganizerCore::modsSortedByProfilePriority.
Diffstat (limited to 'src/modlist.cpp')
-rw-r--r--src/modlist.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp
index f820e4d1..d4ffbeff 100644
--- a/src/modlist.cpp
+++ b/src/modlist.cpp
@@ -900,7 +900,19 @@ QStringList ModList::allModsByProfilePriority(MOBase::IProfile* profile) const
{
Profile* mo2Profile = profile == nullptr ?
m_Organizer->currentProfile() : static_cast<Profile*>(profile);
- return m_Organizer->modsSortedByProfilePriority(mo2Profile);
+
+ QStringList res;
+ for (int i = mo2Profile->getPriorityMinimum();
+ i < mo2Profile->getPriorityMinimum() + (int)mo2Profile->numRegularMods();
+ ++i) {
+ int modIndex = mo2Profile->modIndexByPriority(i);
+ auto modInfo = ModInfo::getByIndex(modIndex);
+ if (!modInfo->hasFlag(ModInfo::FLAG_OVERWRITE) &&
+ !modInfo->hasFlag(ModInfo::FLAG_BACKUP)) {
+ res.push_back(ModInfo::getByIndex(modIndex)->internalName());
+ }
+ }
+ return res;
}
MOBase::IModInterface* ModList::getMod(const QString& name) const