summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbkeyboard.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-07-01 11:05:26 +0200
committerLiang Qi <liang.qi@theqtcompany.com>2015-07-01 11:05:26 +0200
commit0aa2d318b1524cdab42ab9988270779ddcc1922a (patch)
tree695c70702763ba2c66eb398ae9d545fc712a9e2d /src/plugins/platforms/xcb/qxcbkeyboard.cpp
parent6251d4dafc86bcbec09d1962050af9924249d419 (diff)
parent49049d90470eb3e94bda77d19ab7f7c57a0bd57f (diff)
Merge remote-tracking branch 'origin/5.5' into dev
Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qglobal.h src/corelib/global/qsysinfo.h src/corelib/global/qsystemdetection.h src/corelib/kernel/qobjectdefs.h src/plugins/plugins.pro tests/auto/widgets/itemviews/qlistview/qlistview.pro Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
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 f3bffd2998..2e088d3ca5 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);
}