From 6fcd431d04cf7416179d5ab30f656a6ce3926070 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 24 Mar 2011 17:38:26 +0100 Subject: Fix declarative after the last changes to the QObject internals --- src/declarative/qml/qmetaobjectbuilder.cpp | 2 +- src/declarative/qml/qmetaobjectbuilder_p.h | 2 +- .../declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/declarative/qml/qmetaobjectbuilder.cpp b/src/declarative/qml/qmetaobjectbuilder.cpp index 6a0226f..dc941e2 100644 --- a/src/declarative/qml/qmetaobjectbuilder.cpp +++ b/src/declarative/qml/qmetaobjectbuilder.cpp @@ -791,7 +791,7 @@ void QMetaObjectBuilder::addMetaObject } if ((members & StaticMetacall) != 0) { - if (priv(prototype->d.data)->revision >= 2) { + if (priv(prototype->d.data)->revision >= 6) { const QMetaObjectExtraData *extra = (const QMetaObjectExtraData *)(prototype->d.extradata); if (extra && extra->static_metacall) diff --git a/src/declarative/qml/qmetaobjectbuilder_p.h b/src/declarative/qml/qmetaobjectbuilder_p.h index 2678bff..d7085f8 100644 --- a/src/declarative/qml/qmetaobjectbuilder_p.h +++ b/src/declarative/qml/qmetaobjectbuilder_p.h @@ -169,7 +169,7 @@ public: int indexOfEnumerator(const QByteArray& name); int indexOfClassInfo(const QByteArray& name); - typedef int (*StaticMetacallFunction)(QMetaObject::Call, int, void **); + typedef QMetaObjectExtraData::StaticMetacallFunction StaticMetacallFunction; QMetaObjectBuilder::StaticMetacallFunction staticMetacallFunction() const; void setStaticMetacallFunction(QMetaObjectBuilder::StaticMetacallFunction value); diff --git a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp index 06baed8..1b9831c 100644 --- a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp +++ b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp @@ -140,9 +140,9 @@ void tst_QMetaObjectBuilder::mocVersionCheck() // whenenver moc changes. Once QMetaObjectBuilder has been // updated, this test can be changed to check for the next version. int version = int(QObject::staticMetaObject.d.data[0]); - QVERIFY(version == 4 || version == 5); + QVERIFY(version == 4 || version == 5 || version == 6); version = int(staticMetaObject.d.data[0]); - QVERIFY(version == 4 || version == 5); + QVERIFY(version == 4 || version == 5 || version == 6); } void tst_QMetaObjectBuilder::create() @@ -920,9 +920,9 @@ void tst_QMetaObjectBuilder::relatedMetaObject() QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::RelatedMetaObjects)); } -static int smetacall(QMetaObject::Call, int, void **) +static void smetacall(QObject *, QMetaObject::Call, int, void **) { - return 0; + return; } void tst_QMetaObjectBuilder::staticMetacall() -- cgit v0.12