summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/states/tst_states.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2010-01-12 03:24:36 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2010-01-12 03:24:36 (GMT)
commitb328136a920ec57ca13db5a39310293c4eaef27c (patch)
treed0f926735992ae75ae6be5bbb5185a2151b72e81 /tests/auto/declarative/states/tst_states.cpp
parenta53008073216540bb5cfd40563e4b33ba139832c (diff)
parent57198878ba5300aac4cd9e1481c9b8d2e372a267 (diff)
downloadQt-b328136a920ec57ca13db5a39310293c4eaef27c.zip
Qt-b328136a920ec57ca13db5a39310293c4eaef27c.tar.gz
Qt-b328136a920ec57ca13db5a39310293c4eaef27c.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'tests/auto/declarative/states/tst_states.cpp')
-rw-r--r--tests/auto/declarative/states/tst_states.cpp18
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 9d9cf07..3301048 100644
--- a/tests/auto/declarative/states/tst_states.cpp
+++ b/tests/auto/declarative/states/tst_states.cpp
@@ -70,6 +70,7 @@ private slots:
void explicitChanges();
void propertyErrors();
void incorrectRestoreBug();
+ void autoStateAtStartupRestoreBug();
void deletingChange();
void deletingState();
void tempState();
@@ -743,6 +744,23 @@ void tst_states::incorrectRestoreBug()
QCOMPARE(rect->color(),QColor("green"));
}
+void tst_states::autoStateAtStartupRestoreBug()
+{
+ QmlEngine engine;
+
+ QmlComponent component(&engine, SRCDIR "/data/autoStateAtStartupRestoreBug.qml");
+ QObject *obj = component.create();
+
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->property("test").toInt(), 3);
+
+ obj->setProperty("input", 2);
+
+ QCOMPARE(obj->property("test").toInt(), 9);
+
+ delete obj;
+}
+
void tst_states::deletingChange()
{
QmlEngine engine;