diff options
author | axis <qt-info@nokia.com> | 2009-10-30 12:34:46 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-10-30 12:34:46 (GMT) |
commit | 7a2fbdaaf06e69b1b35c7e5560127ff5cd93f362 (patch) | |
tree | f158cbf2c32d046e31473b2d70e462c07c43d122 /src/gui/kernel/qsoftkeymanager.cpp | |
parent | 5e95f9c3c224b87840e750d4280806a40ed40c92 (diff) | |
parent | da9880eaed0d09338717db1a73db01e6b0ab080d (diff) | |
download | Qt-7a2fbdaaf06e69b1b35c7e5560127ff5cd93f362.zip Qt-7a2fbdaaf06e69b1b35c7e5560127ff5cd93f362.tar.gz Qt-7a2fbdaaf06e69b1b35c7e5560127ff5cd93f362.tar.bz2 |
Merge branch '4.6-s60' into 4.6
Diffstat (limited to 'src/gui/kernel/qsoftkeymanager.cpp')
-rw-r--r-- | src/gui/kernel/qsoftkeymanager.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index 75c321e..a5a2201 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -139,11 +139,18 @@ QAction *QSoftKeyManager::createKeyedAction(StandardSoftKey standardKey, Qt::Key QScopedPointer<QAction> action(createAction(standardKey, actionWidget)); connect(action.data(), SIGNAL(triggered()), QSoftKeyManager::instance(), SLOT(sendKeyEvent())); - + connect(action.data(), SIGNAL(destroyed(QObject*)), QSoftKeyManager::instance(), SLOT(cleanupHash(QObject*))); QSoftKeyManager::instance()->d_func()->keyedActions.insert(action.data(), key); return action.take(); } +void QSoftKeyManager::cleanupHash(QObject* obj) +{ + Q_D(QSoftKeyManager); + QAction *action = qobject_cast<QAction*>(obj); + d->keyedActions.remove(action); +} + void QSoftKeyManager::sendKeyEvent() { Q_D(QSoftKeyManager); @@ -200,6 +207,7 @@ bool QSoftKeyManager::event(QEvent *e) void QSoftKeyManagerPrivate::updateSoftKeys_sys(const QList<QAction*> &softkeys) { CEikButtonGroupContainer* nativeContainer = S60->buttonGroupContainer(); + nativeContainer->DrawableWindow()->SetOrdinalPosition(0); nativeContainer->DrawableWindow()->SetPointerCapturePriority(1); //keep softkeys available in modal dialog QT_TRAP_THROWING(nativeContainer->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY_WITH_IDS)); |