diff options
5 files changed, 19 insertions, 19 deletions
diff --git a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp index 826df4f..483d588 100644 --- a/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp +++ b/tests/auto/declarative/qdeclarativebinding/tst_qdeclarativebinding.cpp @@ -79,7 +79,7 @@ void tst_qdeclarativebinding::binding() QDeclarativeBind *binding = qobject_cast<QDeclarativeBind*>(rect->findChild<QDeclarativeBind*>("binding1")); QVERIFY(binding != 0); - QCOMPARE(binding->object(), rect); + QCOMPARE(binding->object(), qobject_cast<QObject*>(rect)); QCOMPARE(binding->property(), QLatin1String("text")); QCOMPARE(binding->value().toString(), QLatin1String("Hello")); diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index 0c3ca76..d0eb90e 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -153,7 +153,7 @@ QDeclarativeDebugPropertyReference tst_QDeclarativeDebug::findProperty(const QLi void tst_QDeclarativeDebug::waitForQuery(QDeclarativeDebugQuery *query) { QVERIFY(query); - QCOMPARE(query->parent(), this); + QCOMPARE(query->parent(), qobject_cast<QObject*>(this)); QVERIFY(query->state() == QDeclarativeDebugQuery::Waiting); if (!QDeclarativeDebugTest::waitForSignal(query, SIGNAL(stateChanged(QDeclarativeDebugQuery::State)))) QFAIL("query timed out"); diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 42426a2..72b6b28 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -690,7 +690,7 @@ void tst_qdeclarativelanguage::propertyValueSource() MyPropertyValueSource *valueSource = qobject_cast<MyPropertyValueSource *>(valueSources.at(0)); QVERIFY(valueSource != 0); - QCOMPARE(valueSource->prop.object(), object); + QCOMPARE(valueSource->prop.object(), qobject_cast<QObject*>(object)); QCOMPARE(valueSource->prop.name(), QString(QLatin1String("intProperty"))); } @@ -711,7 +711,7 @@ void tst_qdeclarativelanguage::propertyValueSource() MyPropertyValueSource *valueSource = qobject_cast<MyPropertyValueSource *>(valueSources.at(0)); QVERIFY(valueSource != 0); - QCOMPARE(valueSource->prop.object(), object); + QCOMPARE(valueSource->prop.object(), qobject_cast<QObject*>(object)); QCOMPARE(valueSource->prop.name(), QString(QLatin1String("intProperty"))); } } @@ -1033,12 +1033,12 @@ void tst_qdeclarativelanguage::scriptString() MyTypeObject *object = qobject_cast<MyTypeObject*>(component.create()); QVERIFY(object != 0); QCOMPARE(object->scriptProperty().script(), QString("foo + bar")); - QCOMPARE(object->scriptProperty().scopeObject(), object); + QCOMPARE(object->scriptProperty().scopeObject(), qobject_cast<QObject*>(object)); QCOMPARE(object->scriptProperty().context(), qmlContext(object)); QVERIFY(object->grouped() != 0); QCOMPARE(object->grouped()->script().script(), QString("console.log(1921)")); - QCOMPARE(object->grouped()->script().scopeObject(), object); + QCOMPARE(object->grouped()->script().scopeObject(), qobject_cast<QObject*>(object)); QCOMPARE(object->grouped()->script().context(), qmlContext(object)); } diff --git a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp index eed12ea..56166f2 100644 --- a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp +++ b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp @@ -305,7 +305,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object() QCOMPARE(prop.isDesignable(), true); QCOMPARE(prop.isResettable(), false); QCOMPARE(prop.isValid(), true); - QCOMPARE(prop.object(), &dobject); + QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal); QCOMPARE(prop.propertyType(), (int)QVariant::Int); QCOMPARE(prop.propertyTypeName(), "int"); @@ -404,7 +404,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.isDesignable(), true); QCOMPARE(prop.isResettable(), false); QCOMPARE(prop.isValid(), true); - QCOMPARE(prop.object(), &dobject); + QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal); QCOMPARE(prop.propertyType(), (int)QVariant::Int); QCOMPARE(prop.propertyTypeName(), "int"); @@ -452,7 +452,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); QCOMPARE(prop.isValid(), true); - QCOMPARE(prop.object(), &dobject); + QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); @@ -499,7 +499,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); QCOMPARE(prop.isValid(), true); - QCOMPARE(prop.object(), &dobject); + QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); @@ -597,7 +597,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context() QCOMPARE(prop.isDesignable(), true); QCOMPARE(prop.isResettable(), false); QCOMPARE(prop.isValid(), true); - QCOMPARE(prop.object(), &dobject); + QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal); QCOMPARE(prop.propertyType(), (int)QVariant::Int); QCOMPARE(prop.propertyTypeName(), "int"); @@ -696,7 +696,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.isDesignable(), true); QCOMPARE(prop.isResettable(), false); QCOMPARE(prop.isValid(), true); - QCOMPARE(prop.object(), &dobject); + QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal); QCOMPARE(prop.propertyType(), (int)QVariant::Int); QCOMPARE(prop.propertyTypeName(), "int"); @@ -744,7 +744,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); QCOMPARE(prop.isValid(), true); - QCOMPARE(prop.object(), &dobject); + QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); @@ -791,7 +791,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); QCOMPARE(prop.isValid(), true); - QCOMPARE(prop.object(), &dobject); + QCOMPARE(prop.object(), qobject_cast<QObject*>(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); QCOMPARE(prop.propertyType(), 0); QCOMPARE(prop.propertyTypeName(), (const char *)0); @@ -1254,7 +1254,7 @@ void tst_qdeclarativeproperty::writeObjectToList() QDeclarativeProperty prop(container, "children"); prop.write(qVariantFromValue(object)); QCOMPARE(list.count(), 1); - QCOMPARE(list.at(0), object); + QCOMPARE(list.at(0), qobject_cast<QObject*>(object)); } Q_DECLARE_METATYPE(QList<QObject *>); diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index 9e1d727..91883c9 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -565,7 +565,7 @@ void tst_qdeclarativestates::anchorChanges() rect->setState("right"); QCOMPARE(innerRect->x(), qreal(150)); QCOMPARE(aChanges->reset(), QString("left")); - QCOMPARE(aChanges->object(), innerRect); + QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect)); QCOMPARE(aChanges->right().item, rect->right().item); QCOMPARE(aChanges->right().anchorLine, rect->right().anchorLine); @@ -622,7 +622,7 @@ void tst_qdeclarativestates::anchorChanges3() QVERIFY(aChanges != 0); rect->setState("reanchored"); - QCOMPARE(aChanges->object(), innerRect); + QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect)); QCOMPARE(aChanges->left().item, leftGuideline->left().item); QCOMPARE(aChanges->left().anchorLine, leftGuideline->left().anchorLine); QCOMPARE(aChanges->right().item, rect->right().item); @@ -672,7 +672,7 @@ void tst_qdeclarativestates::anchorChanges4() QVERIFY(aChanges != 0); rect->setState("reanchored"); - QCOMPARE(aChanges->object(), innerRect); + QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect)); QCOMPARE(aChanges->horizontalCenter().item, bottomGuideline->horizontalCenter().item); QCOMPARE(aChanges->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine); QCOMPARE(aChanges->verticalCenter().item, leftGuideline->verticalCenter().item); @@ -707,7 +707,7 @@ void tst_qdeclarativestates::anchorChanges5() QVERIFY(aChanges != 0); rect->setState("reanchored"); - QCOMPARE(aChanges->object(), innerRect); + QCOMPARE(aChanges->object(), qobject_cast<QDeclarativeItem*>(innerRect)); QCOMPARE(aChanges->horizontalCenter().item, bottomGuideline->horizontalCenter().item); QCOMPARE(aChanges->horizontalCenter().anchorLine, bottomGuideline->horizontalCenter().anchorLine); QCOMPARE(aChanges->baseline().item, leftGuideline->baseline().item); |