Bug 452874 - Shortcuts - Import / Export to schema ( relating to tags ) is not working as expected.
Summary: Shortcuts - Import / Export to schema ( relating to tags ) is not working as ...
Status: REPORTED
Alias: None
Product: digikam
Classification: Applications
Component: Tags-Manager (show other bugs)
Version: 7.6.0
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-22 16:45 UTC by Mr.D
Modified: 2023-10-15 09:50 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mr.D 2022-04-22 16:45:20 UTC
SUMMARY

Importing keyboard shortcut schema - does not work correctly, when related to tag shortcuts.

Issue Summary:
1. If there are NO tags defined they will not import. (<-BAD)
2. When importing different tags, 
  A. Existing tags that match import are updated (<-Good )
  B. If tag exists but is not in import, they are not removed (<-Not sure of expectation here, likely not expected)
  C. If the tag does not exist as a shortcut they are not created  (<-BAD)




STEPS TO REPRODUCE #1
1.  Create Tags
2.  Create Keyboard Shortcuts for each tag.
3. Go to "Configure Keyboard Shortcuts you should see the tags and the related shortcuts.

Example
tagshortcut-1=1
tagshortcut-2=2
tagshortcut-3=3

4. Go down to "More Actions" -> Export Scheme
5. Default  ( Reset the short cuts to default ) 
6. Go down to "More Actions" -> Import Scheme
## Error here the tag shortcuts are not created / added back.


STEPS TO REPRODUCE #2
1.  Create 3 Tags
2.  Create 3 Shortcuts for each tag.
3. Go to "Configure Keyboard Shortcuts you should see 3 tags and the related short cuts.

Example
tagshortcut-1=1
tagshortcut-2=2
tagshortcut-3=3

4. Go down to "More Actions" -> Export Scheme
5. Go back to the application and change the tag from one tag to another tag.
Example:
tagshortcut-1=1
to
tagshortcut-5=1

6. Go down to "More Actions" -> Import Scheme
## Error here the tag shortcuts are not updated as expected.



OBSERVED RESULT

If we export :

tagshortcut-1=1
tagshortcut-2=2
tagshortcut-3=3

but we import (different scheme):

tagshortcut-4=1
tagshortcut-5=2
tagshortcut-6=3

We would expect 

tagshortcut-1=1  <-- Shortcut-1 is not updated to Shortcut-4 as expected.
tagshortcut-2=2
tagshortcut-3=3


EXPECTED RESULT

If I export :

tagshortcut-1=1
tagshortcut-2=2
tagshortcut-3=3

but import:

tagshortcut-4=1
tagshortcut-5=2
tagshortcut-6=3

We would expect 

tagshortcut-4=1
tagshortcut-5=2
tagshortcut-6=3


ALSO :

If we import 
tagshortcut-1=1
tagshortcut-2=2
tagshortcut-3=3
tagshortcut-4=4   <- We would expect to be able to assign more then only 3 hot keys to tag shortcuts.




SOFTWARE/OS VERSIONS
Edition	Windows 11 Pro
Version	21H2
Installed on	‎2021-‎10-‎16
OS build	22000.613
Experience	Windows Feature Experience Pack 1000.22000.613.0
Comment 1 Maik Qualmann 2022-04-22 18:40:59 UTC
The Shortcut Editor comes from the KF5 Framework. We have very little control over that. You may have a similar problem as in this Bug 452103. I don't see it as a bug that we don't create dead Shorcuts.

Maik
Comment 2 Mr.D 2022-04-27 18:24:55 UTC
Hello @Maik Qualmann,

REF:  I don't see it as a bug that we don't create dead Shorcuts.

Your mistaken, 

1. The issue is "Dead" shortcuts are not removed <-- they should be is the bug. 
2. "Live" shortcuts are not imported, if they did not exist before in the config, but should as they should replace the dead ones from point 1. 

Dk
Comment 3 Mr.D 2022-04-27 18:29:49 UTC
Review of : 
https://bugs.kde.org/show_bug.cgi?id=452103

This issue 452103 was relating to the import and persistency. 

This case is about simply importing KB shortcuts correctly, persistence or normal it does not work as we suspect intended.


Dk
Comment 4 caulier.gilles 2023-05-05 18:35:24 UTC
Maik,

I think the export/import of shortcuts is based on ActionCollection pool from application. I don't remember if the tags keyboard shorcuts are registered properly in the ActionCollection. Perhaps it miss something.

Gilles
Comment 5 caulier.gilles 2023-10-15 09:50:33 UTC
@Mr.D,

This problem still reproducible with the new digiKam 8.2.0 pre-release Windows
installer available at usual place:

https://files.kde.org/digikam/

This new bundle is based on last Qt framework 5.15.11 and KDE framework 5.110.

Thanks in advance

Gilles Caulier