|
|
@ -17,9 +17,9 @@ |
|
|
|
|
|
|
|
|
|
|
|
#include <QApplication> |
|
|
|
#include <QApplication> |
|
|
|
#include <QLayout> |
|
|
|
#include <QLayout> |
|
|
|
|
|
|
|
#include <QPluginLoader> |
|
|
|
#include <QSettings> |
|
|
|
#include <QSettings> |
|
|
|
#include <QShortcut> |
|
|
|
#include <QShortcut> |
|
|
|
#include <QPluginLoader> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <mtx/requests.hpp> |
|
|
|
#include <mtx/requests.hpp> |
|
|
|
|
|
|
|
|
|
|
@ -488,23 +488,23 @@ MainWindow::showDialog(QWidget *dialog) |
|
|
|
bool |
|
|
|
bool |
|
|
|
MainWindow::loadJdenticonPlugin() |
|
|
|
MainWindow::loadJdenticonPlugin() |
|
|
|
{ |
|
|
|
{ |
|
|
|
QDir pluginsDir(qApp->applicationDirPath()); |
|
|
|
QDir pluginsDir(qApp->applicationDirPath()); |
|
|
|
|
|
|
|
|
|
|
|
bool plugins = pluginsDir.cd("plugins"); |
|
|
|
bool plugins = pluginsDir.cd("plugins"); |
|
|
|
if (plugins) { |
|
|
|
if (plugins) { |
|
|
|
foreach (QString fileName, pluginsDir.entryList(QDir::Files)) { |
|
|
|
foreach (QString fileName, pluginsDir.entryList(QDir::Files)) { |
|
|
|
QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName)); |
|
|
|
QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName)); |
|
|
|
QObject *plugin = pluginLoader.instance(); |
|
|
|
QObject *plugin = pluginLoader.instance(); |
|
|
|
if (plugin) { |
|
|
|
if (plugin) { |
|
|
|
jdenticonInteface_ = qobject_cast<JdenticonInterface *>(plugin); |
|
|
|
jdenticonInteface_ = qobject_cast<JdenticonInterface *>(plugin); |
|
|
|
if (jdenticonInteface_) { |
|
|
|
if (jdenticonInteface_) { |
|
|
|
nhlog::ui()->info("Found jdenticon plugin."); |
|
|
|
nhlog::ui()->info("Found jdenticon plugin."); |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
nhlog::ui()->info("jdenticon plugin not found."); |
|
|
|
nhlog::ui()->info("jdenticon plugin not found."); |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |