summaryrefslogtreecommitdiffstats
path: root/tests/auto/qprinter
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qprinter')
-rw-r--r--tests/auto/qprinter/tst_qprinter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp
index 77737ed..d6df94b 100644
--- a/tests/auto/qprinter/tst_qprinter.cpp
+++ b/tests/auto/qprinter/tst_qprinter.cpp
@@ -48,6 +48,7 @@
#include <qpagesetupdialog.h>
#include <qpainter.h>
#include <qprintdialog.h>
+#include <qprinterinfo.h>
#ifdef QT3_SUPPORT
#include <q3paintdevicemetrics.h>
#endif
@@ -557,6 +558,8 @@ void tst_QPrinter::changingOutputFormat()
void tst_QPrinter::outputFormatFromSuffix()
{
+ if (QPrinterInfo::availablePrinters().size() == 0)
+ QSKIP("No printers available.", SkipAll);
QPrinter p;
QVERIFY(p.outputFormat() == QPrinter::NativeFormat);
p.setOutputFileName("test.ps");