chore: remove Singleton & replace getIApp with getApp (#5514)
This commit is contained in:
@@ -35,10 +35,8 @@ PluginController::PluginController(const Paths &paths_)
|
||||
{
|
||||
}
|
||||
|
||||
void PluginController::initialize(Settings &settings, const Paths &paths)
|
||||
void PluginController::initialize(Settings &settings)
|
||||
{
|
||||
(void)paths;
|
||||
|
||||
// actuallyInitialize will be called by this connection
|
||||
settings.pluginsEnabled.connect([this](bool enabled) {
|
||||
if (enabled)
|
||||
@@ -354,7 +352,7 @@ bool PluginController::reload(const QString &id)
|
||||
}
|
||||
for (const auto &[cmd, _] : it->second->ownedCommands)
|
||||
{
|
||||
getIApp()->getCommands()->unregisterPluginCommand(cmd);
|
||||
getApp()->getCommands()->unregisterPluginCommand(cmd);
|
||||
}
|
||||
it->second->ownedCommands.clear();
|
||||
QDir loadDir = it->second->loadDirectory_;
|
||||
|
||||
Reference in New Issue
Block a user