aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index c4e5d3f..3eb6dac 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -117,6 +117,7 @@ int main(int argc, char **argv)
QVector<QPluginLoader *> plugins;
CommandHash_t pluginCommands;
+ // Load plugins
for(const QString &path : Util::files(config->value<QString>("plugins.path").value())) {
QPluginLoader *loader = new QPluginLoader(path);
const bool loaded = loader->load();
@@ -124,7 +125,7 @@ int main(int argc, char **argv)
qDebug("Loading plugin %s %s", qUtf8Printable(path), loaded ? "[ok]" : "[failed]");
#endif
- if(loader->load()) {
+ if(loaded) {
plugins.append(loader);
auto *plugin = qobject_cast<PluginInterface *>(loader->instance());
pluginCommands.unite(plugin->commands());