diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-12-04 13:41:06 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2020-12-04 13:41:06 +0100 |
| commit | a1ab717e9e4fd72071cd01d9ceb74e7ba10ffafd (patch) | |
| tree | 60fb738dac73bd02792c8dc5bf0313597dfe51e4 | |
| parent | 7a3bc0cd23e637d66a1f78809f7229e665391cdb (diff) | |
Minor cleaning (comments, names).
| -rw-r--r-- | src/organizercore.cpp | 2 | ||||
| -rw-r--r-- | src/plugincontainer.cpp | 2 | ||||
| -rw-r--r-- | src/plugincontainer.h | 26 |
3 files changed, 19 insertions, 11 deletions
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.
@@ -272,6 +269,17 @@ public: 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.
*/
MOBase::IPlugin* managedGame() const;
|
