From a1ab717e9e4fd72071cd01d9ceb74e7ba10ffafd Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Fri, 4 Dec 2020 13:41:06 +0100 Subject: Minor cleaning (comments, names). --- src/organizercore.cpp | 2 +- src/plugincontainer.cpp | 2 +- src/plugincontainer.h | 26 +++++++++++++++++--------- 3 files changed, 19 insertions(+), 11 deletions(-) (limited to 'src') diff --git a/src/organizercore.cpp b/src/organizercore.cpp index 256833a8..631e49be 100644 --- a/src/organizercore.cpp +++ b/src/organizercore.cpp @@ -291,7 +291,7 @@ void OrganizerCore::connectPlugins(PluginContainer *container) m_ModList.setPluginContainer(m_PluginContainer); if (!m_GameName.isEmpty()) { - m_GamePlugin = m_PluginContainer->managedGame(m_GameName); + m_GamePlugin = m_PluginContainer->game(m_GameName); emit managedGameChanged(m_GamePlugin); } diff --git a/src/plugincontainer.cpp b/src/plugincontainer.cpp index c3d66913..e4eb389f 100644 --- a/src/plugincontainer.cpp +++ b/src/plugincontainer.cpp @@ -696,7 +696,7 @@ QString PluginContainer::filepath(MOBase::IPlugin* plugin) const return as_qobject(plugin)->property("filepath").toString(); } -IPluginGame *PluginContainer::managedGame(const QString &name) const +IPluginGame *PluginContainer::game(const QString &name) const { auto iter = m_SupportedGames.find(name); if (iter != m_SupportedGames.end()) { diff --git a/src/plugincontainer.h b/src/plugincontainer.h index bd19e7ef..4eb30db6 100644 --- a/src/plugincontainer.h +++ b/src/plugincontainer.h @@ -204,22 +204,19 @@ public: */ void startPlugins(IUserInterface* userInterface); + /** + * @brief Load, unload or reload the plugin at the given path. + * + */ void loadPlugin(QString const& filepath); void unloadPlugin(QString const& filepath); void reloadPlugin(QString const& filepath); - void loadPlugins(); - /** - * @brief Find the game plugin corresponding to the given name. + * @brief Load all plugins. * - * @param name The name of the game to find a plugin for (as returned by - * IPluginGame::gameName()). - * - * @return the game plugin for the given name, or a null pointer if no - * plugin exists for this game. */ - MOBase::IPluginGame *managedGame(const QString &name) const; + void loadPlugins(); /** * @brief Retrieve the list of plugins of the given type. @@ -271,6 +268,17 @@ public: MOBase::IPlugin* plugin(MOBase::IPluginDiagnose* diagnose) const; MOBase::IPlugin* plugin(MOBase::IPluginFileMapper* mapper) const; + /** + * @brief Find the game plugin corresponding to the given name. + * + * @param name The name of the game to find a plugin for (as returned by + * IPluginGame::gameName()). + * + * @return the game plugin for the given name, or a null pointer if no + * plugin exists for this game. + */ + MOBase::IPluginGame* game(const QString& name) const; + /** * @return the IPlugin interface to the currently managed game. */ -- cgit v1.3.1