Bug 408584 - Menu entries with submenu entries do not display keyboard shortcut
Summary: Menu entries with submenu entries do not display keyboard shortcut
Status: RESOLVED NOT A BUG
Alias: None
Product: frameworks-kxmlgui
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-11 20:21 UTC by Tore Havn
Modified: 2019-06-12 11:16 UTC (History)
1 user (show)

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


Attachments
Kate showing its Input Modes menu entry, without a keyboard shortcut (156.27 KB, image/png)
2019-06-11 20:21 UTC, Tore Havn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tore Havn 2019-06-11 20:21:07 UTC
Created attachment 120801 [details]
Kate showing its Input Modes menu entry, without a keyboard shortcut

I've noticed that the menu entries doesn't show their keyboard shortcuts if they have submenu entries.

Attached is a screenshot of a menu entry in Kate that I've been looking at.

The code for this entry is found in «kateview.cpp», lines 694-698:

    a = ac->addAction(QStringLiteral("switch_next_input_mode"));
    a->setText(i18n("Switch to Next Input Mode"));
    ac->setDefaultShortcut(a, QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_V));
    a->setWhatsThis(i18n("Switch to the next input mode."));
    connect(a, SIGNAL(triggered(bool)), SLOT(cycleInputMode()));
Comment 1 Kai Uwe Broulik 2019-06-12 09:15:14 UTC
Does it have a shortcut assigned, even? Maybe it clashes with some other shortcut but I cannot reproduce with other actions such as Dolphin's submenus.
Comment 2 Kai Uwe Broulik 2019-06-12 11:16:40 UTC
You can assign shortcuts to menu items just fine, the "switch to next input mode" is a different action from the "input modes:" menu item and as such doesn't have a shortcut.