Bug 413693 - Implement an upgrade mechanism for xmlgui files and shortcut profiles
Summary: Implement an upgrade mechanism for xmlgui files and shortcut profiles
Status: CONFIRMED
Alias: None
Product: krita
Classification: Applications
Component: Shortcuts and Canvas Input Settings (show other bugs)
Version: 4.2.7-beta1
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-01 01:36 UTC by alphaLimaTango
Modified: 2020-05-06 11:09 UTC (History)
2 users (show)

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


Attachments
version=3 profile created with 4.2.3 (1.44 KB, text/plain)
2019-11-01 01:36 UTC, alphaLimaTango
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alphaLimaTango 2019-11-01 01:36:40 UTC
Created attachment 123637 [details]
version=3 profile created with 4.2.3

SUMMARY

There is a regression in the settings handling between relatively minor dot releases, from 4.2.3 -> 4.2.7.1b

When going from 4.2.3 -> 4.2.7.1b (and 4.2.7.1), my desired input profile wasn't read, leading me to not be able to interact with Krita in my usual way, making the program feel broken.

STEPS TO REPRODUCE
0. Use 4.2.3 or possible other versions of Krita
1. Create an Input Profile in the Canvas Input Settings pane in the Configure Krita settings box
2. Set some input options, like adding new mappings for pan, rotate, and zoom canvas 
3. Click "OK" and quit Krita
4. Observe that the input profile is created in ~/.local/share/krita/input (or similar), and it's created with Version=3
5. Open 4.2.7.1b or possibly other versions of Krita, and open the same Canvas Input Settings pane

OBSERVED RESULT
The profile you created in step 1 and which is saved in ~/.local/share/krita/input doesn't show up in the input settings drop-down. Opening 4.2.3 will show your input profile still.

Note too that no error dialogs are shown about this failure, and it's actually quite hard to find without some digging and learning how things are stored in the profile

EXPECTED RESULT
The input profiles appear in the dialog box, either via migration or backwards compatibility.


SOFTWARE/OS VERSIONS
Windows: ?
macOS: ?
Linux/KDE Plasma: Debian Testing (devuan) as well as Ubuntu Disco
(available in About System)
KDE Plasma Version: I can't find the "about system" button
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
I've included one of the version 3 input profiles that wasn't upgraded automatically

I changed version=3 to version=4 and it seems to work, but this workaround may be unstable and is obviously not intended.
Comment 1 alphaLimaTango 2019-11-01 01:52:35 UTC
Looks like the regression was introduced when the version number was incremented in 5f2bbef2eb in kis_input_profile_manager.cpp. Is there no existing mechanism for migration or handling backwards compatibility in input profiles?
Comment 2 Halla Rempt 2019-11-01 08:28:56 UTC
No... There isn't. There's a very similar problem with shortcut settings which uses KDE's libraries and which has had this problem since 1996 or so.