diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-06-05 13:38:44 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-06-05 14:38:57 (GMT) |
commit | ff9497f82d605688453e2f027bab7c719048f0d2 (patch) | |
tree | 78bcc7aab46aba17460fa698e88ccc548ba19864 /tests/auto/qwidget | |
parent | 0302c0103da731b7af8d749b1643c50e39d81c00 (diff) | |
download | Qt-ff9497f82d605688453e2f027bab7c719048f0d2.zip Qt-ff9497f82d605688453e2f027bab7c719048f0d2.tar.gz Qt-ff9497f82d605688453e2f027bab7c719048f0d2.tar.bz2 |
Revert two of my commits, restoring the original fix for focus handling.
The fix that was introduced adds regressions, and I don't see a way we
can fix it without breaking someone elses code. So restoring the
original fix that just avoid a crash (autotest by Thierry is included).
Revert "Revert Avoid a crash when setting a focus in a widget
hierarchy containing"
Revert "Setting a focus on a widget hierarchy which contains both
visible and invisible widgets could cause a crash."
This reverts commit be833a4f25a8ec8c3dd7a8ac4fa4b0507c93e7ee.
This partially reverts commit 1a7da7096bbda17197738061902f4489af234bc0
Reviewed-by: Thierry Bastian
Reviewed-by: Prasanth Ullattil
Diffstat (limited to 'tests/auto/qwidget')
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 3fad366..041aa7a 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -351,7 +351,6 @@ private slots: void toplevelLineEditFocus(); void focusWidget_task254563(); - void focusWidget_mixed_widget_hierarchy(); private: bool ensureScreenSize(int width, int height); @@ -8995,22 +8994,5 @@ void tst_QWidget::focusWidget_task254563() QVERIFY(top.focusWidget() != widget); //dangling pointer } -void tst_QWidget::focusWidget_mixed_widget_hierarchy() -{ - QWidget top; - top.show(); - QWidget notvisible(&top); - QWidget *visible = new QWidget(¬visible); - visible->show(); - - visible->setFocus(); - notvisible.setFocus(); - notvisible.show(); - QCOMPARE(top.focusWidget(), visible); - QCOMPARE(notvisible.focusWidget(), visible); - QCOMPARE(visible->focusWidget(), visible); -} - - QTEST_MAIN(tst_QWidget) #include "tst_qwidget.moc" |