|
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 |
+ } |
|
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 |
+ } |