# HG changeset patch # User Chris Cannam # Date 1477063470 -3600 # Node ID 7293bc5ee7f8a5de8c36f3a89b6c6b320fb8b238 # Parent 0c6cdcf536414d122c100dcd86f24498a612d8e2 Error reporting for Piper server startup diff -r 0c6cdcf53641 -r 7293bc5ee7f8 .hgsubstate --- a/.hgsubstate Fri Oct 21 14:51:22 2016 +0100 +++ b/.hgsubstate Fri Oct 21 16:24:30 2016 +0100 @@ -8,6 +8,6 @@ 98be18165618992ccedc845ab021182dfd165aa7 piper-cpp d93140aac40bbc35361c32ddc9cae42038e9c05f sv-dependency-builds 7a3fa603190e50a8da656cfa1aeb109375085548 svapp -91ff08313375a61386bd9d6ec81fd509b49396a9 svcore +5d886b7b4029f82087d8d83fef22229295a193af svcore 07e8ac88bccefdf1a6d55e9c6ebb3fb8efb318ce svgui af4a1522ef1585686d3d2d9bc9433588f88f4ccc vamp-plugin-sdk diff -r 0c6cdcf53641 -r 7293bc5ee7f8 main/MainWindow.cpp --- 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 types = factory->getAllTransformTypes(); map > 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 diff -r 0c6cdcf53641 -r 7293bc5ee7f8 main/main.cpp --- a/main/main.cpp Fri Oct 21 14:51:22 2016 +0100 +++ b/main/main.cpp Fri Oct 21 16:24:30 2016 +0100 @@ -356,11 +356,11 @@ << ", trying in my own directory" << endl; helperPath = myDir + "/plugin-checker-helper"; } - helperPath += helperSuffix; if (!QFile(helperPath + helperSuffix).exists()) { cerr << "NOTE: helper not found at " << (helperPath + helperSuffix) << endl; } + helperPath += helperSuffix; PluginScan::getInstance()->scan(helperPath); // Permit size_t and PropertyName to be used as args in queued signal calls