summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSatyam Bandarapu <ext-satyam.bandarapu@nokia.com>2012-02-27 11:20:40 +0200
committerPasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>2012-04-03 11:50:49 +0200
commit9ec3c3b4bfeba4dc3ed5f31b2413ed80b9afe584 (patch)
tree03d04b6c28889b764ba0aef27fa210602ebdedef
parent3e29d87844e1b6b0360ff05e38993567a85ac445 (diff)
downloadqt4-tools-9ec3c3b4bfeba4dc3ed5f31b2413ed80b9afe584.tar.gz
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> (cherry picked from commit 7be97ebddb27d570c6bcbe8ad881d890ea6a5d2d)
-rw-r--r--src/gui/kernel/qkeymapper_s60.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gui/kernel/qkeymapper_s60.cpp b/src/gui/kernel/qkeymapper_s60.cpp
index d9f88d5c49..e467fc2c8f 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();