Fix assert with Meta modifier
Meta modifier is not found in some configurations which triggers an assert. Instead of assert, ignore the modifier if it is not found. Task-number: QTBUG-52298 Change-Id: I258cee4014a30162afebb423eadaf07ef0ed6a1f Reviewed-by: Paul Olav Tvete <paul.tvete@theqtcompany.com>
This commit is contained in:
parent
08a62af7c5
commit
8c3e671239
@ -996,7 +996,6 @@ QList<int> QXcbKeyboard::possibleKeys(const QKeyEvent *event) const
|
||||
Q_ASSERT(shiftMod < 32);
|
||||
Q_ASSERT(altMod < 32);
|
||||
Q_ASSERT(controlMod < 32);
|
||||
Q_ASSERT(metaMod < 32);
|
||||
|
||||
xkb_mod_mask_t depressed;
|
||||
int qtKey = 0;
|
||||
@ -1017,7 +1016,7 @@ QList<int> QXcbKeyboard::possibleKeys(const QKeyEvent *event) const
|
||||
depressed |= (1 << shiftMod);
|
||||
if (neededMods & Qt::ControlModifier)
|
||||
depressed |= (1 << controlMod);
|
||||
if (neededMods & Qt::MetaModifier)
|
||||
if (metaMod < 32 && neededMods & Qt::MetaModifier)
|
||||
depressed |= (1 << metaMod);
|
||||
xkb_state_update_mask(kb_state, depressed, latchedMods, lockedMods, 0, 0, lockedLayout);
|
||||
sym = xkb_state_key_get_one_sym(kb_state, keycode);
|
||||
|
Loading…
x
Reference in New Issue
Block a user