diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-09-02 00:58:11 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2009-09-02 00:58:11 (GMT) |
commit | 74774eb9e7f5b232fdafd067f19b765ede87146f (patch) | |
tree | c00ca34b926e4cdb064dce2321088bee9bc310cd | |
parent | 5ef36ea88e15bb4a12575c6639b1d9e6c3be9de6 (diff) | |
parent | dbdaaa78c6b7c7a9498de9703d15b654eab163de (diff) | |
download | Qt-74774eb9e7f5b232fdafd067f19b765ede87146f.zip Qt-74774eb9e7f5b232fdafd067f19b765ede87146f.tar.gz Qt-74774eb9e7f5b232fdafd067f19b765ede87146f.tar.bz2 |
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
-rw-r--r-- | tests/auto/declarative/qmlparser/tst_qmlparser.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp index 36471a4..e953717 100644 --- a/tests/auto/declarative/qmlparser/tst_qmlparser.cpp +++ b/tests/auto/declarative/qmlparser/tst_qmlparser.cpp @@ -429,23 +429,25 @@ void tst_qmlparser::autoComponentCreation() void tst_qmlparser::propertyValueSource() { - QVERIFY(false); - -/* Does not compile... - QmlComponent component(&engine, TEST_FILE("propertyValueSource.qml")); VERIFY_ERRORS(0); MyTypeObject *object = qobject_cast<MyTypeObject *>(component.create()); QVERIFY(object != 0); - QList<QmlPropertyValueSource *> valueSources = - object->findChildren<QmlPropertyValueSource *>(); + + QList<QObject *> valueSources; + QObjectList allChildren = object->findChildren<QObject*>(); + foreach (QObject *child, allChildren) { + QmlType *type = QmlMetaType::qmlType(child->metaObject()); + if (type && type->propertyValueSourceCast() != -1) + valueSources.append(child); + } + QCOMPARE(valueSources.count(), 1); MyPropertyValueSource *valueSource = qobject_cast<MyPropertyValueSource *>(valueSources.at(0)); QVERIFY(valueSource != 0); QCOMPARE(valueSource->prop.object(), object); QCOMPARE(valueSource->prop.name(), QString(QLatin1String("intProperty"))); -*/ } void tst_qmlparser::attachedProperties() |