View | Details | Raw Unified | Return to bug 52611
Collapse All | Expand All

(-)a/9003-qt6-base-6.7.2-qmenu_fix_shortcuts.patch (-2 / +2 lines)
Lines 84-90 diff -Naur qtbase-everywhere-src-6.7.2.orig/src/gui/platform/unix/qxkbcommon.cpp Link Here
84
+                // but Ctrl++ is more specific than +, so we should skip the last one
84
+                // but Ctrl++ is more specific than +, so we should skip the last one
85
+                bool ambiguous = false;
85
+                bool ambiguous = false;
86
+                for (QKeyCombination shortcut : std::as_const(result)) {
86
+                for (QKeyCombination shortcut : std::as_const(result)) {
87
+                    if (shortcut.key() == qtKey && shortcut.keyboardModifiers() == mods) {
87
+                    if (shortcut.key() == qtKey && (shortcut.keyboardModifiers() & mods) == mods) {
88
+                        ambiguous = true;
88
+                        ambiguous = true;
89
+                        break;
89
+                        break;
90
+                    }
90
+                    }
Lines 92-98 diff -Naur qtbase-everywhere-src-6.7.2.orig/src/gui/platform/unix/qxkbcommon.cpp Link Here
92
+                if (ambiguous)
92
+                if (ambiguous)
93
+                    continue;
93
+                    continue;
94
+
94
+
95
+                if (!result.contains(qtKey + int(mods))) //NOTE: We should disallow duplicates in the result list
95
+                if (!result.contains(qtKey + int(mods))) //NOTE: We should disallow duplicates in the result list (TODO: Is this check really needed?)
96
+                result += QKeyCombination::fromCombined(qtKey + int(mods));
96
+                result += QKeyCombination::fromCombined(qtKey + int(mods));
97
+            }
97
+            }
98
+        }
98
+        }

Return to bug 52611