From 708d3c9e9470a84bce48b26cf747d561a5a4c985 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Tue, 15 Sep 2009 11:01:59 +0200 Subject: Fix tst_QWidget::inputFocus_task257832 on Windows The widget must be created before calling QInputContext::setFocusWidget. Otherwise we run into an assertion. Yes, this only occurs in debug configuration but its still annoying... Cherry-pick of commit d6b8f81a2440e7a507ecbb1becd90ef284510787 from master. Reviewed-by: thartman Conflicts: tests/auto/qwidget/tst_qwidget.cpp --- tests/auto/qwidget/tst_qwidget.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 86caddb..ad814fd 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -9293,6 +9293,7 @@ void tst_QWidget::inputFocus_task257832() if (!context) QSKIP("No input context", SkipSingle); widget->setFocus(); + widget->winId(); // make sure, widget has been created context->setFocusWidget(widget); QCOMPARE(context->focusWidget(), static_cast(widget)); widget->setReadOnly(true); -- cgit v0.12