From ddbffbe7271cfdd3935c188ccb8e804ad73627f6 Mon Sep 17 00:00:00 2001 From: axis Date: Wed, 28 Jul 2010 16:10:40 +0200 Subject: Removed static on a member that didn't have to be. One step further towards no static data... RevBy: Trust me --- src/gui/kernel/qapplication_p.h | 2 +- src/gui/kernel/qapplication_s60.cpp | 11 +++++++---- 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 scanCodeCache; + QHash 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 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]; } } -- cgit v0.12