##// END OF EJS Templates
Loads SciQlop plugins
Alexandre Leroux -
r85:34decf396cd1
parent child
Show More
@@ -25,6 +25,16
25 25 #include <SqpApplication.h>
26 26 #include <qglobal.h>
27 27
28 #include <Plugin/PluginManager.h>
29 #include <QDir>
30
31 namespace {
32
33 /// Name of the directory containing the plugins
34 const auto PLUGIN_DIRECTORY_NAME = QStringLiteral("plugins");
35
36 } // namespace
37
28 38 int main(int argc, char *argv[])
29 39 {
30 40 SqpApplication a{argc, argv};
@@ -34,5 +44,16 int main(int argc, char *argv[])
34 44 MainWindow w;
35 45 w.show();
36 46
47 // Loads plugins
48 auto pluginDir = QDir{sqpApp->applicationDirPath()};
49 pluginDir.mkdir(PLUGIN_DIRECTORY_NAME);
50 pluginDir.cd(PLUGIN_DIRECTORY_NAME);
51
52 qCDebug(LOG_PluginManager())
53 << QObject::tr("Plugin directory: %1").arg(pluginDir.absolutePath());
54
55 PluginManager pluginManager{};
56 pluginManager.loadPlugins(pluginDir);
57
37 58 return a.exec();
38 59 }
General Comments 0
You need to be logged in to leave comments. Login now