# HG changeset patch # User Chris Cannam # Date 1460733186 -3600 # Node ID 2f628dc9a0b0ac0ccd3d8333e8bdbc541e88e0b2 # Parent 98664afd518b39e7ef0ea185bb5231f897162282 Check for plugin scan helper checker helper program in suitable directory, & tidy up warning messages somewhat diff -r 98664afd518b -r 2f628dc9a0b0 plugin/PluginScan.cpp --- a/plugin/PluginScan.cpp Thu Apr 14 16:52:55 2016 +0100 +++ b/plugin/PluginScan.cpp Fri Apr 15 16:13:06 2016 +0100 @@ -19,6 +19,7 @@ #include "checker/knownplugins.h" #include +#include using std::string; @@ -49,12 +50,12 @@ } void -PluginScan::scan() +PluginScan::scan(QString helperExecutablePath) { delete m_kp; m_succeeded = false; try { - m_kp = new KnownPlugins("./helper", m_logger); //!!! + m_kp = new KnownPlugins(helperExecutablePath.toStdString(), m_logger); m_succeeded = true; } catch (const std::exception &e) { cerr << "ERROR: PluginScan::scan: " << e.what() << endl; @@ -85,8 +86,10 @@ { if (!m_succeeded) { return QObject::tr("Failed to scan for plugins" - "

Failed to scan for plugins at startup " - "(application installation problem?)

"); + "

Failed to scan for plugins at startup. Possibly " + "the plugin checker helper program was not correctly " + "installed alongside %1?

") + .arg(QCoreApplication::applicationName()); } if (!m_kp) { return QObject::tr("Did not scan for plugins" @@ -101,6 +104,9 @@ return QObject::tr("Failed to load plugins" "

Failed to load one or more plugin libraries:

") - + QString(report.c_str()); + + QString(report.c_str()) + + QObject::tr("

These plugins may be incompatible with the system, " + "and will be ignored during this run of %1.

") + .arg(QCoreApplication::applicationName()); } diff -r 98664afd518b -r 2f628dc9a0b0 plugin/PluginScan.h --- a/plugin/PluginScan.h Thu Apr 14 16:52:55 2016 +0100 +++ b/plugin/PluginScan.h Fri Apr 15 16:13:06 2016 +0100 @@ -24,7 +24,7 @@ public: static PluginScan *getInstance(); - void scan(); + void scan(QString helperExecutablePath); bool scanSucceeded() const;