summaryrefslogtreecommitdiffstats
path: root/tests/auto/qprinter/tst_qprinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qprinter/tst_qprinter.cpp')
-rw-r--r--tests/auto/qprinter/tst_qprinter.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp
index a598bfc..cde4ae5 100644
--- a/tests/auto/qprinter/tst_qprinter.cpp
+++ b/tests/auto/qprinter/tst_qprinter.cpp
@@ -103,6 +103,7 @@ private slots:
void valuePreservation();
void errorReporting();
void testCustomPageSizes();
+ void printDialogCompleter();
private:
};
@@ -940,5 +941,22 @@ void tst_QPrinter::testCustomPageSizes()
QCOMPARE(paperSize, customSize);
}
+void tst_QPrinter::printDialogCompleter()
+{
+#if defined(QT_NO_COMPLETER) || defined(QT_NO_FILEDIALOG)
+ QSKIP("QT_NO_COMPLETER || QT_NO_FILEDIALOG: Auto-complete turned off in QPrinterDialog.", QTest::SkipAll);
+#else
+ QPrintDialog dialog;
+ dialog.printer()->setOutputFileName("file.pdf");
+ dialog.setEnabledOptions(QAbstractPrintDialog::PrintToFile);
+ dialog.show();
+
+ QTest::qWait(100);
+
+ QTest::keyClick(0, Qt::Key_Tab);
+ QTest::keyClick(0, 'P');
+#endif
+}
+
QTEST_MAIN(tst_QPrinter)
#include "tst_qprinter.moc"