From 1606c1366f5d0ba304334b0e57680fb99feb88b9 Mon Sep 17 00:00:00 2001 From: Tannin Date: Wed, 5 Jun 2013 09:51:48 +0200 Subject: - install plugins now get a chance to update name, version and modid of mods - NCC now makes name, version and modid from the info.xml file available to the installer - integrated fomod installer also uses version and modid from the info.xml - mods can now be renamed during installation - configurator plugin now highlights changed keys and saves changes --- src/mainwindow.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/mainwindow.cpp') diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 5cbfa72a..fb88bbad 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -967,13 +967,17 @@ bool MainWindow::registerPlugin(QObject *plugin) if (verifyPlugin(proxy)) { QStringList pluginNames = proxy->pluginList(QCoreApplication::applicationDirPath() + "/" + ToQString(AppConfig::pluginPath())); foreach (const QString &pluginName, pluginNames) { - QObject *proxiedPlugin = proxy->instantiate(pluginName); - if (proxiedPlugin != NULL) { - if (registerPlugin(proxiedPlugin)) { - qDebug("loaded plugin \"%s\"", pluginName.toUtf8().constData()); - } else { - qWarning("plugin \"%s\" failed to load", pluginName.toUtf8().constData()); + try { + QObject *proxiedPlugin = proxy->instantiate(pluginName); + if (proxiedPlugin != NULL) { + if (registerPlugin(proxiedPlugin)) { + qDebug("loaded plugin \"%s\"", pluginName.toUtf8().constData()); + } else { + qWarning("plugin \"%s\" failed to load", pluginName.toUtf8().constData()); + } } + } catch (const std::exception &e) { + reportError(tr("failed to init plugin %1: %2").arg(pluginName).arg(e.what())); } } return true; -- cgit v1.3.1