comparison 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
comparison
equal deleted inserted replaced
1276:0c6cdcf53641 1277:7293bc5ee7f8
1494 } 1494 }
1495 1495
1496 TransformFactory *factory = TransformFactory::getInstance(); 1496 TransformFactory *factory = TransformFactory::getInstance();
1497 1497
1498 TransformList transforms = factory->getAllTransformDescriptions(); 1498 TransformList transforms = factory->getAllTransformDescriptions();
1499
1500 if (factory->getStartupFailureReport() != "") {
1501 pluginPopulationWarning();
1502 }
1503
1499 vector<TransformDescription::Type> types = factory->getAllTransformTypes(); 1504 vector<TransformDescription::Type> types = factory->getAllTransformTypes();
1500 1505
1501 map<TransformDescription::Type, map<QString, SubdividingMenu *> > categoryMenus; 1506 map<TransformDescription::Type, map<QString, SubdividingMenu *> > categoryMenus;
1502 map<TransformDescription::Type, map<QString, SubdividingMenu *> > makerMenus; 1507 map<TransformDescription::Type, map<QString, SubdividingMenu *> > makerMenus;
1503 1508
4154 } 4159 }
4155 4160
4156 void 4161 void
4157 MainWindow::pluginPopulationWarning() 4162 MainWindow::pluginPopulationWarning()
4158 { 4163 {
4159 QString warning = PluginScan::getInstance()->getStartupFailureReport(); 4164 QString scanWarning = PluginScan::getInstance()->getStartupFailureReport();
4160 QMessageBox::warning(this, tr("Problems loading plugins"), warning); 4165 QString factWarning = TransformFactory::getInstance()->getStartupFailureReport();
4166 QString warning;
4167 if (factWarning != "") {
4168 // The order of events on startup implies that, if scanWarning
4169 // and factWarning are both present, then we have already been
4170 // called once for scanWarning so don't want to report it again
4171 warning = factWarning;
4172 } else if (scanWarning != "") {
4173 warning = scanWarning;
4174 }
4175 if (warning != "") {
4176 emit hideSplash();
4177 QMessageBox::warning(this, tr("Problems loading plugins"), warning);
4178 }
4161 } 4179 }
4162 4180
4163 void 4181 void
4164 MainWindow::midiEventsAvailable() 4182 MainWindow::midiEventsAvailable()
4165 { 4183 {