diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-10-11 00:26:34 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-10-11 01:29:23 (GMT) |
commit | e11ee40cefc981fbdcfb10816039d4efb080fb17 (patch) | |
tree | d20d1e42784154aa1bc370dbc69940cb5c17ddc7 /tests/auto/qgraphicsitem | |
parent | aa7fa8608939676ba56e130214b85f5d0c3745df (diff) | |
download | Qt-e11ee40cefc981fbdcfb10816039d4efb080fb17.zip Qt-e11ee40cefc981fbdcfb10816039d4efb080fb17.tar.gz Qt-e11ee40cefc981fbdcfb10816039d4efb080fb17.tar.bz2 |
Don't give focus to a FocusScope that has had focus explicitly cleared.
If focus was explicitly cleared on a non-visible FocusScope, and then it
was made visible, it would incorrectly grab focus.
Task-number: QTBUG-13380
Diffstat (limited to 'tests/auto/qgraphicsitem')
-rw-r--r-- | tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 2901dd5..2ddccd2 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -9065,6 +9065,9 @@ void tst_QGraphicsItem::focusScope() scope2->hide(); scope2->show(); QVERIFY(!scope2->hasFocus()); + QVERIFY(scope1->hasFocus()); + scope2->setFocus(); + scope3->setFocus(); QVERIFY(scope3->hasFocus()); QGraphicsRectItem *rect4 = new QGraphicsRectItem; |