summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2010-07-28 14:10:40 (GMT)
committeraxis <qt-info@nokia.com>2010-07-29 14:06:03 (GMT)
commitddbffbe7271cfdd3935c188ccb8e804ad73627f6 (patch)
tree8e13952d9cc7564ab3157521ac08ff06fc50e34e
parent34d7bfd51d1dec1b3f397c733fc637af19dc0c97 (diff)
downloadQt-ddbffbe7271cfdd3935c188ccb8e804ad73627f6.zip
Qt-ddbffbe7271cfdd3935c188ccb8e804ad73627f6.tar.gz
Qt-ddbffbe7271cfdd3935c188ccb8e804ad73627f6.tar.bz2
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 3a3f816..53205b5 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 e8ee2e4..46a151b 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];
}
}