From e62d439bda65801ae6f3d2e73bec1a706a46ca90 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 9 Oct 2015 19:26:05 -0300 Subject: Start the Plugin Manager This bit of code will try to load all plugins avaliable. Now I need to port a Facebook plugin for this new system, then I'll delete the old preferences widget. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- subsurface-core/pluginmanager.cpp | 3 +++ subsurface-desktop-helper.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/subsurface-core/pluginmanager.cpp b/subsurface-core/pluginmanager.cpp index 41d226f61..290f43df0 100644 --- a/subsurface-core/pluginmanager.cpp +++ b/subsurface-core/pluginmanager.cpp @@ -11,6 +11,9 @@ PluginManager& PluginManager::instance() { return self; } +PluginManager::PluginManager() { +} + void PluginManager::loadPlugins() { QDir pluginsDir(qApp->applicationDirPath()); diff --git a/subsurface-desktop-helper.cpp b/subsurface-desktop-helper.cpp index af366fb84..420f75249 100644 --- a/subsurface-desktop-helper.cpp +++ b/subsurface-desktop-helper.cpp @@ -4,6 +4,7 @@ #include "display.h" #include "desktop-widgets/mainwindow.h" #include "helpers.h" +#include "pluginmanager.h" #include #include @@ -30,6 +31,8 @@ void init_ui() { init_qt_late(); + PluginManager::instance().loadPlugins(); + window = new MainWindow(); if (existing_filename && existing_filename[0] != '\0') window->setTitle(MWTF_FILENAME); -- cgit v1.2.3-70-g09d2