Unity does not handle Qt menu item with shortcut and underscore correctly

Bug #1390373 reported by enz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Unity
New
Undecided
Unassigned
unity (Ubuntu)
New
Undecided
Unassigned

Bug Description

If the item of a Qt menu has a text that contains both an ampersand (for the shortcut) and an underscore, the text is not displayed correctly in the Unity menubar.

Such texts occur frequently in recent file menus of applications if the file name is prepended by a number for the shortcut key and the file name contains an underscore. I tested it with a minimal Qt 5.3.0 project on Ubuntu 14.10 and the following code in the main window constructor:

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
{
    QMenu* menu = menuBar()->addMenu("&Menu");
    menu->addAction("&Item_text");
}

The text in the Unity menu does not show the ampersand or uses the intended shortcut Alt-I, but instead underlines and "t" and uses Alt-T for the shortcut.

Revision history for this message
enz (markus-enzenberger) wrote :

The bug still exists in Ubuntu 15.10.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.