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>
This commit is contained in:
parent
fdb8ef6507
commit
7f77d4fcd5
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user