Skip to content

Commit 9ec3c3b

Browse files
Satyam BandarapuPasi Pentikäinen
Satyam Bandarapu
authored and
Pasi Pentikäinen
committed
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 <[email protected]> Reviewed-by: Pasi Pentikäinen <[email protected]> (cherry picked from commit 7be97eb)
1 parent 3e29d87 commit 9ec3c3b

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/gui/kernel/qkeymapper_s60.cpp

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,11 @@
4545
#include <e32cmn.h>
4646
#include <centralrepository.h>
4747
#include <biditext.h>
48+
#include <qcoreapplication.h>
4849

4950
QT_BEGIN_NAMESPACE
50-
51+
static const TSecureId KLegacyAppUids [] = {0x20043644, 0x200431D8, 0x200431D9, 0x200431D7,
52+
0x200444FE, 0x2004450C, 0x20044504};
5153
QKeyMapperPrivate::QKeyMapperPrivate()
5254
{
5355
}
@@ -75,6 +77,17 @@ QString QKeyMapperPrivate::translateKeyEvent(int keySym, Qt::KeyboardModifiers /
7577
return QString(QChar('\t'));
7678
case Qt::Key_Return: // fall through
7779
case Qt::Key_Enter:
80+
// some legacy Symbian apps depend on buggy behaviour
81+
TSecureId currentUID = RThread().SecureId();
82+
for (int i = 0; i < sizeof(KLegacyAppUids) / sizeof(TSecureId); i++) {
83+
if (KLegacyAppUids[i] == currentUID) {
84+
QVariant v = QCoreApplication::instance()->property(
85+
"noLegacyTranslateReturn");
86+
if (!v.isValid())
87+
return QString();
88+
break;
89+
}
90+
}
7891
return QString(QChar('\r'));
7992
default:
8093
return QString();

0 commit comments

Comments
 (0)