Summary: | Shortcuts not working with german language | ||
---|---|---|---|
Product: | [Applications] Elisa | Reporter: | george fb <georgefb899> |
Component: | general | Assignee: | Matthieu Gallien <matthieu_gallien> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | freggel.doe, nate |
Priority: | NOR | ||
Version: | 20.04.3 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/multimedia/elisa/commit/fd858caf0e780f74275c56f4083517ef9e8056b4 | Version Fixed In: | 22.04 |
Sentry Crash Report: | |||
Attachments: | showcasing the bug, about window opens when shortcut is A, but not when it's Ctrl+A |
Description
george fb
2020-08-01 11:22:48 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/elisa/-/merge_requests/336 Git commit fd858caf0e780f74275c56f4083517ef9e8056b4 by Nate Graham, on behalf of Olivier Trichet. Committed on 08/03/2022 at 23:08. Pushed by ngraham into branch 'master'. Fix shortcut not working under non English locale This change wraps calls to QAction::shortcut() done in QML files to use the portable representation of QKeySequence. The QKeySequence to QVariant operator return a string representation using the native format not the portable format. E.g., the sequence "Space", will be "Espace" under French locale. The 'shortcut' attribute of QtQuick Action is stored as QVariant. In qml file, when the QAction::shortcut() value (a QKeySequence) is affected to a QtQuick Action shortcut, the previous operator is used and the shortcut value may be bogus depending on translation. // A QAction* with the Qt::Key_Space shortcut property var playPauseAction: ElisaApplication.action("Play-Pause") Action { // - playPauseAction.shortcut returns QKeySequence(Qt::Key_Space). // - QKeySequence(Qt::Key_Space) is transform into a QVariant that // contains native text "Espace". // - this QVariant is affected to shortcut: broken. shortcut: playPauseAction.shortcut onTriggered: ElisaApplication.audioControl.playPause() } Related: bug 410110 M +6 -0 src/elisaapplication.cpp M +1 -0 src/elisaapplication.h M +6 -6 src/qml/ApplicationMenu.qml M +8 -8 src/qml/ElisaMainWindow.qml M +1 -1 src/qml/MediaPlayerControl.qml M +1 -1 src/qml/NativeMenuItemFromAction.qml M +7 -7 src/qml/NativeTrayMenu.qml https://invent.kde.org/multimedia/elisa/commit/fd858caf0e780f74275c56f4083517ef9e8056b4 |