summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbkeyboard.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2015-06-07 14:15:06 +0200
committerThiago Macieira <thiago.macieira@intel.com>2015-06-08 13:23:51 +0000
commit861cbef49f0fe439c6498eb77fce12d301c23892 (patch)
treece63c3f1687daa3c3d9773ef68e47477b6463571 /src/plugins/platforms/xcb/qxcbkeyboard.cpp
parent5ca4cab7122646a5e58cf09be36f1647bd616e78 (diff)
Remove useless truncation to the size the string already has
Caused by the refactor in 05351b0cde3e80d2d0ae3a838e802ff6086e4b59. 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>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbkeyboard.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.cpp b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
index 2d96ed1c21..ea541e4556 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.cpp
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.cpp
@@ -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);
}