aboutsummaryrefslogtreecommitdiffstats
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/qtbug_22464.qml15
-rw-r--r--tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp14
2 files changed, 28 insertions, 1 deletions
diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22464.qml b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22464.qml
new file mode 100644
index 0000000000..19f26736f1
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativeecmascript/data/qtbug_22464.qml
@@ -0,0 +1,15 @@
+import QtQuick 2.0
+
+QtObject {
+ property alias value: inner.value
+ property bool test: false
+
+ property variant dummy: QtObject {
+ id: inner
+ property variant value: Qt.rgba(1, 1, 0, 1);
+ }
+
+ Component.onCompleted: {
+ test = (value == Qt.rgba(1, 1, 0, 1));
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
index 11e33bec1d..e784ffbce3 100644
--- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
+++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp
@@ -177,7 +177,7 @@ private slots:
void sequenceConversionThreads();
void sequenceConversionBindings();
void sequenceConversionCopy();
-
+ void qtbug_22464();
void bug1();
void bug2();
void dynamicCreationCrash();
@@ -1643,6 +1643,18 @@ void tst_qdeclarativeecmascript::undefinedResetsProperty()
}
}
+// Aliases to variant properties should work
+void tst_qdeclarativeecmascript::qtbug_22464()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("qtbug_22464.qml"));
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+}
+
// QTBUG-6781
void tst_qdeclarativeecmascript::bug1()
{