summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorHonglei Zhang <honglei.zhang@nokia.com>2011-08-04 07:48:43 (GMT)
committerHonglei Zhang <honglei.zhang@nokia.com>2011-08-04 07:48:43 (GMT)
commit4fb3beaf326384cd85c159ceecd31a625913dcbb (patch)
tree3ee31f4755292a0077e10d723804491f2ba794d3 /src/gui/kernel
parent41c038dadb505d82447e1d9a8a743e0614c60098 (diff)
parent8479ef846a60c230be3f5af470ec5129bc4375f3 (diff)
downloadQt-4fb3beaf326384cd85c159ceecd31a625913dcbb.zip
Qt-4fb3beaf326384cd85c159ceecd31a625913dcbb.tar.gz
Qt-4fb3beaf326384cd85c159ceecd31a625913dcbb.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-symbian-team
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp6
-rw-r--r--src/gui/kernel/qsoftkeymanager_common_p.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index a866da3..500bcff 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -54,7 +54,7 @@
#ifndef QT_NO_SOFTKEYMANAGER
QT_BEGIN_NAMESPACE
-QSoftKeyManager *QSoftKeyManagerPrivate::self = 0;
+QScopedPointer<QSoftKeyManager> QSoftKeyManagerPrivate::self(0);
QString QSoftKeyManager::standardSoftKeyText(StandardSoftKey standardKey)
{
@@ -85,9 +85,9 @@ QString QSoftKeyManager::standardSoftKeyText(StandardSoftKey standardKey)
QSoftKeyManager *QSoftKeyManager::instance()
{
if (!QSoftKeyManagerPrivate::self)
- QSoftKeyManagerPrivate::self = new QSoftKeyManager;
+ QSoftKeyManagerPrivate::self.reset(new QSoftKeyManager);
- return QSoftKeyManagerPrivate::self;
+ return QSoftKeyManagerPrivate::self.data();
}
QSoftKeyManager::QSoftKeyManager() :
diff --git a/src/gui/kernel/qsoftkeymanager_common_p.h b/src/gui/kernel/qsoftkeymanager_common_p.h
index 5b76e60..e9cbd7d 100644
--- a/src/gui/kernel/qsoftkeymanager_common_p.h
+++ b/src/gui/kernel/qsoftkeymanager_common_p.h
@@ -67,7 +67,7 @@ public:
virtual void updateSoftKeys_sys() {};
protected:
- static QSoftKeyManager *self;
+ static QScopedPointer<QSoftKeyManager> self;
QHash<QAction*, Qt::Key> keyedActions;
QMultiHash<int, QAction*> requestedSoftKeyActions;
QWidget *initialSoftKeySource;