summaryrefslogtreecommitdiff
path: root/src/organizercore.cpp
diff options
context:
space:
mode:
authorThomas Tanner <trtanner@btinternet.com>2015-11-28 14:53:32 +0000
committerThomas Tanner <trtanner@btinternet.com>2015-11-28 14:53:32 +0000
commit9e2bcffc32157b99a2d7364b869a4423ba827a32 (patch)
tree0983cb8b1b915c016d39b9e2632562fcc813b40b /src/organizercore.cpp
parentca54ee2e9a8f1d49d81d5c3b66a860b9b16992d6 (diff)
Reworked startup considerably so now no longer dependant on GameInfo
Did some const correctness to the "managed_game" property as you shouldn't really be altering the plugin details whilst MO is running
Diffstat (limited to 'src/organizercore.cpp')
-rw-r--r--src/organizercore.cpp18
1 files changed, 5 insertions, 13 deletions
diff --git a/src/organizercore.cpp b/src/organizercore.cpp
index 042a9f1e..06a6dba4 100644
--- a/src/organizercore.cpp
+++ b/src/organizercore.cpp
@@ -422,15 +422,12 @@ void OrganizerCore::disconnectPlugins()
m_PluginContainer = nullptr;
}
-void OrganizerCore::setManagedGame(const QString &gameName, const QString &gamePath)
+void OrganizerCore::setManagedGame(MOBase::IPluginGame const *game)
{
- m_GameName = gameName;
- if (m_PluginContainer != nullptr) {
- m_GamePlugin = m_PluginContainer->managedGame(m_GameName);
- m_GamePlugin->setGamePath(gamePath);
- qApp->setProperty("managed_game", QVariant::fromValue(m_GamePlugin));
- emit managedGameChanged(m_GamePlugin);
- }
+ m_GameName = game->gameName();
+ m_GamePlugin = game;
+ qApp->setProperty("managed_game", QVariant::fromValue(m_GamePlugin));
+ emit managedGameChanged(m_GamePlugin);
}
Settings &OrganizerCore::settings()
@@ -1327,11 +1324,6 @@ IPluginGame const *OrganizerCore::managedGame() const
return m_GamePlugin;
}
-IPluginGame *OrganizerCore::managedGameForUpdate() const
-{
- return m_GamePlugin;
-}
-
std::vector<QString> OrganizerCore::enabledArchives()
{
std::vector<QString> result;