summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2010-10-06 05:38:39 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2010-10-06 05:38:39 (GMT)
commit8209815ee6eea3cbc1ca7b71ce8b68ae8930c0bd (patch)
treeef904bc40bd4c63ea7b5eb6eb7e6308beed7ace3 /tests/auto/declarative
parentcd4389efee184d2ad65b52c5ef64793868f1a004 (diff)
downloadQt-8209815ee6eea3cbc1ca7b71ce8b68ae8930c0bd.zip
Qt-8209815ee6eea3cbc1ca7b71ce8b68ae8930c0bd.tar.gz
Qt-8209815ee6eea3cbc1ca7b71ce8b68ae8930c0bd.tar.bz2
Autotest
Task-number: QTBUG-14089
Diffstat (limited to 'tests/auto/declarative')
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/data/aliasPropertyChangeSignals.qml16
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp15
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertyChangeSignals.qml b/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertyChangeSignals.qml
new file mode 100644
index 0000000..7944deb
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertyChangeSignals.qml
@@ -0,0 +1,16 @@
+import QtQuick 1.0
+
+QtObject {
+ id: root
+
+ property alias aliasProperty: root.realProperty
+ onAliasPropertyChanged: root.test = true
+
+ property int realProperty: 0
+
+ property bool test: false
+
+ Component.onCompleted: {
+ root.realProperty = 10;
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 8609a7e..3c82fc5 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -119,6 +119,7 @@ private slots:
void cppnamespace();
void aliasProperties();
void aliasPropertiesAndSignals();
+ void aliasPropertyChangeSignals();
void componentCompositeType();
void i18n();
void i18n_data();
@@ -1816,6 +1817,20 @@ void tst_qdeclarativelanguage::initTestCase()
out.write(in.readAll());
}
+void tst_qdeclarativelanguage::aliasPropertyChangeSignals()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("aliasPropertyChangeSignals.qml"));
+
+ VERIFY_ERRORS(0);
+ QObject *o = component.create();
+ QVERIFY(o != 0);
+
+ QEXPECT_FAIL("", "QTBUG-14089", Abort);
+ QCOMPARE(o->property("test").toBool(), true);
+
+ delete o;
+}
+
QTEST_MAIN(tst_qdeclarativelanguage)
#include "tst_qdeclarativelanguage.moc"