Disable toolbar accelerators to avoid conflicts with terminal apps

BUG: 482628
This commit is contained in:
Quentin Smith
2025-07-10 19:12:29 -04:00
committed by Christoph Cullmann
parent 658cdc3fa2
commit a9150daaca
2 changed files with 13 additions and 0 deletions

View File

@@ -1127,6 +1127,16 @@ bool MainWindow::focusNextPrevChild(bool v)
return QMainWindow::focusNextPrevChild(v);
}
QWidget *MainWindow::createContainer(QWidget *parent, int index, const QDomElement &element, QAction *&containerAction)
{
// ensure we don't have toolbar accelerators that clash with other stuff
QWidget *createdContainer = KXmlGuiWindow::createContainer(parent, index, element, containerAction);
if (element.tagName() == QLatin1String("ToolBar")) {
KAcceleratorManager::setNoAccel(createdContainer);
}
return createdContainer;
}
void MainWindow::saveNewToolbarConfig()
{
KXmlGuiWindow::saveNewToolbarConfig();

View File

@@ -149,6 +149,9 @@ protected:
// reimplemented from QWidget
bool focusNextPrevChild(bool next) override;
// reimplemented from KXMLGUIBuilder
QWidget *createContainer(QWidget *parent, int index, const QDomElement &element, QAction *&containerAction) override;
protected Q_SLOTS:
void saveNewToolbarConfig() override;