remove accelerators for standard menu items (eg. &File, &View, &Edit) etc. which are defined in kdelibs/kdeui/xmlgui/ui_standards.rc, again, to avoid conflicting with Alt+[Letter] terminal shortcuts TODO - Modify XMLGUI so that it allows the text for standard actions defined in ui_standards.rc to be re-defined in the local application XMLGUI file (konsoleui.rc in this case) - the text for standar
| 200 | // XMLGUI file (konsoleui.rc in this case) - the text for standard items |
| 201 | // can then be redefined there to exclude the standard accelerators |
| 202 | void MainWindow::removeMenuAccelerators() |
| 203 | { |
| 204 | const QList<QAction *> actions = menuBar()->actions(); |
| 205 | for (QAction *menuItem : actions) { |
| 206 | menuItem->setText(menuItem->text().replace(QLatin1Char('&'), QString())); |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | void MainWindow::restoreMenuAccelerators() |
| 211 | { |