Draft: libkcups: Refactor PrinterModel
Current situation:
- Current PrinterModel is a QStandardItemModel
- Because of CUPS bugs, updating the model just brute forces a reload with some interesting item update logic
- The model uses a deprecated api for loading from CUPS
This MR:
- Refactors model into a QAbstractListModel
- Adapts printer model to new libkcups apis, filter and mask options added
- Allows to update model using the proper CUPS Printer* signals since we've discovered the bugs and OpenPrinting has fixed them since CUPS 2.4.13
- Adds discovered role support to the model, leave UI/UX until a later MR
- Lazy loads marker level (marker level info queried directly from printer device)
- Makes no UI/UX changes to the KCM or Plasmoid
- Add workaround for CUPS issue 1235 (and others)
Part of: #17
Definitions for CUPS device queues
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 locally configured printers 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.
Testing
The KCM and Plasmoid should display only permanent printer queues/classes, with no discovered devices shown. Printer updates should propagate as expected to the KCM and/or the Plasmoid. There should be no functional or behavioral differences with the kcm or plasmoid.