Bug 501629 - MenuItem with StandardKey shortcut from action causes warning
Summary: MenuItem with StandardKey shortcut from action causes warning
Status: REPORTED
Alias: None
Product: frameworks-qqc2-desktop-style
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-03-17 10:49 UTC by cwo
Modified: 2025-03-17 10:49 UTC (History)
4 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 cwo 2025-03-17 10:49:00 UTC
SUMMARY

MenuItem creates a shortcut from an associated action. This is assigned using the sequence propery, which will complain if you pass it a StandardKey keysequence that contains multiple options; in those cases, the sequences property should be used. But we can't switch to that, as we rely on the Shortcut's native text to display the shortcuts, and at present the sequence property does not set that. Until it does, we seem to only have the choice of either getting a warning each time we use a MenuItem with such a shortcut (one for each such action each time the menu opens) or not showing the shortcuts in the menu (which is worse).

Once the relevant work is done in Qt and we can dpend on the correct version , we should change this to use sequences, but it is not yet merged and currently scheduled only for Qt 6.10 so quite a bit away. Relevant QTBUGS / Gerrit:

https://bugreports.qt.io/browse/QTBUG-96350
https://bugreports.qt.io/browse/QTBUG-105193
https://codereview.qt-project.org/c/qt/qtdeclarative/+/507698

STEPS TO REPRODUCE
1. Right-click on something with a TextField (such as a notification or the relevant kirigami2gallery field), or on the notes applet

OBSERVED RESULT

Warning

EXPECTED RESULT

No warning

SOFTWARE/OS VERSIONS

Operating System: Fedora Linux 41
KDE Plasma Version: 6.3.80
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2
Kernel Version: 6.13.5-200.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 16 GiB of RAM (15.5 GiB usable)
Graphics Processor: Intel® HD Graphics 520

ADDITIONAL INFORMATION