summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlecmascript
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-02-17 03:39:45 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-02-17 03:39:45 (GMT)
commit9f12ede32d9eaadde7b1f72cf2191f39d5780d57 (patch)
tree96bbdc9d95c9cd9e087ab2f7c0d19e18e28a1e4a /tests/auto/declarative/qmlecmascript
parentb4754aa9a3761c1bcd8519280d98e34371f4ff10 (diff)
downloadQt-9f12ede32d9eaadde7b1f72cf2191f39d5780d57.zip
Qt-9f12ede32d9eaadde7b1f72cf2191f39d5780d57.tar.gz
Qt-9f12ede32d9eaadde7b1f72cf2191f39d5780d57.tar.bz2
Revert "Replace QList<>* support with QmlListProperty"
This was accidentally pushed early. This reverts commit 8454c53b304a4aba7c058b315041b3a38ad4fff5.
Diffstat (limited to 'tests/auto/declarative/qmlecmascript')
-rw-r--r--tests/auto/declarative/qmlecmascript/testtypes.h8
-rw-r--r--tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/auto/declarative/qmlecmascript/testtypes.h b/tests/auto/declarative/qmlecmascript/testtypes.h
index b307d9c..09c850d 100644
--- a/tests/auto/declarative/qmlecmascript/testtypes.h
+++ b/tests/auto/declarative/qmlecmascript/testtypes.h
@@ -78,7 +78,7 @@ class MyQmlObject : public QObject
Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty NOTIFY stringChanged)
Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty NOTIFY objectChanged)
Q_PROPERTY(QmlList<QObject *> *objectQmlListProperty READ objectQmlListProperty CONSTANT)
- Q_PROPERTY(QmlListProperty<QObject> objectListProperty READ objectListProperty CONSTANT)
+ Q_PROPERTY(QList<QObject *> *objectListProperty READ objectListProperty CONSTANT)
Q_PROPERTY(int resettableProperty READ resettableProperty WRITE setResettableProperty RESET resetProperty)
public:
@@ -108,7 +108,7 @@ public:
}
QmlList<QObject *> *objectQmlListProperty() { return &m_objectQmlList; }
- QmlListProperty<QObject> objectListProperty() { return QmlListProperty<QObject>(this, m_objectQList); }
+ QList<QObject *> *objectListProperty() { return &m_objectQList; }
bool methodCalled() const { return m_methodCalled; }
bool methodIntCalled() const { return m_methodIntCalled; }
@@ -162,11 +162,11 @@ QML_DECLARE_TYPE(MyQmlObject);
class MyQmlContainer : public QObject
{
Q_OBJECT
- Q_PROPERTY(QmlListProperty<MyQmlObject> children READ children CONSTANT)
+ Q_PROPERTY(QList<MyQmlObject*>* children READ children CONSTANT)
public:
MyQmlContainer() {}
- QmlListProperty<MyQmlObject> children() { return QmlListProperty<MyQmlObject>(this, m_children); }
+ QList<MyQmlObject*> *children() { return &m_children; }
private:
QList<MyQmlObject*> m_children;
diff --git a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
index f8a4f5a..4edca69 100644
--- a/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
+++ b/tests/auto/declarative/qmlecmascript/tst_qmlecmascript.cpp
@@ -1612,7 +1612,7 @@ void tst_qmlecmascript::listToVariant()
QObject *object = component.create(&context);
QVERIFY(object != 0);
- QVERIFY(qvariant_cast<QmlListProperty<MyQmlObject> >(object->property("test")) == container.children());
+ QCOMPARE(object->property("test"), QVariant::fromValue(container.children()));
delete object;
}