Bug 513047 - Skanpage doesn't remember scanner options due to unstable naming
Summary: Skanpage doesn't remember scanner options due to unstable naming
Status: REPORTED
Alias: None
Product: Skanpage
Classification: Applications
Component: general (other bugs)
Version First Reported In: 25.08.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Alexander Stippich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-07 14:32 UTC by Jonas Ryssel
Modified: 2025-12-14 10:24 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas Ryssel 2025-12-07 14:32:11 UTC
SUMMARY
Skanpage forgets scanner configuration upon power cycling a scanner.

STEPS TO REPRODUCE
1. Plug in a scanner
2. Configure the scanner options in Skanpage
3. Power cycle/unplug and replug the scanner
4. Reselect scanner in Skanpage (or close and reopen Skanpage)

OBSERVED RESULT
The scanner options have been reset.

EXPECTED RESULT
The scanner options should be preserved.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Plasma Version: 6.5.3
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1

ADDITIONAL INFORMATION
By looking in `~/.local/state/skanpagestaterc` I've noticed that ID the settings are saved under is based on the USB device id. In my case that is `avision:libusb:005:011`.
Every time I power cycle/replug the scanner, its USB device ID increments by one, why I currently have a lot of configured devices named
[Options For avision:libusb:005:007]
[Options For avision:libusb:005:008]
[Options For avision:libusb:005:010]
[Options For avision:libusb:005:011]
[Options For avision:libusb:005:051]
all for the same scanner.

Looking at
https://invent.kde.org/utilities/skanpage/-/blob/master/src/Skanpage.cpp
i found that `void Skanpage::saveScannerOptions()` and `void Skanpage::loadScannerOptions()` uses `d->m_ksaneInterface.deviceName()` to determine the device name, but it should probably use `d->m_deviceVendor()` and `d->m_deviceModel()` instead.