PluginManager: Skip test run in case of plugin errors

...otherwise it might happen that no test functions will be executed,
which is highly confusing, especially since no error dialog will be
shown.

If there are errors, just print a warning and quit. If we do not quit,
the error dialog will be shown which might block build machines.

Change-Id: Ic347dfba8fefc0e0f375cf2363265008df56ee53
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Nikolai Kosjar
2014-07-11 15:52:47 +02:00
parent 18429ff390
commit 72ecbb7255

View File

@@ -691,6 +691,13 @@ void PluginManager::formatPluginVersions(QTextStream &str)
void PluginManager::startTests()
{
if (PluginManager::hasError()) {
qWarning("Errors occurred while loading plugins, skipping test run. "
"For details, start without \"-test\" option.");
QTimer::singleShot(1, QCoreApplication::instance(), SLOT(quit()));
return;
}
#ifdef WITH_TESTS
foreach (const PluginManagerPrivate::TestSpec &testSpec, d->testSpecs) {
const PluginSpec * const pluginSpec = testSpec.pluginSpec;