diff options
Diffstat (limited to 'tests')
7 files changed, 0 insertions, 192 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.1.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.1.qml deleted file mode 100644 index 9c289be..0000000 --- a/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.1.qml +++ /dev/null @@ -1,16 +0,0 @@ -import Qt.test 1.0 -import Qt 4.6 - -MyQmlObject { - id: root - - property bool test1 - property bool test2 - - qlistProperty: root - - Component.onCompleted: { - test1 = (qlistProperty.length == 1) - test2 = (qlistProperty[0] == root) - } -} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.2.qml deleted file mode 100644 index 8041f5c..0000000 --- a/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.2.qml +++ /dev/null @@ -1,17 +0,0 @@ -import Qt.test 1.0 -import Qt 4.6 - -MyQmlObject { - id: root - - property bool test1 - property bool test2 - - Component.onCompleted: { - qlistProperty = root - - test1 = (qlistProperty.length == 1) - test2 = (qlistProperty[0] == root) - } -} - diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.3.qml deleted file mode 100644 index df44e48..0000000 --- a/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.3.qml +++ /dev/null @@ -1,21 +0,0 @@ -import Qt.test 1.0 -import Qt 4.6 - -MyQmlObject { - id: root - - property bool test1 - property bool test2 - property bool test3 - property bool test4 - - objectProperty: QtObject { id: obj } - qlistProperty: [ root, obj ] - - Component.onCompleted: { - test1 = (qlistProperty.length == 2) - test2 = (qlistProperty[0] == root) - test3 = (qlistProperty[1] == obj) - test4 = (qlistProperty[2] == null) - } -} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.4.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.4.qml deleted file mode 100644 index 33c3576..0000000 --- a/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.4.qml +++ /dev/null @@ -1,22 +0,0 @@ -import Qt.test 1.0 -import Qt 4.6 - -MyQmlObject { - id: root - - property bool test1 - property bool test2 - property bool test3 - property bool test4 - - objectProperty: QtObject { id: obj } - - Component.onCompleted: { - qlistProperty = [ root, obj ] - - test1 = (qlistProperty.length == 2) - test2 = (qlistProperty[0] == root) - test3 = (qlistProperty[1] == obj) - test4 = (qlistProperty[2] == null) - } -} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.5.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.5.qml deleted file mode 100644 index 3fd497c..0000000 --- a/tests/auto/declarative/qdeclarativeecmascript/data/qlistOfQObjects.5.qml +++ /dev/null @@ -1,35 +0,0 @@ -import Qt.test 1.0 -import Qt 4.6 - -MyQmlObject { - id: root - - property bool test1 - property bool test2 - property bool test3 - property bool test4 - property bool test5 - property bool test6 - property bool test7 - property bool test8 - - objectProperty: QtObject { id: obj } - - Component.onCompleted: { - qlistProperty = [ root, obj ] - - test1 = (qlistProperty.length == 2) - test2 = (qlistProperty[0] == root) - test3 = (qlistProperty[1] == obj) - test4 = (qlistProperty[2] == null) - - var a = qlistProperty; - a.reverse(); - qlistProperty = a - - test5 = (qlistProperty.length == 2) - test7 = (qlistProperty[0] == obj) - test6 = (qlistProperty[1] == root) - test8 = (qlistProperty[2] == null) - } -} diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h index d8ec452..faad8b7 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h @@ -91,7 +91,6 @@ class MyQmlObject : public QObject Q_PROPERTY(QDeclarativeListProperty<QObject> objectListProperty READ objectListProperty CONSTANT) Q_PROPERTY(int resettableProperty READ resettableProperty WRITE setResettableProperty RESET resetProperty) Q_PROPERTY(QRegExp regExp READ regExp WRITE setRegExp) - Q_PROPERTY(QList<QObject *> qlistProperty READ qlistProperty WRITE setQListProperty) public: MyQmlObject(): m_methodCalled(false), m_methodIntCalled(false), m_object(0), m_value(0), m_resetProperty(13) {} @@ -143,9 +142,6 @@ public: QRegExp regExp() { return m_regExp; } void setRegExp(const QRegExp ®Exp) { m_regExp = regExp; } - QList<QObject *> qlistProperty() const { return m_objectQList2; } - void setQListProperty(const QList<QObject *> &v) { m_objectQList2 = v; } - signals: void basicSignal(); void argumentSignal(int a, QString b, qreal c); @@ -171,8 +167,6 @@ private: int m_value; int m_resetProperty; QRegExp m_regExp; - - QList<QObject *> m_objectQList2; }; QML_DECLARE_TYPEINFO(MyQmlObject, QML_HAS_ATTACHED_PROPERTIES) diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index a2625da..77dd4b8 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -130,7 +130,6 @@ private slots: void qlistqobjectMethods(); void strictlyEquals(); void compiled(); - void qlistOfQObjects(); void bug1(); void dynamicCreationCrash(); @@ -2066,80 +2065,6 @@ void tst_qdeclarativeecmascript::compiled() delete object; } -// Test manipulating QList<QObject *> properties -void tst_qdeclarativeecmascript::qlistOfQObjects() -{ - { - QDeclarativeComponent component(&engine, TEST_FILE("qlistOfQObjects.1.qml")); - - QObject *object = component.create(); - QVERIFY(object != 0); - - QCOMPARE(object->property("test1").toBool(), true); - QCOMPARE(object->property("test2").toBool(), true); - - delete object; - } - - { - QDeclarativeComponent component(&engine, TEST_FILE("qlistOfQObjects.2.qml")); - - QObject *object = component.create(); - QVERIFY(object != 0); - - QCOMPARE(object->property("test1").toBool(), true); - QCOMPARE(object->property("test2").toBool(), true); - - delete object; - } - - { - QDeclarativeComponent component(&engine, TEST_FILE("qlistOfQObjects.3.qml")); - - QObject *object = component.create(); - QVERIFY(object != 0); - - QCOMPARE(object->property("test1").toBool(), true); - QCOMPARE(object->property("test2").toBool(), true); - QCOMPARE(object->property("test3").toBool(), true); - QCOMPARE(object->property("test4").toBool(), true); - - delete object; - } - - { - QDeclarativeComponent component(&engine, TEST_FILE("qlistOfQObjects.4.qml")); - - QObject *object = component.create(); - QVERIFY(object != 0); - - QCOMPARE(object->property("test1").toBool(), true); - QCOMPARE(object->property("test2").toBool(), true); - QCOMPARE(object->property("test3").toBool(), true); - QCOMPARE(object->property("test4").toBool(), true); - - delete object; - } - - { - QDeclarativeComponent component(&engine, TEST_FILE("qlistOfQObjects.5.qml")); - - QObject *object = component.create(); - QVERIFY(object != 0); - - QCOMPARE(object->property("test1").toBool(), true); - QCOMPARE(object->property("test2").toBool(), true); - QCOMPARE(object->property("test3").toBool(), true); - QCOMPARE(object->property("test4").toBool(), true); - QCOMPARE(object->property("test5").toBool(), true); - QCOMPARE(object->property("test6").toBool(), true); - QCOMPARE(object->property("test7").toBool(), true); - QCOMPARE(object->property("test8").toBool(), true); - - delete object; - } -} - QTEST_MAIN(tst_qdeclarativeecmascript) #include "tst_qdeclarativeecmascript.moc" |