summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-07-28 16:10:40 +0200
committeraxis <qt-info@nokia.com>2010-07-29 16:06:03 +0200
commitddbffbe7271cfdd3935c188ccb8e804ad73627f6 (patch)
tree8e13952d9cc7564ab3157521ac08ff06fc50e34e
parent34d7bfd51d1dec1b3f397c733fc637af19dc0c97 (diff)
Removed static on a member that didn't have to be.
One step further towards no static data... RevBy: Trust me
-rw-r--r--src/gui/kernel/qapplication_p.h2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp11
2 files changed, 8 insertions, 5 deletions
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 3a3f816097..53205b5dce 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -603,7 +603,7 @@ private:
#endif
#ifdef Q_OS_SYMBIAN
- static QHash<TInt, TUint> scanCodeCache;
+ QHash<TInt, TUint> scanCodeCache;
#endif
static QApplicationPrivate *self;
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index e8ee2e4ca8..46a151b746 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -226,8 +226,6 @@ void QS60Beep::MatoPlayComplete(TInt aError)
}
-QHash<TInt, TUint> QApplicationPrivate::scanCodeCache;
-
static Qt::KeyboardModifiers mapToQtModifiers(TUint s60Modifiers)
{
Qt::KeyboardModifiers result = Qt::NoModifier;
@@ -2096,13 +2094,18 @@ void QApplication::setEffectEnabled(Qt::UIEffect /* effect */, bool /* enable */
TUint QApplicationPrivate::resolveS60ScanCode(TInt scanCode, TUint keysym)
{
+ if (!scanCode)
+ return keysym;
+
+ QApplicationPrivate *d = QApplicationPrivate::instance();
+
if (keysym) {
// If keysym is specified, cache it.
- scanCodeCache.insert(scanCode, keysym);
+ d->scanCodeCache.insert(scanCode, keysym);
return keysym;
} else {
// If not, retrieve the cached version.
- return scanCodeCache[scanCode];
+ return d->scanCodeCache[scanCode];
}
}