diff options
author | mread <qt-info@nokia.com> | 2011-03-09 16:02:27 (GMT) |
---|---|---|
committer | mread <qt-info@nokia.com> | 2011-03-10 11:51:08 (GMT) |
commit | 9525ef8f3f8c2f28992457a626356cec86bd7279 (patch) | |
tree | 43634cf9c593036f76f0318fa5b4e2299a4d4460 | |
parent | f5190b12af6dbeb3f98831276a0bd4e49467500a (diff) | |
download | Qt-9525ef8f3f8c2f28992457a626356cec86bd7279.zip Qt-9525ef8f3f8c2f28992457a626356cec86bd7279.tar.gz Qt-9525ef8f3f8c2f28992457a626356cec86bd7279.tar.bz2 |
key to string translations for Symbian return and tab characters
The Symbian port was not supplying string content for special characters
that have a valid string representation. These appear to be return and
tab characters. Now it does, for these.
Task-number: QTBUG-17545
Reviewed-by: Shane Kearns
-rw-r--r-- | src/gui/kernel/qkeymapper_s60.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gui/kernel/qkeymapper_s60.cpp b/src/gui/kernel/qkeymapper_s60.cpp index bcf32a5..08cfae0 100644 --- a/src/gui/kernel/qkeymapper_s60.cpp +++ b/src/gui/kernel/qkeymapper_s60.cpp @@ -69,8 +69,17 @@ void QKeyMapperPrivate::clearMappings() QString QKeyMapperPrivate::translateKeyEvent(int keySym, Qt::KeyboardModifiers /* modifiers */) { - if (keySym >= Qt::Key_Escape) - return QString(); + if (keySym >= Qt::Key_Escape) { + switch (keySym) { + case Qt::Key_Tab: + return QString(QChar('\t')); + case Qt::Key_Return: // fall through + case Qt::Key_Enter: + return QString(QChar('\r')); + default: + return QString(); + } + } // Symbian doesn't actually use modifiers, but gives us the character code directly. |