Skip to content

finally split the logic from the widget-based interface

Alexander Stippich requested to merge astippich/libksane:splitLogic into master

Splits the logic for accessing the scanners through SANE from the widget-based interface. Allows building of custom GUIs on top of libksane without loading all the existing widgets from KSaneWidget.

The first commit introduces a KSaneCore component, exports it and internally switches the KSaneWidget to it. Since this is added public API, it should be reviewed thoroughly. I mainly implemented it with my Skanpage-hat on while trying not to break KSaneWidget.

The second commit removes the added API for querying the optionsList in KSaneWidget again. It is imho now not needed anymore and the API was never released, so possible to do so without breaking any apps (besides Skanpage for a very short amount of time :) ). Also my next chance to break the windows build again. If this commit is not desired, I can simply remove it.

Corresponding code for Skanpage that uses the KSaneCore component is at https://invent.kde.org/astippich/skanpage/-/commits/inProgressImage Tested with the test backend in Skanpage with new and old API and with Skanlite. The reworked logic for accessing restricted scanners is currently only compile-test. I still have to figure out if I can setup a user/password for my HP scanner.

During the KF6 transition, I think it would also be nice if this is split into its own library without all the dependencies on QWidget.

Edited by Alexander Stippich

Merge request reports