summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2013-06-05 09:51:48 +0200
committerTannin <devnull@localhost>2013-06-05 09:51:48 +0200
commit1606c1366f5d0ba304334b0e57680fb99feb88b9 (patch)
tree2023762f0c10f3c8801ffc4f0d0d1b4c1f40ffbc /src/mainwindow.cpp
parent8077c1ad7324e44059fbdc89401eaeb774b8cb84 (diff)
- 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
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp16
1 files changed, 10 insertions, 6 deletions
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;