summaryrefslogtreecommitdiffstats
path: root/data/plugin/pluginmanager.h
diff options
context:
space:
mode:
authorAndrew <forkk@forkk.net>2013-02-20 19:10:09 -0600
committerAndrew <forkk@forkk.net>2013-02-20 19:10:09 -0600
commitdd2e836b4cf4cfa043f9ea2911f58f1d22d4e282 (patch)
tree07e99dd9c2858e2e46075a649751049c3195b437 /data/plugin/pluginmanager.h
parentf71479ec33562c9a0ebbdb335bef5e2824a12710 (diff)
downloadMultiMC-dd2e836b4cf4cfa043f9ea2911f58f1d22d4e282.tar
MultiMC-dd2e836b4cf4cfa043f9ea2911f58f1d22d4e282.tar.gz
MultiMC-dd2e836b4cf4cfa043f9ea2911f58f1d22d4e282.tar.lz
MultiMC-dd2e836b4cf4cfa043f9ea2911f58f1d22d4e282.tar.xz
MultiMC-dd2e836b4cf4cfa043f9ea2911f58f1d22d4e282.zip
Split MultiMC up into a few separate libraries.
Fixed plugin system. Tons of other stuff...
Diffstat (limited to 'data/plugin/pluginmanager.h')
-rw-r--r--data/plugin/pluginmanager.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/data/plugin/pluginmanager.h b/data/plugin/pluginmanager.h
index 8e2dba0d..b93fd6d2 100644
--- a/data/plugin/pluginmanager.h
+++ b/data/plugin/pluginmanager.h
@@ -42,12 +42,6 @@ public:
bool loadPlugins(QString pluginDir);
/*!
- * \brief Initializes the instance type plugins.
- * \return True if successful. False on failure.
- */
- bool initInstanceTypes();
-
- /*!
* \brief Checks how many plugins are loaded.
* \return The number of plugins.
*/
@@ -58,12 +52,19 @@ public:
* \param index The index of the plugin to get.
* \return The plugin at the given index.
*/
- QObject *getPlugin(int index);
+ QPluginLoader *getPlugin(int index);
+
+ /*!
+ * \brief Initializes and registers all the instance types.
+ * This is done by going through the plugin list and registering all of the
+ * plugins that derive from the InstanceTypeInterface with the InstanceLoader.
+ */
+ void initInstanceTypes();
private:
PluginManager();
- QList<QObject *> m_plugins;
+ QList<QPluginLoader *> m_plugins;
static PluginManager manager;
};