summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-09-15 09:01:59 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-09-15 09:04:46 (GMT)
commit708d3c9e9470a84bce48b26cf747d561a5a4c985 (patch)
treec12a245cc074f9ada4f3bedba498ce032296618b /tests/auto
parentcd764477c1fca556db2144769aa5e468f6e24e3c (diff)
downloadQt-708d3c9e9470a84bce48b26cf747d561a5a4c985.zip
Qt-708d3c9e9470a84bce48b26cf747d561a5a4c985.tar.gz
Qt-708d3c9e9470a84bce48b26cf747d561a5a4c985.tar.bz2
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
Diffstat (limited to 'tests/auto')
-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 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<QWidget*>(widget));
widget->setReadOnly(true);