summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb
diff options
context:
space:
mode:
authorAlexander Volkov <a.volkov@rusbitech.ru>2014-10-06 19:22:00 +0400
committerAlexander Volkov <a.volkov@rusbitech.ru>2014-10-16 21:49:02 +0200
commitd904533acba1267431ca2c5f0d3e85cc59a20a26 (patch)
tree51f637bffc20824694de49eb62601c54f8afe5ae /src/plugins/platforms/xcb
parent6d1c4c8862161fd4aaffe307c7267ceeb408d8d8 (diff)
xcb: Don't return 0 as a possible key for a shortcut
QXcbKeyboard::keysymToQtKey() may return a value of 0 for keysyms that are not supported by Qt (e.g. for XK_ISO_Next_Group). It is then translated to an empty QKeySequence which in turn is detected as a partial match for any shortcut. The behavior of QShortcutMap::nextState() becomes broken because it sets current state to QKeySequence::PartialMatch while there is no match at all. Task-number: QTCREATORBUG-9589 Change-Id: I1e2a4511a876dfa418db9906d10382255a2e4d62 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Sergey Belyashov <Sergey.Belyashov@gmail.com>
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 7e70e7258d..8c12b29a99 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -903,7 +903,7 @@ QList<int> QXcbKeyboard::possibleKeys(const QKeyEvent *event) const
Qt::KeyboardModifiers mods = modifiers & ~neededMods;
qtKey = keysymToQtKey(sym, mods, lookupString(kb_state, event->nativeScanCode()));
- if (qtKey == baseQtKey)
+ if (qtKey == baseQtKey || qtKey == 0)
continue;
result += (qtKey + mods);