aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-11-23 00:14:36 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2018-11-23 00:14:36 +0100
commit7a3b8bb16c90265b26907c90a04da79d3c694f0e (patch)
tree288d1684b404279cb86d208433e9167c78414b86 /src/main.cpp
parentAdd library check for Plasma and Breakpad configuration toggles (diff)
downloadsmolbote-7a3b8bb16c90265b26907c90a04da79d3c694f0e.tar.xz
Add About and Run actions to plugin submenu
- Remove plugin list from About dialog
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());