Bug 357418 - It is messing with the shortcuts
Summary: It is messing with the shortcuts
Status: RESOLVED DUPLICATE of bug 337491
Alias: None
Product: frameworks-ki18n
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Debian unstable Linux
: NOR major
Target Milestone: ---
Assignee: Chusslove Illich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-02 11:01 UTC by Salvo "LtWorf" Tomaselli
Modified: 2016-01-10 22:20 UTC (History)
1 user (show)

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


Attachments
example of accelerators being broken by kde (1.85 KB, application/x-designer)
2016-01-02 11:01 UTC, Salvo "LtWorf" Tomaselli
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Salvo "LtWorf" Tomaselli 2016-01-02 11:01:08 UTC
KDE randomly adds shortcuts, disregarding the ones that are already present in the UI, creating conflicts that end up making shortcuts useless.

For example, see the attached .ui file.

I am writing an application where the user might need to input some odd symbols, and some buttons are available to insert the symbol within the text.
Said buttons have shortcuts in the form of Alt+Key, but KDE adds random Alt+Key shortcuts all over the place, removing the advantage of having shortcuts in the first place.

A workaround is to use
[Development]
AutoCheckAccelerators=false

The bug has been encountered several times by several people:
https://www.google.it/search?q=AutoCheckAccelerators

but was never seriously considered, besides providing the workaround.

I believe that adding accelerators is a good idea, but adding duplicated ones is a very shitty idea.

Reproducible: Always
Comment 1 Salvo "LtWorf" Tomaselli 2016-01-02 11:01:32 UTC
Created attachment 96404 [details]
example of accelerators being broken by kde
Comment 2 Chusslove Illich 2016-01-02 13:05:44 UTC
I wonder why is this issue associated with Ki18n? The only function dealing with accelerator markers is removeAcceleratorMarker, they are nowhere added. Maybe some other framework using this function, like KXmlGui?
Comment 3 Salvo "LtWorf" Tomaselli 2016-01-02 23:23:18 UTC
Well I don't know much of KDE internals, but I reported it on this component because of previous bugs, even though I opened a new one to make it clear that the issue is rather generic and not limited to some specific software.

It might very well be the case that I reported it against the wrong component, in which case I would appreciate assistance in moving this to the correct part of KDE.

The problem does exist and is reproducible easily by previewing the .ui file in the Qt designer.
Comment 4 Chusslove Illich 2016-01-10 22:20:07 UTC
I looked a bit through the history of the code that considers AutoCheckAccelerators, which is in KXmlGui, and there true is the default value since forever. There were some problems caused by this over the years, with short-lasting commits to make false default until these problems would be fixed elsewhere, and then true would be put back as default. I don't have an idea what a proper solution would be in this case. So I'll close this bug as duplicate of that other one, and reassign the other one to KXmlGui.

*** This bug has been marked as a duplicate of bug 337491 ***