forked from qt-creator/qt-creator
Plugin tests: Fix '-test all'.
Change-Id: I97554a61d5f42bf46df30d003135d212fa353fb9 Reviewed-by: Bill King <bill.king@nokia.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
committed by
Eike Ziller
parent
2d1e1fb864
commit
463c9999bb
@@ -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()));
|
||||
|
||||
Reference in New Issue
Block a user