mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-07-01 02:46:59 +03:00
Split MultiMC up into a few separate libraries.
Fixed plugin system. Tons of other stuff...
This commit is contained in:
parent
f71479ec33
commit
dd2e836b4c
42 changed files with 404 additions and 300 deletions
|
|
@ -41,12 +41,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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue