Skip to content

[RFC][kcm/libkcups]: Refactor PrinterModel, adapt to CUPS Temporary Queues

Mike Noe requested to merge work/noee/refactor-printermodel into master

CUPS 2.x/3.x introduce the notion of temporary and permanent print queues. Here, we bring this to the UX as we begin to move way from deprecated CUPS functionality. In order for this, in the libkcups, we use the new CUPS apis to enumerate devices. Going forward, this will also be used for generally finding and configuring printing devices.

Temporary queues are basically discovered devices that are not configured (yet) to be permanent. Most applicatons will find these queues when a user chooses a printer device; hence, it is not required to configure a temp queue as permanent unless job queue management or media settings changes are needed.

Permanent queues are simply the local configured printers as before which then allow access to the Media Settings (configuration) and the Printer Job Queue as they exist today (legacy apps).

Printer Groups (CUPS classes) remain as before and are defined based on permanently configured printers.

Bugfix: This refactor uncovered a bug with the model requests that failed to properly initialize the CUPS connection, therefore, CUPS dbus signals were not functioning and the model was falling back on deprecated Redhat dbus signals. Using the global CUPS connection fixes the CUPS signaling and allows the removal of the deprecated signals.

  • Commit 1: some minor prep
  • Commit 2: add apis to the KCupsRequest
  • Commit 3: refactor the printer model for new apis, see details
  • Commit 4: make plasmoid work as before (ignoring discovered devices in the model)
  • Commit 5: adapt the kcm main view
  • Commit 6: adapt the kcm save printer logic (add/modify)
Edited by Mike Noe

Merge request reports