Remove useless truncation to the size the string already has
Caused by the refactor in 05351b0cde.
The count was probably wrong in the creation of the QKeyEvent, so this
commit keeps it wrong.
Change-Id: I049a653beeb5454c9539ffff13e573bba826e927
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
bb10
parent
5ca4cab712
commit
861cbef49f
|
|
@ -1473,8 +1473,6 @@ void QXcbKeyboard::handleKeyEvent(xcb_window_t sourceWindow, QEvent::Type type,
|
|||
}
|
||||
|
||||
QString string = lookupString(xkb_state, code);
|
||||
int count = string.size();
|
||||
string.truncate(count);
|
||||
|
||||
// Ιf control modifier is set we should prefer latin character, this is
|
||||
// used for standard shortcuts in checks like "key == QKeySequence::Copy",
|
||||
|
|
@ -1506,7 +1504,7 @@ void QXcbKeyboard::handleKeyEvent(xcb_window_t sourceWindow, QEvent::Type type,
|
|||
|
||||
bool filtered = false;
|
||||
if (inputContext) {
|
||||
QKeyEvent event(type, qtcode, modifiers, code, sym, state, string, isAutoRepeat, count);
|
||||
QKeyEvent event(type, qtcode, modifiers, code, sym, state, string, isAutoRepeat, string.length());
|
||||
event.setTimestamp(time);
|
||||
filtered = inputContext->filterEvent(&event);
|
||||
}
|
||||
|
|
@ -1535,7 +1533,7 @@ void QXcbKeyboard::handleKeyEvent(xcb_window_t sourceWindow, QEvent::Type type,
|
|||
}
|
||||
|
||||
if (!filtered && inputContext) {
|
||||
QKeyEvent event(QEvent::KeyPress, qtcode, modifiers, code, sym, state, string, isAutoRepeat, count);
|
||||
QKeyEvent event(QEvent::KeyPress, qtcode, modifiers, code, sym, state, string, isAutoRepeat, string.length());
|
||||
event.setTimestamp(time);
|
||||
filtered = inputContext->filterEvent(&event);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue