diff options
Diffstat (limited to 'tests/auto/declarative/states/tst_states.cpp')
-rw-r--r-- | tests/auto/declarative/states/tst_states.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/declarative/states/tst_states.cpp b/tests/auto/declarative/states/tst_states.cpp index f67c737..d6df37e 100644 --- a/tests/auto/declarative/states/tst_states.cpp +++ b/tests/auto/declarative/states/tst_states.cpp @@ -54,6 +54,7 @@ private slots: void basicExtension(); void basicBinding(); void signalOverride(); + void signalOverrideCrash(); void parentChange(); void anchorChanges(); void script(); @@ -356,6 +357,23 @@ void tst_states::signalOverride() } } +void tst_states::signalOverrideCrash() +{ + QmlEngine engine; + + QmlComponent rectComponent(&engine, SRCDIR "/data/signalOverrideCrash.qml"); + MyRect *rect = qobject_cast<MyRect*>(rectComponent.create()); + QVERIFY(rect != 0); + + //QCOMPARE(rect->color(),QColor("red")); + //rect->doSomething(); + //QCOMPARE(rect->color(),QColor("blue")); + + rect->setState("overridden"); + rect->doSomething(); + //QCOMPARE(rect->color(),QColor("green")); +} + void tst_states::parentChange() { QmlEngine engine; |