summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-05-19 08:51:19 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-05-19 08:55:09 (GMT)
commit46f776a1c6b7e72ebe69ecde130d514b69fe4319 (patch)
tree6a6bfe9cdb38e88fa057de5d43ddf0c1a213ffde
parent48328daeb082385bd8f8074ee77c7cbee9cde637 (diff)
downloadQt-46f776a1c6b7e72ebe69ecde130d514b69fe4319.zip
Qt-46f776a1c6b7e72ebe69ecde130d514b69fe4319.tar.gz
Qt-46f776a1c6b7e72ebe69ecde130d514b69fe4319.tar.bz2
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().
-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 cde4ae5..221e3b0 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
}