diff options
author | A-Team <ateam@pad.test.qt.nokia.com> | 2010-10-05 22:00:13 (GMT) |
---|---|---|
committer | A-Team <ateam@pad.test.qt.nokia.com> | 2010-10-05 22:00:13 (GMT) |
commit | cbd26879cb942a2c4ee7ccd919ee18a45b5b87bb (patch) | |
tree | beb5782a54a102fad2ed78c8231f6ef093ceada9 /tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp | |
parent | e3bcf44684aa30271c986911b328c9d9c372912a (diff) | |
parent | 591807899deb3fc479bd32722756f74b899977d5 (diff) | |
download | Qt-cbd26879cb942a2c4ee7ccd919ee18a45b5b87bb.zip Qt-cbd26879cb942a2c4ee7ccd919ee18a45b5b87bb.tar.gz Qt-cbd26879cb942a2c4ee7ccd919ee18a45b5b87bb.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp')
-rw-r--r-- | tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp index e9dad6b..bbbf73e 100644 --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp @@ -214,6 +214,9 @@ void tst_QDeclarativeItem::keys() QFocusEvent fe(QEvent::FocusIn); QApplication::sendEvent(canvas, &fe); + QVERIFY(canvas->rootObject()); + QCOMPARE(canvas->rootObject()->property("isEnabled").toBool(), true); + QKeyEvent key(QEvent::KeyPress, Qt::Key_A, Qt::NoModifier, "A", false, 1); QApplication::sendEvent(canvas, &key); QCOMPARE(testObject->mKey, int(Qt::Key_A)); @@ -285,6 +288,7 @@ void tst_QDeclarativeItem::keys() testObject->reset(); canvas->rootContext()->setContextProperty("enableKeyHanding", QVariant(false)); + QCOMPARE(canvas->rootObject()->property("isEnabled").toBool(), false); key = QKeyEvent(QEvent::KeyPress, Qt::Key_Return, Qt::NoModifier, "", false, 1); QApplication::sendEvent(canvas, &key); @@ -292,6 +296,7 @@ void tst_QDeclarativeItem::keys() QVERIFY(!key.isAccepted()); canvas->rootContext()->setContextProperty("enableKeyHanding", QVariant(true)); + QCOMPARE(canvas->rootObject()->property("isEnabled").toBool(), true); key = QKeyEvent(QEvent::KeyPress, Qt::Key_Return, Qt::NoModifier, "", false, 1); QApplication::sendEvent(canvas, &key); |