summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeecmascript
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativeecmascript')
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml4
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/testtypes.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml
index 4395ba3..2548005 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/scope.3.qml
@@ -1,10 +1,10 @@
import Qt 4.7
+import Qt.test 1.0
-Item {
+MyQmlObject {
id: root
property int foo: 12
- property int console: 11
property bool test1: foo == 12
property bool test2: console != 11
diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
index 7bb8a8e..fef76ef 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
+++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h
@@ -86,6 +86,7 @@ class MyQmlObject : public QObject
Q_PROPERTY(bool trueProperty READ trueProperty CONSTANT)
Q_PROPERTY(bool falseProperty READ falseProperty CONSTANT)
Q_PROPERTY(int value READ value WRITE setValue)
+ Q_PROPERTY(int console READ console CONSTANT)
Q_PROPERTY(QString stringProperty READ stringProperty WRITE setStringProperty NOTIFY stringChanged)
Q_PROPERTY(QObject *objectProperty READ objectProperty WRITE setObjectProperty NOTIFY objectChanged)
Q_PROPERTY(QDeclarativeListProperty<QObject> objectListProperty READ objectListProperty CONSTANT)
@@ -142,6 +143,7 @@ public:
QRegExp regExp() { return m_regExp; }
void setRegExp(const QRegExp &regExp) { m_regExp = regExp; }
+ int console() const { return 11; }
signals:
void basicSignal();
void argumentSignal(int a, QString b, qreal c);