Pass extended key event infomation in xcb platform.

Bare QKeyEvent missing some useful info for input method.
Use new construct of QKeyEvent to create extended QKeyEvent

Change-Id: I8c89e80e7329b92e3e04d5fe52d07c6f6f9e006f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
This commit is contained in:
Weng Xuetian 2012-06-24 13:04:44 +08:00 committed by The Qt Project
parent be6e270d12
commit dccd784edf

View File

@ -1102,7 +1102,7 @@ void QXcbKeyboard::handleKeyEvent(QWindow *window, QEvent::Type type, xcb_keycod
bool filtered = false;
if (inputContext) {
QKeyEvent event(type, qtcode, modifiers, string, isAutoRepeat);
QKeyEvent event(type, qtcode, modifiers, code, sym, state, string.left(count), isAutoRepeat, count);
event.setTimestamp(time);
filtered = inputContext->filterEvent(&event);
}
@ -1130,7 +1130,7 @@ void QXcbKeyboard::handleKeyEvent(QWindow *window, QEvent::Type type, xcb_keycod
}
if (!filtered && inputContext) {
QKeyEvent event(QEvent::KeyPress, qtcode, modifiers, string, isAutoRepeat);
QKeyEvent event(QEvent::KeyPress, qtcode, modifiers, code, sym, state, string.left(count), isAutoRepeat, count);
event.setTimestamp(time);
filtered = inputContext->filterEvent(&event);
}