Commit 463c9999 authored by Christian Kamm's avatar Christian Kamm Committed by Eike Ziller
Browse files

Plugin tests: Fix '-test all'.



Change-Id: I97554a61d5f42bf46df30d003135d212fa353fb9
Reviewed-by: default avatarBill King <bill.king@nokia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 2d1e1fb8
......@@ -648,6 +648,8 @@ void PluginManager::startTests()
{
#ifdef WITH_TESTS
foreach (PluginSpec *pluginSpec, d->testSpecs) {
if (!pluginSpec->plugin())
continue;
const QMetaObject *mo = pluginSpec->plugin()->metaObject();
QStringList methods;
methods.append("arg0");
......@@ -659,7 +661,10 @@ void PluginManager::startTests()
methods.append(method.left(method.size()-2));
}
}
QTest::qExec(pluginSpec->plugin(), methods);
// Don't run QTest::qExec with only one argument, that'd run
// *all* slots as tests.
if (methods.size() > 1)
QTest::qExec(pluginSpec->plugin(), methods);
}
if (!d->testSpecs.isEmpty())
QTimer::singleShot(1, QCoreApplication::instance(), SLOT(quit()));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment