CUPS: Add support for accessible IPP printers
CUPS 2.2 adds accessible IPP printers to the list of destinations that can be used. The "printer-uri-supported" option will be present for those IPP printers that have been recently used. https://github.com/OpenPrinting/cups/blob/master/cups/dest.c#L1611 Pick-to: 5.15 6.2 6.3 Change-Id: I49b4d2f1ee6d96e9bcc04ed1cc2ed48d7a6e7563 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
parent
d7d6f46324
commit
2f5f276b4a
@ -165,9 +165,12 @@ QStringList QCupsPrinterSupport::availablePrintDeviceIds() const
|
||||
list.reserve(count);
|
||||
for (int i = 0; i < count; ++i) {
|
||||
QString printerId = QString::fromLocal8Bit(dests[i].name);
|
||||
if (dests[i].instance)
|
||||
if (dests[i].instance) {
|
||||
printerId += u'/' + QString::fromLocal8Bit(dests[i].instance);
|
||||
list.append(printerId);
|
||||
list.append(printerId);
|
||||
} else if (cupsGetOption("printer-uri-supported", dests[i].num_options, dests[i].options)) {
|
||||
list.append(printerId);
|
||||
}
|
||||
}
|
||||
cupsFreeDests(count, dests);
|
||||
return list;
|
||||
|
Loading…
Reference in New Issue
Block a user