summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-02-26 07:09:23 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-02-26 07:09:23 (GMT)
commite179dafbac29e50886331b2dfb262c3874bb0a71 (patch)
treed863e1ffb5c0519a74ea4686aefd80ed913216e6 /tests/auto
parent63b4ded7451913e944e2b7e016746650cfc13fe6 (diff)
parentbd0f827713187c95df3a5cf0e496fe18a1489971 (diff)
downloadQt-e179dafbac29e50886331b2dfb262c3874bb0a71.zip
Qt-e179dafbac29e50886331b2dfb262c3874bb0a71.tar.gz
Qt-e179dafbac29e50886331b2dfb262c3874bb0a71.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-qml
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp251
1 files changed, 119 insertions, 132 deletions
diff --git a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
index c72c9e7..0333d98 100644
--- a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
+++ b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp
@@ -140,18 +140,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty()
QCOMPARE(prop.name(), QString());
QCOMPARE(prop.read(), QVariant());
QCOMPARE(prop.write(QVariant()), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), false);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QVERIFY(prop.method().signature() == 0);
QCOMPARE(prop.type(), QDeclarativeProperty::Invalid);
QCOMPARE(prop.isProperty(), false);
- QCOMPARE(prop.isDefault(), false);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
@@ -167,7 +166,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty()
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression == 0);
- QCOMPARE(prop.coreIndex(), -1);
+ QCOMPARE(prop.index(), -1);
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;
@@ -234,18 +233,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object()
QCOMPARE(prop.name(), QString());
QCOMPARE(prop.read(), QVariant());
QCOMPARE(prop.write(QVariant()), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), false);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QVERIFY(prop.method().signature() == 0);
QCOMPARE(prop.type(), QDeclarativeProperty::Invalid);
QCOMPARE(prop.isProperty(), false);
- QCOMPARE(prop.isDefault(), false);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
@@ -261,7 +259,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object()
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression == 0);
- QCOMPARE(prop.coreIndex(), -1);
+ QCOMPARE(prop.index(), -1);
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;
@@ -281,18 +279,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object()
QCOMPARE(prop.name(), QString("defaultProperty"));
QCOMPARE(prop.read(), QVariant(10));
QCOMPARE(prop.write(QVariant()), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), true);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), true);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QVERIFY(prop.method().signature() == 0);
- QCOMPARE(prop.type(), (QDeclarativeProperty::Type)(QDeclarativeProperty::Property | QDeclarativeProperty::Default));
+ QCOMPARE(prop.type(), QDeclarativeProperty::Property);
QCOMPARE(prop.isProperty(), true);
- QCOMPARE(prop.isDefault(), true);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), true);
QCOMPARE(prop.isResettable(), false);
@@ -310,7 +307,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object()
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression == 0);
- QCOMPARE(prop.coreIndex(), dobject.metaObject()->indexOfProperty("defaultProperty"));
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfProperty("defaultProperty"));
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;
@@ -335,18 +332,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
QCOMPARE(prop.name(), QString());
QCOMPARE(prop.read(), QVariant());
QCOMPARE(prop.write(QVariant()), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), false);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QVERIFY(prop.method().signature() == 0);
QCOMPARE(prop.type(), QDeclarativeProperty::Invalid);
QCOMPARE(prop.isProperty(), false);
- QCOMPARE(prop.isDefault(), false);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
@@ -362,7 +358,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression == 0);
- QCOMPARE(prop.coreIndex(), -1);
+ QCOMPARE(prop.index(), -1);
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;
@@ -382,18 +378,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
QCOMPARE(prop.name(), QString("defaultProperty"));
QCOMPARE(prop.read(), QVariant(10));
QCOMPARE(prop.write(QVariant()), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), true);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), true);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QVERIFY(prop.method().signature() == 0);
QCOMPARE(prop.type(), QDeclarativeProperty::Property);
QCOMPARE(prop.isProperty(), true);
- QCOMPARE(prop.isDefault(), false);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), true);
QCOMPARE(prop.isResettable(), false);
@@ -411,7 +406,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression == 0);
- QCOMPARE(prop.coreIndex(), dobject.metaObject()->indexOfProperty("defaultProperty"));
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfProperty("defaultProperty"));
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;
@@ -431,18 +426,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
QCOMPARE(prop.name(), QString("onClicked"));
QCOMPARE(prop.read(), QVariant());
QCOMPARE(prop.write(QVariant("Hello")), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), false);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QCOMPARE(QString(prop.method().signature()), QString("clicked()"));
QCOMPARE(prop.type(), QDeclarativeProperty::SignalProperty);
QCOMPARE(prop.isProperty(), false);
- QCOMPARE(prop.isDefault(), false);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
@@ -459,7 +453,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression != 0);
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == expression);
- QCOMPARE(prop.coreIndex(), dobject.metaObject()->indexOfMethod("clicked()"));
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfMethod("clicked()"));
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;
@@ -479,18 +473,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
QCOMPARE(prop.name(), QString("onOddlyNamedNotifySignal"));
QCOMPARE(prop.read(), QVariant());
QCOMPARE(prop.write(QVariant("Hello")), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), false);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QCOMPARE(QString(prop.method().signature()), QString("oddlyNamedNotifySignal()"));
QCOMPARE(prop.type(), QDeclarativeProperty::SignalProperty);
QCOMPARE(prop.isProperty(), false);
- QCOMPARE(prop.isDefault(), false);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
@@ -507,7 +500,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string()
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression != 0);
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == expression);
- QCOMPARE(prop.coreIndex(), dobject.metaObject()->indexOfMethod("oddlyNamedNotifySignal()"));
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfMethod("oddlyNamedNotifySignal()"));
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;
@@ -532,18 +525,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context()
QCOMPARE(prop.name(), QString());
QCOMPARE(prop.read(), QVariant());
QCOMPARE(prop.write(QVariant()), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), false);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QVERIFY(prop.method().signature() == 0);
QCOMPARE(prop.type(), QDeclarativeProperty::Invalid);
QCOMPARE(prop.isProperty(), false);
- QCOMPARE(prop.isDefault(), false);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
@@ -559,7 +551,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context()
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression == 0);
- QCOMPARE(prop.coreIndex(), -1);
+ QCOMPARE(prop.index(), -1);
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;
@@ -579,18 +571,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context()
QCOMPARE(prop.name(), QString("defaultProperty"));
QCOMPARE(prop.read(), QVariant(10));
QCOMPARE(prop.write(QVariant()), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), true);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), true);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QVERIFY(prop.method().signature() == 0);
- QCOMPARE(prop.type(), (QDeclarativeProperty::Type)(QDeclarativeProperty::Property | QDeclarativeProperty::Default));
+ QCOMPARE(prop.type(), QDeclarativeProperty::Property);
QCOMPARE(prop.isProperty(), true);
- QCOMPARE(prop.isDefault(), true);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), true);
QCOMPARE(prop.isResettable(), false);
@@ -608,7 +599,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context()
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression == 0);
- QCOMPARE(prop.coreIndex(), dobject.metaObject()->indexOfProperty("defaultProperty"));
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfProperty("defaultProperty"));
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;
@@ -633,18 +624,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
QCOMPARE(prop.name(), QString());
QCOMPARE(prop.read(), QVariant());
QCOMPARE(prop.write(QVariant()), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), false);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QVERIFY(prop.method().signature() == 0);
QCOMPARE(prop.type(), QDeclarativeProperty::Invalid);
QCOMPARE(prop.isProperty(), false);
- QCOMPARE(prop.isDefault(), false);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
@@ -660,7 +650,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression == 0);
- QCOMPARE(prop.coreIndex(), -1);
+ QCOMPARE(prop.index(), -1);
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;
@@ -680,18 +670,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
QCOMPARE(prop.name(), QString("defaultProperty"));
QCOMPARE(prop.read(), QVariant(10));
QCOMPARE(prop.write(QVariant()), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), true);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), true);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QVERIFY(prop.method().signature() == 0);
QCOMPARE(prop.type(), QDeclarativeProperty::Property);
QCOMPARE(prop.isProperty(), true);
- QCOMPARE(prop.isDefault(), false);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), true);
QCOMPARE(prop.isResettable(), false);
@@ -709,7 +698,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == 0);
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression == 0);
- QCOMPARE(prop.coreIndex(), dobject.metaObject()->indexOfProperty("defaultProperty"));
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfProperty("defaultProperty"));
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;
@@ -729,18 +718,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
QCOMPARE(prop.name(), QString("onClicked"));
QCOMPARE(prop.read(), QVariant());
QCOMPARE(prop.write(QVariant("Hello")), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), false);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QCOMPARE(QString(prop.method().signature()), QString("clicked()"));
QCOMPARE(prop.type(), QDeclarativeProperty::SignalProperty);
QCOMPARE(prop.isProperty(), false);
- QCOMPARE(prop.isDefault(), false);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
@@ -757,7 +745,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression != 0);
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == expression);
- QCOMPARE(prop.coreIndex(), dobject.metaObject()->indexOfMethod("clicked()"));
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfMethod("clicked()"));
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;
@@ -777,18 +765,17 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
QCOMPARE(prop.name(), QString("onOddlyNamedNotifySignal"));
QCOMPARE(prop.read(), QVariant());
QCOMPARE(prop.write(QVariant("Hello")), false);
- QCOMPARE(prop.hasChangedNotifier(), false);
- QCOMPARE(prop.needsChangedNotifier(), false);
- QCOMPARE(prop.connectNotifier(0, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, SLOT(deleteLater())), false);
- QCOMPARE(prop.connectNotifier(obj, 0), false);
- QCOMPARE(prop.connectNotifier(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
- QCOMPARE(prop.connectNotifier(obj, -1), false);
+ QCOMPARE(prop.hasNotifySignal(), false);
+ QCOMPARE(prop.needsNotifySignal(), false);
+ QCOMPARE(prop.connectNotifySignal(0, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, SLOT(deleteLater())), false);
+ QCOMPARE(prop.connectNotifySignal(obj, 0), false);
+ QCOMPARE(prop.connectNotifySignal(0, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, obj->metaObject()->indexOfMethod("deleteLater()")), false);
+ QCOMPARE(prop.connectNotifySignal(obj, -1), false);
QCOMPARE(QString(prop.method().signature()), QString("oddlyNamedNotifySignal()"));
QCOMPARE(prop.type(), QDeclarativeProperty::SignalProperty);
QCOMPARE(prop.isProperty(), false);
- QCOMPARE(prop.isDefault(), false);
QCOMPARE(prop.isWritable(), false);
QCOMPARE(prop.isDesignable(), false);
QCOMPARE(prop.isResettable(), false);
@@ -805,7 +792,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context()
QVERIFY(QDeclarativePropertyPrivate::setSignalExpression(prop, expression) == 0);
QVERIFY(expression != 0);
QVERIFY(QDeclarativePropertyPrivate::signalExpression(prop) == expression);
- QCOMPARE(prop.coreIndex(), dobject.metaObject()->indexOfMethod("oddlyNamedNotifySignal()"));
+ QCOMPARE(prop.index(), dobject.metaObject()->indexOfMethod("oddlyNamedNotifySignal()"));
QCOMPARE(QDeclarativePropertyPrivate::valueTypeCoreIndex(prop), -1);
delete obj;