Mercurial > hg > sonic-visualiser
changeset 1148:b3b5885e7c2c pluginscan
Check for plugin scan helper checker helper program in suitable directory, & tidy up warning messages somewhat
author | Chris Cannam |
---|---|
date | Fri, 15 Apr 2016 16:13:06 +0100 |
parents | 29c6a7cb114e |
children | 3ba5bee2ace0 |
files | .hgsubstate main/MainWindow.cpp main/MainWindow.h main/main.cpp |
diffstat | 4 files changed, 22 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsubstate Thu Apr 14 16:53:03 2016 +0100 +++ b/.hgsubstate Fri Apr 15 16:13:06 2016 +0100 @@ -1,11 +1,11 @@ 442bdbbb17f3910898b892cc798794e32562a3f1 bqaudioio 28f51eb8bf2dd985b0c1a6d704fb65e14c2f0f25 bqresample a518ddd9dd68917393887d28dfee6221bc37fb66 bqvec -25e00373f597b72ea32c7227f78b2fa9556da481 checker +af46a17798be1c38cb6e7dcb88ad34508a77fd54 checker d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay 68ae618c6b0e442d08a71d39217784a08f2a8de3 icons/scalable 1e4f338ae482429a7ab9bdd0825242042354152f sv-dependency-builds f7ec9e410108fe08580cf61e328b73fe8c7e4e1d svapp -98664afd518b39e7ef0ea185bb5231f897162282 svcore +2f628dc9a0b0ac0ccd3d8333e8bdbc541e88e0b2 svcore 3691af49291c57a31883fd27190586737935b12b svgui 9a2998401bbe0a7b9e3233eeca5004542bc0014d vamp-plugin-sdk
--- a/main/MainWindow.cpp Thu Apr 14 16:53:03 2016 +0100 +++ b/main/MainWindow.cpp Fri Apr 15 16:13:06 2016 +0100 @@ -332,7 +332,9 @@ } QString warning = PluginScan::getInstance()->getStartupFailureReport(); - if (warning != "") pluginPopulationWarning(warning); + if (warning != "") { + QTimer::singleShot(500, this, SLOT(pluginPopulationWarning())); + } } MainWindow::~MainWindow() @@ -4142,8 +4144,9 @@ } void -MainWindow::pluginPopulationWarning(QString warning) +MainWindow::pluginPopulationWarning() { + QString warning = PluginScan::getInstance()->getStartupFailureReport(); QMessageBox::warning(this, tr("Problems loading plugins"), warning); }
--- a/main/MainWindow.h Thu Apr 14 16:53:03 2016 +0100 +++ b/main/MainWindow.h Fri Apr 15 16:13:06 2016 +0100 @@ -147,7 +147,7 @@ virtual void midiEventsAvailable(); virtual void playStatusChanged(bool); - virtual void pluginPopulationWarning(QString); + virtual void pluginPopulationWarning(); virtual void saveSessionAsTemplate(); virtual void manageSavedTemplates();
--- a/main/main.cpp Thu Apr 14 16:53:03 2016 +0100 +++ b/main/main.cpp Fri Apr 15 16:13:06 2016 +0100 @@ -334,8 +334,20 @@ StoreStartupLocale(); // Make known-plugins query as early as possible after showing - // splash screen - PluginScan::getInstance()->scan(); + // splash screen. This depends on our helper executable, which + // must exist either in the same directory as this one or + // (preferably) a subdirectory called "checker". + QString myDir = application.applicationDirPath(); + QString helperPath = myDir + "/checker/plugin-checker-helper"; + QString helperSuffix = ""; +#ifdef _WIN32 + helperSuffix = ".exe"; +#endif + if (!QFile(helperPath + helperSuffix).exists()) { + helperPath = myDir + "/plugin-checker-helper"; + } + helperPath += helperSuffix; + PluginScan::getInstance()->scan(helperPath); // Permit size_t and PropertyName to be used as args in queued signal calls qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName");