From 551e8353e090040ee337e718cf0f1b9fe31a0423 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Sun, 25 Oct 2020 17:46:29 +0100 Subject: Move IOrganizer::getMod() to IModList::getMod(). --- src/modlist.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modlist.cpp') 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()); -- cgit v1.3.1