diff options
author | Gabriel de Dietrich <gabriel.dedietrich@digia.com> | 2013-08-26 19:29:33 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-29 12:44:24 +0200 |
commit | df7944e7d7dd8b2bbccbd639eff0ab09745d6cc3 (patch) | |
tree | c59f5ed9f7f74ad6a2bca10225af56e98bf00b14 /tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp | |
parent | e4b2a0b4bab2a17a65fedafe9bae50af1fe019f6 (diff) |
Cocoa: Fix QFontDialog, QColorDialog auto-tests
The new Cocoa event dispatcher made apparent some deficiencies in the
way the dialog helpers were being hidden. In particular, we would not stop
a dialog helper's modal loop when closing the dialog, resulting in the
auto-tests hanging. Also, since the QApplication event loop is runnig with
[NSApp run] in the stack, the previous workarounds are no longer needed.
Task-number: QTBUG-24321
Change-Id: Ifba713c286638d78a699c319a15683d09714f06f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp')
-rw-r--r-- | tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp index d83e4729ef..06491f96ab 100644 --- a/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp +++ b/tests/auto/widgets/dialogs/qcolordialog/tst_qcolordialog.cpp @@ -144,13 +144,10 @@ void tst_QColorDialog::postKeyReturn() { void tst_QColorDialog::testGetRgba() { -#ifdef Q_OS_MAC - QEXPECT_FAIL("", "Sending QTest::keyClick to OSX color dialog helper fails, see QTBUG-24320", Continue); -#endif - bool ok = false; - QTimer::singleShot(500, this, SLOT(postKeyReturn())); - QColorDialog::getRgba(0xffffffff, &ok); - QVERIFY(ok); + QColorDialog cd; + cd.show(); + QTimer::singleShot(0, this, SLOT(postKeyReturn())); + QTRY_COMPARE(cd.result(), int(QDialog::Accepted)); } void tst_QColorDialog::defaultOkButton() |