diff options
Diffstat (limited to 'tests/auto/widgets/widgets/qlineedit')
-rw-r--r-- | tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp index 210e52f0aa..3fa669c1fb 100644 --- a/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/widgets/widgets/qlineedit/tst_qlineedit.cpp @@ -3902,6 +3902,11 @@ void tst_QLineEdit::inputMethod() // removing focus allows input method to commit preedit testWidget->setText(""); testWidget->activateWindow(); + // TODO setFocus should not be necessary here, because activateWindow + // should focus it, and the window is the QLineEdit. But the test can fail + // on Windows if we don't do this. If each test had a unique QLineEdit + // instance, maybe such problems would go away. + testWidget->setFocus(); QTRY_VERIFY(testWidget->hasFocus()); QTRY_COMPARE(qApp->focusObject(), testWidget); |