diff main/MainWindow.cpp @ 1283:ca5dcee081ef project-file-rework

Merge from branch piper
author Chris Cannam
date Tue, 25 Oct 2016 11:06:00 +0100
parents 7293bc5ee7f8
children ed3009a50f81
line wrap: on
line diff
--- a/main/MainWindow.cpp	Mon Oct 24 17:54:50 2016 +0100
+++ b/main/MainWindow.cpp	Tue Oct 25 11:06:00 2016 +0100
@@ -1496,6 +1496,11 @@
     TransformFactory *factory = TransformFactory::getInstance();
 
     TransformList transforms = factory->getAllTransformDescriptions();
+
+    if (factory->getStartupFailureReport() != "") {
+        pluginPopulationWarning();
+    }
+    
     vector<TransformDescription::Type> types = factory->getAllTransformTypes();
 
     map<TransformDescription::Type, map<QString, SubdividingMenu *> > categoryMenus;
@@ -4156,8 +4161,21 @@
 void
 MainWindow::pluginPopulationWarning()
 {
-    QString warning = PluginScan::getInstance()->getStartupFailureReport();
-    QMessageBox::warning(this, tr("Problems loading plugins"), warning);
+    QString scanWarning = PluginScan::getInstance()->getStartupFailureReport();
+    QString factWarning = TransformFactory::getInstance()->getStartupFailureReport();
+    QString warning;
+    if (factWarning != "") {
+        // The order of events on startup implies that, if scanWarning
+        // and factWarning are both present, then we have already been
+        // called once for scanWarning so don't want to report it again
+        warning = factWarning;
+    } else if (scanWarning != "") {
+        warning = scanWarning;
+    }
+    if (warning != "") {
+        emit hideSplash();
+        QMessageBox::warning(this, tr("Problems loading plugins"), warning);
+    }
 }
 
 void