diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2010-12-20 09:36:00 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2011-01-04 14:18:27 (GMT) |
commit | a7fbc64969168fef3285901e383a044692bebfd8 (patch) | |
tree | 9a0f6b14478d9fabbb5c582a123d31bee0b0c394 /src/plugins/platforms | |
parent | d79b18d59cc39396f4993a294f24cfb804be728f (diff) | |
download | Qt-a7fbc64969168fef3285901e383a044692bebfd8.zip Qt-a7fbc64969168fef3285901e383a044692bebfd8.tar.gz Qt-a7fbc64969168fef3285901e383a044692bebfd8.tar.bz2 |
Lighthouse: fix keyboard problem in testlite
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/testlite/qtestlitekeyboard.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/platforms/testlite/qtestlitekeyboard.cpp b/src/plugins/platforms/testlite/qtestlitekeyboard.cpp index c18de59..be7a686 100644 --- a/src/plugins/platforms/testlite/qtestlitekeyboard.cpp +++ b/src/plugins/platforms/testlite/qtestlitekeyboard.cpp @@ -834,7 +834,7 @@ QString QTestLiteKeyboard::translateKeySym(KeySym keysym, uint xmodifiers, if (chars.isEmpty()) chars.resize(1); chars[0] = (unsigned char) (keysym & 0xff); // get only the fourth bit for conversion later - count++; + count = 1; } } else if (keysym >= 0x1000000 && keysym <= 0x100ffff) { converted = (ushort) (keysym - 0x1000000); @@ -935,9 +935,9 @@ void QTestLiteKeyboard::handleKeyEvent(QWidget *widget, QEvent::Type type, XKeyE Qt::KeyboardModifiers modifiers; QByteArray chars; chars.resize(513); - int count = 1; + int count = 0; KeySym keySym; count = XLookupString(ev,chars.data(),chars.size(),&keySym,0); QString text = translateKeySym(keySym,ev->state,qtcode,modifiers,chars,count); - QWindowSystemInterface::handleKeyEvent(widget,ev->time,type,qtcode,modifiers,text); + QWindowSystemInterface::handleKeyEvent(widget,ev->time,type,qtcode,modifiers,text.left(count)); } |