diff options
author | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-04-14 11:31:54 (GMT) |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@nokia.com> | 2010-04-14 11:34:29 (GMT) |
commit | 4dae6bd829e1103d0e21ce9e509d758b5af0c2c0 (patch) | |
tree | 5c70b233785d0ea1421b3bb389580620c990f3ab /tests/auto/macnativeevents | |
parent | 4a32242e57ac689224340077656b30894171cb08 (diff) | |
download | Qt-4dae6bd829e1103d0e21ce9e509d758b5af0c2c0.zip Qt-4dae6bd829e1103d0e21ce9e509d758b5af0c2c0.tar.gz Qt-4dae6bd829e1103d0e21ce9e509d758b5af0c2c0.tar.bz2 |
Autotest failure: dialogModality test fails on cocoa (macgui)
The reason is that it is using accessebility, which is not yet
implemented in Qt/Cocoa. This patch just removes the test, and
reimplements it using the native events test instead, which
is a better solution anyway.
Reviewed-by: msorvig
Diffstat (limited to 'tests/auto/macnativeevents')
-rw-r--r-- | tests/auto/macnativeevents/tst_macnativeevents.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/macnativeevents/tst_macnativeevents.cpp b/tests/auto/macnativeevents/tst_macnativeevents.cpp index 08ab9e6..70a14f5 100644 --- a/tests/auto/macnativeevents/tst_macnativeevents.cpp +++ b/tests/auto/macnativeevents/tst_macnativeevents.cpp @@ -41,6 +41,7 @@ #include <QApplication> #include <QWidget> +#include <QDialog> #include <QPushButton> #include <QtTest/QtTest> @@ -65,6 +66,7 @@ private slots: void testMouseDragToNonClientArea(); void testDragWindow(); void testMouseEnter(); + void testChildDialogInFrontOfModalParent(); }; void tst_MacNativeEvents::testMouseMoveLocation() @@ -282,6 +284,28 @@ void tst_MacNativeEvents::testMouseEnter() QVERIFY2(expected.waitForAllEvents(), "the test did not receive all expected events!"); } +void tst_MacNativeEvents::testChildDialogInFrontOfModalParent() +{ + // Test that a child dialog of a modal parent dialog is + // in front of the parent, and active: + QDialog parent; + parent.setWindowModality(Qt::ApplicationModal); + QDialog child(&parent); + QPushButton button("close", &child); + connect(&button, SIGNAL(clicked()), &child, SLOT(close())); + parent.show(); + child.show(); + QPoint inside = button.mapToGlobal(button.geometry().center()); + + // Post a click on the button to close the child dialog: + NativeEventList native; + native.append(new QNativeMouseButtonEvent(inside, Qt::LeftButton, 1, Qt::NoModifier)); + native.append(new QNativeMouseButtonEvent(inside, Qt::LeftButton, 0, Qt::NoModifier)); + + native.play(); + QTest::qWait(100); + QVERIFY(!child.isVisible()); +} #include "tst_macnativeevents.moc" |