diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-10-19 04:29:57 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-10-19 04:30:11 (GMT) |
commit | e92730ceebb4aa96704052236d45938a82c03dd8 (patch) | |
tree | c49b5b0f70e0a7d435253b100d4d765297e118d6 /tests/auto/declarative | |
parent | 121f28073fd9d71ec7da632c90e582a41e1929e5 (diff) | |
download | Qt-e92730ceebb4aa96704052236d45938a82c03dd8.zip Qt-e92730ceebb4aa96704052236d45938a82c03dd8.tar.gz Qt-e92730ceebb4aa96704052236d45938a82c03dd8.tar.bz2 |
Call the correct vme meta object when connecting alias signals
Task-number: QTCREATORBUG-2769
Diffstat (limited to 'tests/auto/declarative')
3 files changed, 51 insertions, 6 deletions
diff --git a/tests/auto/declarative/qdeclarativelanguage/data/AliasPropertyChangeSignalsType.qml b/tests/auto/declarative/qdeclarativelanguage/data/AliasPropertyChangeSignalsType.qml new file mode 100644 index 0000000..0bc2025 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/AliasPropertyChangeSignalsType.qml @@ -0,0 +1,20 @@ +import QtQuick 1.0 + +QtObject { + id: root + + signal sig1 + signal sig2 + signal sig3 + signal sig4 + + property alias aliasProperty: root.realProperty + + property int realProperty: 0 + + property bool test: false + + Component.onCompleted: { + root.realProperty = 10; + } +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertyChangeSignals.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertyChangeSignals.2.qml new file mode 100644 index 0000000..a15a718 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/aliasPropertyChangeSignals.2.qml @@ -0,0 +1,10 @@ +import QtQuick 1.0 + +AliasPropertyChangeSignalsType { + id: root + onAliasPropertyChanged: root.test = true + + function blah() {} + property int a +} + diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 061ac48..2aa5e0a 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -1890,15 +1890,30 @@ void tst_qdeclarativelanguage::initTestCase() void tst_qdeclarativelanguage::aliasPropertyChangeSignals() { - QDeclarativeComponent component(&engine, TEST_FILE("aliasPropertyChangeSignals.qml")); + { + QDeclarativeComponent component(&engine, TEST_FILE("aliasPropertyChangeSignals.qml")); - VERIFY_ERRORS(0); - QObject *o = component.create(); - QVERIFY(o != 0); + VERIFY_ERRORS(0); + QObject *o = component.create(); + QVERIFY(o != 0); - QCOMPARE(o->property("test").toBool(), true); + QCOMPARE(o->property("test").toBool(), true); - delete o; + delete o; + } + + // QTCREATORBUG-2769 + { + QDeclarativeComponent component(&engine, TEST_FILE("aliasPropertyChangeSignals.2.qml")); + + VERIFY_ERRORS(0); + QObject *o = component.create(); + QVERIFY(o != 0); + + QCOMPARE(o->property("test").toBool(), true); + + delete o; + } } QTEST_MAIN(tst_qdeclarativelanguage) |