writable = aliasProperty.isWritable() && !prop.isReadOnly;
resettable = aliasProperty.isResettable() && !prop.isReadOnly;
- if (aliasProperty.type() < QVariant::UserType)
+ if (aliasProperty.type() < QVariant::UserType ||
+ aliasProperty.type() == QVariant::LastType /* for QVariant */ )
type = aliasProperty.type();
if (alias.count() == 3) {
--- /dev/null
+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));
+ }
+}
void sequenceConversionThreads();
void sequenceConversionBindings();
void sequenceConversionCopy();
-
+ void qtbug_22464();
void bug1();
void bug2();
void dynamicCreationCrash();
}
}
+// 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()
{