diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-10-25 17:46:29 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-10-25 17:46:29 +0100 |
| commit | 551e8353e090040ee337e718cf0f1b9fe31a0423 (patch) | |
| tree | b6a31a880e10f528b4f17c7e19c1639b116278ac /src/modlist.cpp | |
| parent | a216177b879bea6db659c65b0c37bbfe70ce08fd (diff) | |
Move IOrganizer::getMod() to IModList::getMod().
Diffstat (limited to 'src/modlist.cpp')
| -rw-r--r-- | src/modlist.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modlist.cpp b/src/modlist.cpp index 40a9af5e..98ee3f3a 100644 --- a/src/modlist.cpp +++ b/src/modlist.cpp @@ -939,6 +939,12 @@ QStringList ModList::allModsByProfilePriority(MOBase::IProfile* profile) const return m_Organizer->modsSortedByProfilePriority(mo2Profile); } +MOBase::IModInterface* ModList::getMod(const QString& name) const +{ + unsigned int index = ModInfo::getIndex(name); + return index == UINT_MAX ? nullptr : ModInfo::getByIndex(index).data(); +} + bool ModList::removeMod(MOBase::IModInterface* mod) { unsigned int index = ModInfo::getIndex(mod->name()); |
