summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2010-07-12 06:21:34 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2010-07-13 00:00:39 (GMT)
commit686fca1c78e6d4d2ba597dd75d982c76647c7707 (patch)
treefaa3b83407b4ec02efe1b57e5eec5efc0770e956 /tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
parent8979501336a441e585d38b711ee0fe4a284040f3 (diff)
downloadQt-686fca1c78e6d4d2ba597dd75d982c76647c7707.zip
Qt-686fca1c78e6d4d2ba597dd75d982c76647c7707.tar.gz
Qt-686fca1c78e6d4d2ba597dd75d982c76647c7707.tar.bz2
wantsFocus should be based on FocusScope chain, not parent chain.
Ancestors of the item with focus should only report wantsFocus as true when they are a FocusScope or a top-level item. Reviewed-by: Aaron Kennedy Reviewed-by: Yann Bodson
Diffstat (limited to 'tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp')
-rw-r--r--tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
index 4a57def..ffb2105 100644
--- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
+++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp
@@ -703,11 +703,8 @@ void tst_QDeclarativeItem::propertyChanges()
QCOMPARE(focusArguments.at(0).toBool(), true);
QCOMPARE(parentItem->hasFocus(), false);
- QCOMPARE(parentItem->wantsFocus(), true);
- QCOMPARE(wantsFocusSpy.count(),1);
- QList<QVariant> wantsFocusArguments = wantsFocusSpy.first();
- QVERIFY(wantsFocusArguments.count() == 1);
- QCOMPARE(wantsFocusArguments.at(0).toBool(), true);
+ QCOMPARE(parentItem->wantsFocus(), false);
+ QCOMPARE(wantsFocusSpy.count(),0);
delete canvas;
}