Skip to content
Snippets Groups Projects
Commit ed93b998 authored by Nikolai Kosjar's avatar Nikolai Kosjar
Browse files

Plugin tests: code cosmetics


Change-Id: I789dac25d978535457e62702ce3fc9912cf7282f
Reviewed-by: default avatarDaniel Teske <daniel.teske@digia.com>
parent 8a1aa5dc
No related branches found
No related tags found
No related merge requests found
......@@ -672,17 +672,18 @@ void PluginManager::startTests()
// Collect all test functions/methods of the plugin.
QStringList allTestFunctions;
const QMetaObject *mo = pluginSpec->plugin()->metaObject();
const QMetaObject *metaObject = pluginSpec->plugin()->metaObject();
for (int i = mo->methodOffset(); i < mo->methodCount(); ++i) {
for (int i = metaObject->methodOffset(); i < metaObject->methodCount(); ++i) {
#if QT_VERSION >= 0x050000
const QByteArray signature = mo->method(i).methodSignature();
const QByteArray signature = metaObject->method(i).methodSignature();
#else
const QByteArray signature = mo->method(i).signature();
const QByteArray signature = metaObject->method(i).signature();
#endif
if (signature.startsWith("test") && !signature.endsWith("_data()")) {
const QString method = QString::fromLatin1(signature);
allTestFunctions.append(method.left(method.size()-2));
const QString methodName = method.left(method.size() - 2);
allTestFunctions.append(methodName);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment