summaryrefslogtreecommitdiffstats
path: root/tests/auto/qlineedit/tst_qlineedit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qlineedit/tst_qlineedit.cpp')
-rw-r--r--tests/auto/qlineedit/tst_qlineedit.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/auto/qlineedit/tst_qlineedit.cpp b/tests/auto/qlineedit/tst_qlineedit.cpp
index 3b6400a..6dc2c82 100644
--- a/tests/auto/qlineedit/tst_qlineedit.cpp
+++ b/tests/auto/qlineedit/tst_qlineedit.cpp
@@ -3640,6 +3640,26 @@ void tst_QLineEdit::taskQTBUG_4679_selectToStartEndOfBlock()
#endif // Q_OS_MAC
}
+#ifndef QT_NO_CONTEXTMENU
+void tst_QLineEdit::taskQTBUG_7902_contextMenuCrash()
+{
+ // Would pass before the associated commit, but left as a guard.
+ QLineEdit *w = new QLineEdit;
+ w->show();
+ QTest::qWaitForWindowShown(w);
+
+ QTimer ti;
+ w->connect(&ti, SIGNAL(timeout()), w, SLOT(deleteLater()));
+ ti.start(200);
+
+ QContextMenuEvent *cme = new QContextMenuEvent(QContextMenuEvent::Mouse, w->rect().center());
+ qApp->postEvent(w, cme);
+
+ QTest::qWait(300);
+ // No crash, it's allright.
+}
+#endif
+
void tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut()
{
//ReadOnly QLineEdit should not intercept shortcut.
@@ -3661,25 +3681,5 @@ void tst_QLineEdit::taskQTBUG_7395_readOnlyShortcut()
QCOMPARE(spy.count(), 1);
}
-#ifndef QT_NO_CONTEXTMENU
-void tst_QLineEdit::taskQTBUG_7902_contextMenuCrash()
-{
- // Would pass before the associated commit, but left as a guard.
- QLineEdit *w = new QLineEdit;
- w->show();
- QTest::qWaitForWindowShown(w);
-
- QTimer ti;
- w->connect(&ti, SIGNAL(timeout()), w, SLOT(deleteLater()));
- ti.start(200);
-
- QContextMenuEvent *cme = new QContextMenuEvent(QContextMenuEvent::Mouse, w->rect().center());
- qApp->postEvent(w, cme);
-
- QTest::qWait(300);
- // No crash, it's allright.
-}
-#endif
-
QTEST_MAIN(tst_QLineEdit)
#include "tst_qlineedit.moc"