diff options
author | Joerg Bornemann <joerg.bornemann@trolltech.com> | 2009-08-12 12:24:52 (GMT) |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@trolltech.com> | 2009-08-12 12:57:57 (GMT) |
commit | d6b8f81a2440e7a507ecbb1becd90ef284510787 (patch) | |
tree | 78cd3adc409ee2ba37dc100a007bb046314255b8 /tests | |
parent | c847301367e58282893365d68cee3aa90b7588e4 (diff) | |
download | Qt-d6b8f81a2440e7a507ecbb1becd90ef284510787.zip Qt-d6b8f81a2440e7a507ecbb1becd90ef284510787.tar.gz Qt-d6b8f81a2440e7a507ecbb1becd90ef284510787.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...
Reviewed-by: thartman
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index ab29c35..d798fd0 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); |