From 2e95f8c7b8ba3c06ae113c0ae61bcee1c7013e91 Mon Sep 17 00:00:00 2001 From: probonopd Date: Mon, 11 Oct 2021 21:20:44 +0200 Subject: [PATCH] Really ugly temporary hack to get Menu to display "Alt" instead of "Ctrl" https://github.com/helloSystem/hello/issues/46#issuecomment-940376119 --- src/appmenu/dbusmenushortcut_p.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/appmenu/dbusmenushortcut_p.cpp b/src/appmenu/dbusmenushortcut_p.cpp index 6379132..3abfec8 100644 --- a/src/appmenu/dbusmenushortcut_p.cpp +++ b/src/appmenu/dbusmenushortcut_p.cpp @@ -76,6 +76,9 @@ QKeySequence DBusMenuShortcut::toKeySequence() const Q_FOREACH(const QStringList& keyTokens_, *this) { QStringList keyTokens = keyTokens_; processKeyTokens(&keyTokens, DM_COLUMN, QT_COLUMN); + keyTokens[0].replace("Alt", "_A_L_T_"); // probono: Really ugly hack. FIXME: Implement in QtPlugin rather than in Menu + keyTokens[0].replace("Ctrl", "Alt"); // probono: Really ugly hack. FIXME: Implement in QtPlugin rather than in Menu + keyTokens[0].replace("_A_L_T_", "Ctrl"); // probono: Really ugly hack. FIXME: Implement in QtPlugin rather than in Menu tmp << keyTokens.join(QLatin1String("+")); } QString string = tmp.join(QLatin1String(", "));