summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorRitt Konstantin <ritt.ks@gmail.com>2011-06-06 11:52:09 (GMT)
committerHarald Fernengel <harald.fernengel@nokia.com>2011-06-06 11:52:09 (GMT)
commitafafb37b7ef6130ab0545c9d12c7995e85dfb9b0 (patch)
treeff20e0b8e44bbb320e9fc93947bbed4ecc731248 /src/gui/kernel
parentf9053a429993a5081d7a3e67934f58345ee3e25b (diff)
downloadQt-afafb37b7ef6130ab0545c9d12c7995e85dfb9b0.zip
Qt-afafb37b7ef6130ab0545c9d12c7995e85dfb9b0.tar.gz
Qt-afafb37b7ef6130ab0545c9d12c7995e85dfb9b0.tar.bz2
minor code simplification
`ascii` wasn't used Merge-request: 2627 Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qapplication_qws.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/gui/kernel/qapplication_qws.cpp b/src/gui/kernel/qapplication_qws.cpp
index e11571c..1197c77 100644
--- a/src/gui/kernel/qapplication_qws.cpp
+++ b/src/gui/kernel/qapplication_qws.cpp
@@ -3552,13 +3552,8 @@ bool QETWidget::translateKeyEvent(const QWSKeyEvent *event, bool grab) /* grab i
QEvent::KeyPress : QEvent::KeyRelease;
bool autor = event->simpleData.is_auto_repeat;
QString text;
- char ascii = 0;
- if (event->simpleData.unicode) {
- QChar ch(event->simpleData.unicode);
- if (ch.unicode() != 0xffff)
- text += ch;
- ascii = ch.toLatin1();
- }
+ if (event->simpleData.unicode && event->simpleData.unicode != 0xffff)
+ text += QChar(event->simpleData.unicode);
code = event->simpleData.keycode;
#if defined QT3_SUPPORT && !defined(QT_NO_SHORTCUT)