diff options
author | Olivier Goffart <ogoffart@trolltech.com> | 2010-02-09 09:30:06 (GMT) |
---|---|---|
committer | Olivier Goffart <ogoffart@trolltech.com> | 2010-02-09 09:30:06 (GMT) |
commit | 1bb05bf5230ac41c47ce09fcc1e85e26db150322 (patch) | |
tree | 63f4aa3d091ed9cd6098e317c500e88c29855da3 /tests/auto/qlineedit/tst_qlineedit.cpp | |
parent | 72f3caa5d7821b93a4e807fb61c5cda9f2c6f393 (diff) | |
download | Qt-1bb05bf5230ac41c47ce09fcc1e85e26db150322.zip Qt-1bb05bf5230ac41c47ce09fcc1e85e26db150322.tar.gz Qt-1bb05bf5230ac41c47ce09fcc1e85e26db150322.tar.bz2 |
Stabilize QLineEdit test on X11
Diffstat (limited to 'tests/auto/qlineedit/tst_qlineedit.cpp')
-rw-r--r-- | tests/auto/qlineedit/tst_qlineedit.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp index 69e7699..ca84b38 100644 --- a/tests/auto/qlineedit/tst_qlineedit.cpp +++ b/tests/auto/qlineedit/tst_qlineedit.cpp @@ -3455,10 +3455,8 @@ void tst_QLineEdit::task210502_caseInsensitiveInlineCompletion() completer.setCompletionMode(QCompleter::InlineCompletion); lineEdit.setCompleter(&completer); lineEdit.show(); -#ifdef Q_WS_X11 - // to be safe and avoid failing setFocus with window managers - qt_x11_wait_for_window_manager(&lineEdit); -#endif + QTest::qWaitForWindowShown(&lineEdit); + QApplication::setActiveWindow(&lineEdit); lineEdit.setFocus(); QTRY_VERIFY(lineEdit.hasFocus()); QTest::keyPress(&lineEdit, 'a'); @@ -3651,10 +3649,11 @@ void tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut() le.addAction(&action); le.show(); - QApplication::setActiveWindow(&le); QTest::qWaitForWindowShown(&le); + QApplication::setActiveWindow(&le); le.setFocus(); QTRY_VERIFY(le.hasFocus()); + QTest::keyClick(0, Qt::Key_P); QCOMPARE(spy.count(), 1); } |