diff options
author | Alessandro Portale <alessandro.portale@nokia.com> | 2009-10-05 17:44:44 (GMT) |
---|---|---|
committer | Alessandro Portale <alessandro.portale@nokia.com> | 2009-10-05 17:45:26 (GMT) |
commit | 2d0c3bd0fac50d4e9f6c2d7d5e9c2fd8eee4d599 (patch) | |
tree | f776e1600757c5fe77cc4a55f919afd270fcee4e /src/gui/kernel/qapplication_s60.cpp | |
parent | 064674426ef0c446561b0c338441bb7d5ca091bf (diff) | |
download | Qt-2d0c3bd0fac50d4e9f6c2d7d5e9c2fd8eee4d599.zip Qt-2d0c3bd0fac50d4e9f6c2d7d5e9c2fd8eee4d599.tar.gz Qt-2d0c3bd0fac50d4e9f6c2d7d5e9c2fd8eee4d599.tar.bz2 |
Fixing Keypad Navigation on N95 devices
HAL::Get(HALData::EPen, TInt& result) may set 'result' to 1
on some 3.1 systems (e.g. N95). But we know that S60 systems
below 5.0 did not support touch. Let's use tahth knowledge
and work-around that N95 HAL bug.
Rev-By: Jani Hautakangas
Diffstat (limited to 'src/gui/kernel/qapplication_s60.cpp')
-rw-r--r-- | src/gui/kernel/qapplication_s60.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 807a17f..acd1041 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1032,6 +1032,11 @@ void qt_init(QApplicationPrivate * /* priv */, int) //Check if mouse interaction is supported (either EMouse=1 in the HAL, or EMachineUID is one of the phones known to support this) const TInt KMachineUidSamsungI8510 = 0x2000C51E; + // HAL::Get(HALData::EPen, TInt& result) may set 'result' to 1 on some 3.1 systems (e.g. N95). + // But we know that S60 systems below 5.0 did not support touch. + static const bool touchIsUnsupportedOnSystem = + QSysInfo::s60Version() == QSysInfo::SV_S60_3_1 + || QSysInfo::s60Version() == QSysInfo::SV_S60_3_2; TInt machineUID; TInt mouse; TInt touch; @@ -1043,7 +1048,7 @@ void qt_init(QApplicationPrivate * /* priv */, int) if (err != KErrNone) machineUID = 0; err = HAL::Get(HALData::EPen, touch); - if (err != KErrNone) + if (err != KErrNone || touchIsUnsupportedOnSystem) touch = 0; if (mouse || machineUID == KMachineUidSamsungI8510) { S60->hasTouchscreen = false; |