Don't try to create a QChar from a non-char key enum
Asserts with Qt 6. Instead, check with the static QChar::isLetter, that handles invalid input properly.
This commit is contained in:
parent
25a2c0a9e8
commit
2bda46d5b9
1 changed files with 1 additions and 1 deletions
|
@ -505,7 +505,7 @@ Qt::KeyboardModifiers Xkb::modifiersRelevantForGlobalShortcuts(uint32_t scanCode
|
|||
// in that case the shift should be removed from the consumed modifiers again
|
||||
// otherwise it would not be possible to trigger e.g. Shift+W as a shortcut
|
||||
// see BUG: 370341
|
||||
if (QChar(toQtKey(m_keysym, scanCode, Qt::ControlModifier)).isLetter()) {
|
||||
if (QChar::isLetter(toQtKey(m_keysym, scanCode, Qt::ControlModifier))) {
|
||||
consumedMods = Qt::KeyboardModifiers();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue