Task-number: QTBUG-12457
Change-Id: I2d78c8885e488e51364fe4f2a30bde36fa78636a
Reviewed-on: http://codereview.qt.nokia.com/2057
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
--- /dev/null
+import QtQuick 1.0
+
+QtObject {
+ id: root
+
+ property bool test: false
+
+ signal mysignal(variant object);
+ function myslot(object)
+ {
+ test = (object == root);
+ }
+
+ Component.onCompleted: {
+ mysignal.connect(this, myslot);
+ mysignal(root);
+ }
+}
void scarceResources();
void propertyChangeSlots();
void elementAssign();
+ void objectPassThroughSignals();
void bug1();
void bug2();
delete object;
}
+// QTBUG-12457
+void tst_qdeclarativeecmascript::objectPassThroughSignals()
+{
+ QDeclarativeComponent component(&engine, TEST_FILE("objectsPassThroughSignals.qml"));
+
+ QObject *object = component.create();
+ QVERIFY(object != 0);
+
+ QCOMPARE(object->property("test").toBool(), true);
+
+ delete object;
+}
+
// Test that assigning a null object works
// Regressed with: df1788b4dbbb2826ae63f26bdf166342595343f4
void tst_qdeclarativeecmascript::nullObjectBinding()