summaryrefslogtreecommitdiff
path: root/src/organizercore.cpp
diff options
context:
space:
mode:
authorMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 19:07:50 +0100
committerMikaël Capelle <capelle.mikael@gmail.com>2021-01-02 19:07:50 +0100
commitd96dcf02b131808a25045afc23667ed6a26274a6 (patch)
tree01a42a3c59ed664d2ea9e1e830565d3e2260ca8b /src/organizercore.cpp
parentc7abae79b3042cb5a9ab1174a9955d47e6e38fb8 (diff)
Refactoring of ModInfo to give access to the core. Remove ModInfo::remove() completely.
Diffstat (limited to 'src/organizercore.cpp')
-rw-r--r--src/organizercore.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index bf9308b8..d952bc4c 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -219,9 +219,9 @@ void OrganizerCore::updateExecutablesList()
void OrganizerCore::updateModInfoFromDisc() {
ModInfo::updateFromDisc(
- m_Settings.paths().mods(), &m_DirectoryStructure,
- m_PluginContainer, m_Settings.interface().displayForeign(),
- m_Settings.refreshThreadCount(), managedGame());
+ m_Settings.paths().mods(), *this,
+ m_Settings.interface().displayForeign(),
+ m_Settings.refreshThreadCount());
}
void OrganizerCore::setUserInterface(IUserInterface* ui)
@@ -692,8 +692,7 @@ MOBase::IModInterface *OrganizerCore::createMod(GuessedValue<QString> &name)
// shouldn't this use the existing mod in case of a merge? also, this does not refresh the indices
// in the ModInfo structure
- return ModInfo::createFrom(m_PluginContainer, m_GamePlugin, QDir(targetDirectory), &m_DirectoryStructure)
- .data();
+ return ModInfo::createFrom(QDir(targetDirectory), *this).data();
}
void OrganizerCore::modDataChanged(MOBase::IModInterface *)
@@ -1219,11 +1218,7 @@ void OrganizerCore::refresh(bool saveChanges)
m_CurrentProfile->writeModlistNow(true);
}
- ModInfo::updateFromDisc(
- m_Settings.paths().mods(), &m_DirectoryStructure,
- m_PluginContainer, m_Settings.interface().displayForeign(),
- m_Settings.refreshThreadCount(), managedGame());
-
+ updateModInfoFromDisc();
m_CurrentProfile->refreshModStatus();
m_ModList.notifyChange(-1);