diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-16 09:24:13 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-17 14:15:04 +0000 |
commit | 7f77d4fcd5534ec0973654e37c8ef189dce35778 (patch) | |
tree | 610e2f0513d2aee2101eb23b81d60a065a80358d /tests/auto | |
parent | fdb8ef6507a556589425e7a109172952c03bfd22 (diff) |
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 <andy.shaw@theqtcompany.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/printsupport/kernel/qprintdevice/tst_qprintdevice.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
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(); |