From 7f77d4fcd5534ec0973654e37c8ef189dce35778 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 16 Jul 2015 09:24:13 +0200 Subject: tst_qprintdevice: Extend output. Show the printer parameters using the new QDebug operator for QPrintDevice for better error analysis in the CI. Produces output: Created printer *HP_Color_LaserJet_CM6030_MFP*: QPrintDevice(id="HP_Color_LaserJet_CM6030_MFP", state=0, name="HP Color LaserJet CM6030 MFP", makeAndModel="HP Color LaserJet CM6030 MFP Postscript (recommended)", default, defaultPageSize=QPageSize("Letter", "Letter", 612x792pt, 2), supportsCustomPageSizes, physicalPageSize=(278, 396)..(907, 1296), defaultResolution=600, defaultDuplexMode=0, defaultColorMode=1, supportedMimeTypes=( "application/pdf" "application/postscript" "image/gif" "image/png" "image/jpeg" "image/tiff" "text/html" "text/plain")) Task-number: QTBUG-47246 Change-Id: I5245d19ecf958a730a0288d5eff2d24fc3064a55 Reviewed-by: Andy Shaw --- tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/auto/printsupport/kernel') diff --git a/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp b/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp index 598abca43b..f3b865ed92 100644 --- a/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp +++ b/tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp @@ -57,7 +57,6 @@ void tst_QPrintDevice::basics() if (defaultId.isEmpty()) { qDebug() << "No default printer found"; } else { - qDebug() << "Default Printer ID :" << defaultId; QVERIFY(ps->availablePrintDeviceIds().contains(defaultId)); } @@ -66,7 +65,9 @@ void tst_QPrintDevice::basics() // Just exercise the api for now as we don't know what is installed foreach (const QString id, ps->availablePrintDeviceIds()) { QPrintDevice printDevice = ps->createPrintDevice(id); - qDebug() << "Created printer" << id; + const char quote = id == defaultId ? '*' : '"'; + qDebug().noquote().nospace() << "\nCreated printer " << quote << id + << quote << ":\n" << printDevice << '\n'; QCOMPARE(printDevice.isValid(), true); printDevice.id(); printDevice.name(); -- cgit v1.2.3