diff options
author | Paul Olav Tvete <paul.tvete@nokia.com> | 2009-09-18 10:41:45 (GMT) |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@nokia.com> | 2009-09-18 10:43:32 (GMT) |
commit | 05ddf8489b91b4a28237cd2c72a97f4d3f33fa98 (patch) | |
tree | 88d7bcf7949cebfe3666ba43639f0aff6419b6ab /tests/auto/qprinter | |
parent | c1db7b5d8b7fb68b12c992cfa1953a599913851c (diff) | |
download | Qt-05ddf8489b91b4a28237cd2c72a97f4d3f33fa98.zip Qt-05ddf8489b91b4a28237cd2c72a97f4d3f33fa98.tar.gz Qt-05ddf8489b91b4a28237cd2c72a97f4d3f33fa98.tar.bz2 |
Don't fail if no printers are available.
Diffstat (limited to 'tests/auto/qprinter')
-rw-r--r-- | tests/auto/qprinter/tst_qprinter.cpp | 3 |
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"); |