summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-05-19 10:51:19 +0200
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-05-19 10:55:09 +0200
commit46f776a1c6b7e72ebe69ecde130d514b69fe4319 (patch)
tree6a6bfe9cdb38e88fa057de5d43ddf0c1a213ffde /tests
parent48328daeb082385bd8f8074ee77c7cbee9cde637 (diff)
Fixed autotest tst_QPrinter::printDialogCompleter on Windows.
QApplication::activeWindow() returns null for native dialogs, so null cannot be passed as the target widget when calling QTest::keyClick().
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qprinter/tst_qprinter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp
index cde4ae5ead..221e3b055b 100644
--- a/tests/auto/qprinter/tst_qprinter.cpp
+++ b/tests/auto/qprinter/tst_qprinter.cpp
@@ -953,8 +953,9 @@ void tst_QPrinter::printDialogCompleter()
QTest::qWait(100);
- QTest::keyClick(0, Qt::Key_Tab);
- QTest::keyClick(0, 'P');
+ QTest::keyClick(&dialog, Qt::Key_Tab);
+ QTest::keyClick(&dialog, 'P');
+ // The test passes if it doesn't crash.
#endif
}