From 05ddf8489b91b4a28237cd2c72a97f4d3f33fa98 Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Fri, 18 Sep 2009 12:41:45 +0200 Subject: Don't fail if no printers are available. --- tests/auto/qprinter/tst_qprinter.cpp | 3 +++ 1 file changed, 3 insertions(+) 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 #include #include +#include #ifdef QT3_SUPPORT #include #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"); -- cgit v0.12