diff options
author | Satyam Bandarapu <ext-satyam.bandarapu@nokia.com> | 2012-02-27 11:20:40 +0200 |
---|---|---|
committer | Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com> | 2012-02-27 11:13:43 +0100 |
commit | 7be97ebddb27d570c6bcbe8ad881d890ea6a5d2d (patch) | |
tree | d575d9ab8208e1b8c4e1ec2a0705dfa94ba2a6c7 | |
parent | ac91ce5bf2905f5f045182368d07a5361619a78e (diff) |
Symbian: Support for apps on previous symbian release
Behaviour of API QKeyEvent::text is changed between Belle and
forthcoming releases in Symbian. This Fix is needed to support
the legacy Apps.
Task-number: ou1cimx1#978743
Change-Id: I87a9aa2e3d87cf61708196204dce00de4393011e
Reviewed-by: Murray Read <ext-murray.2.read@nokia.com>
Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
-rw-r--r-- | src/gui/kernel/qkeymapper_s60.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/kernel/qkeymapper_s60.cpp b/src/gui/kernel/qkeymapper_s60.cpp index 2a7083e821..284406bc24 100644 --- a/src/gui/kernel/qkeymapper_s60.cpp +++ b/src/gui/kernel/qkeymapper_s60.cpp @@ -45,9 +45,11 @@ #include <e32cmn.h> #include <centralrepository.h> #include <biditext.h> +#include <qcoreapplication.h> QT_BEGIN_NAMESPACE - +static const TSecureId KLegacyAppUids [] = {0x20043644, 0x200431D8, 0x200431D9, 0x200431D7, + 0x200444FE, 0x2004450C, 0x20044504}; QKeyMapperPrivate::QKeyMapperPrivate() { } @@ -75,6 +77,17 @@ QString QKeyMapperPrivate::translateKeyEvent(int keySym, Qt::KeyboardModifiers / return QString(QChar('\t')); case Qt::Key_Return: // fall through case Qt::Key_Enter: + // some legacy Symbian apps depend on buggy behaviour + TSecureId currentUID = RThread().SecureId(); + for (int i = 0; i < sizeof(KLegacyAppUids) / sizeof(TSecureId); i++) { + if (KLegacyAppUids[i] == currentUID) { + QVariant v = QCoreApplication::instance()->property( + "noLegacyTranslateReturn"); + if (!v.isValid()) + return QString(); + break; + } + } return QString(QChar('\r')); default: return QString(); |