summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@trolltech.com>2009-08-12 14:24:52 +0200
committerJoerg Bornemann <joerg.bornemann@trolltech.com>2009-08-12 14:57:57 +0200
commitd6b8f81a2440e7a507ecbb1becd90ef284510787 (patch)
tree78cd3adc409ee2ba37dc100a007bb046314255b8
parentc847301367e58282893365d68cee3aa90b7588e4 (diff)
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... Reviewed-by: thartman
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index ab29c3558..d798fd02d 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -8973,6 +8973,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(), widget);
widget->setReadOnly(true);