forked from qt-creator/qt-creator
Fix compilation with Qt 5.
Account for api_changes. Change-Id: I9ac9738be9364bbb291c4870c5df1c24818065b8 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
@@ -675,9 +675,13 @@ void PluginManager::startTests()
|
||||
methods.append("arg0");
|
||||
// We only want slots starting with "test"
|
||||
for (int i = mo->methodOffset(); i < mo->methodCount(); ++i) {
|
||||
if (QByteArray(mo->method(i).signature()).startsWith("test") &&
|
||||
!QByteArray(mo->method(i).signature()).endsWith("_data()")) {
|
||||
QString method = QString::fromLatin1(mo->method(i).signature());
|
||||
#if QT_VERSION >= 0x050000
|
||||
const QByteArray signature = mo->method(i).methodSignature();
|
||||
#else
|
||||
const QByteArray signature = mo->method(i).signature();
|
||||
#endif
|
||||
if (signature.startsWith("test") && !signature.endsWith("_data()")) {
|
||||
const QString method = QString::fromLatin1(signature);
|
||||
methods.append(method.left(method.size()-2));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user