Mercurial > hg > sonic-visualiser
diff main/MainWindow.cpp @ 1277:7293bc5ee7f8 piper
Error reporting for Piper server startup
author | Chris Cannam |
---|---|
date | Fri, 21 Oct 2016 16:24:30 +0100 |
parents | 65b8c009a9f2 |
children | ed3009a50f81 |
line wrap: on
line diff
--- a/main/MainWindow.cpp Fri Oct 21 14:51:22 2016 +0100 +++ b/main/MainWindow.cpp Fri Oct 21 16:24:30 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