changeset 1087:6fcb632384ba plugin-startup-test

Show warning to the user when plugin population has problems
author Chris Cannam
date Tue, 19 Jan 2016 12:32:30 +0000
parents 744f1bbc6222
children 36de09aaa614
files .hgsubstate main/MainWindow.cpp main/MainWindow.h
diffstat 3 files changed, 13 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate	Mon Jan 11 14:18:56 2016 +0000
+++ b/.hgsubstate	Tue Jan 19 12:32:30 2016 +0000
@@ -5,5 +5,5 @@
 68ae618c6b0e442d08a71d39217784a08f2a8de3 icons/scalable
 55ece8862b6d3a54aad271a53f9c1615e5d3bcf8 sv-dependency-builds
 39e94df71d24b92f30f8215cb542d6e481e42281 svapp
-9cdb4206aceb57fa6eb9b69ba93977deb686f89e svcore
+afed8be790321ebc805b2620bcddb91405886c8d svcore
 7242fe160c19015cf79440223b2f998236ea205f svgui
--- a/main/MainWindow.cpp	Mon Jan 11 14:18:56 2016 +0000
+++ b/main/MainWindow.cpp	Tue Jan 19 12:32:30 2016 +0000
@@ -300,6 +300,7 @@
     connect(this, SIGNAL(activity(QString)),
             m_activityLog, SLOT(activityHappened(QString)));
     connect(this, SIGNAL(replacedDocument()), this, SLOT(documentReplaced()));
+
     m_activityLog->hide();
 
     m_unitConverter->hide();
@@ -328,6 +329,9 @@
         m_surveyer = 0;
         m_versionTester = 0;
     }
+
+    QString warning = TransformFactory::getInstance()->getPluginPopulationWarning();
+    if (warning != "") pluginPopulationWarning(warning);
 }
 
 MainWindow::~MainWindow()
@@ -4137,6 +4141,12 @@
 }
 
 void
+MainWindow::pluginPopulationWarning(QString warning)
+{
+    QMessageBox::warning(this, tr("Problems loading plugins"), warning);
+}
+
+void
 MainWindow::midiEventsAvailable()
 {
     Pane *currentPane = 0;
--- a/main/MainWindow.h	Mon Jan 11 14:18:56 2016 +0000
+++ b/main/MainWindow.h	Tue Jan 19 12:32:30 2016 +0000
@@ -147,6 +147,8 @@
     virtual void midiEventsAvailable();
     virtual void playStatusChanged(bool);
 
+    virtual void pluginPopulationWarning(QString);
+
     virtual void saveSessionAsTemplate();
     virtual void manageSavedTemplates();