Ported Qt 4 fix when getting an invalid native key on Windows
Task-number: QTBUG-36061 Change-Id: Ibde65735d861af4e1ef768e9e4314d30fed534a1 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
This commit is contained in:
parent
ac8dae8b5e
commit
cf827f2167
@ -1247,7 +1247,12 @@ QList<int> QWindowsKeyMapper::possibleKeys(const QKeyEvent *e) const
|
||||
{
|
||||
QList<int> result;
|
||||
|
||||
const KeyboardLayoutItem &kbItem = keyLayout[e->nativeVirtualKey()];
|
||||
|
||||
const quint32 nativeVirtualKey = e->nativeVirtualKey();
|
||||
if (nativeVirtualKey > 255)
|
||||
return result;
|
||||
|
||||
const KeyboardLayoutItem &kbItem = keyLayout[nativeVirtualKey];
|
||||
if (!kbItem.exists)
|
||||
return result;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user