summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-11-05 23:57:50 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-11-05 23:57:50 (GMT)
commit225dc9cb3f50f9692f3ccb5111c9bbdc26425eda (patch)
treed67e5f27a341e9bb6a5a41c4ead0df1664b6b686 /tests
parent2487c4c17e4d5016c40d7c50d7c732157a00c39c (diff)
parent4266b0616bb5d67244173dbe4d9d417dbf4d302f (diff)
downloadQt-225dc9cb3f50f9692f3ccb5111c9bbdc26425eda.zip
Qt-225dc9cb3f50f9692f3ccb5111c9bbdc26425eda.tar.gz
Qt-225dc9cb3f50f9692f3ccb5111c9bbdc26425eda.tar.bz2
Merge branch 'kinetic-declarativeui' of scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/states/data/signalOverrideCrash.qml15
-rw-r--r--tests/auto/declarative/states/tst_states.cpp18
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/declarative/states/data/signalOverrideCrash.qml b/tests/auto/declarative/states/data/signalOverrideCrash.qml
new file mode 100644
index 0000000..702fa86
--- /dev/null
+++ b/tests/auto/declarative/states/data/signalOverrideCrash.qml
@@ -0,0 +1,15 @@
+import Qt 4.6
+import Qt.test 1.0
+
+MyRectangle {
+ id: rect
+
+ width: 100; height: 100
+ states: State {
+ name: "overridden"
+ PropertyChanges {
+ target: rect
+ onDidSomething: rect.state = ""
+ }
+ }
+}
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;