diff options
Diffstat (limited to 'src/gui/kernel/qsoftkeymanager.cpp')
-rw-r--r-- | src/gui/kernel/qsoftkeymanager.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp index 923144a..04e4685 100644 --- a/src/gui/kernel/qsoftkeymanager.cpp +++ b/src/gui/kernel/qsoftkeymanager.cpp @@ -43,7 +43,7 @@ #include "qevent.h" #include "qbitmap.h" #include "private/qsoftkeymanager_p.h" -#include "private/qobject_p.h" +#include "private/qaction_p.h" #include "private/qsoftkeymanager_common_p.h" #ifdef Q_WS_S60 @@ -104,7 +104,7 @@ QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *act QAction::SoftKeyRole softKeyRole = QAction::NoSoftKey; switch (standardKey) { case MenuSoftKey: // FALL-THROUGH - action->setProperty(MENU_ACTION_PROPERTY, QVariant(true)); // TODO: can be refactored away to use _q_action_menubar + QActionPrivate::get(action)->menuActionSoftkeys = true; case OkSoftKey: case SelectSoftKey: case DoneSoftKey: @@ -242,6 +242,7 @@ bool QSoftKeyManager::handleUpdateSoftKeys() d->requestedSoftKeyActions.clear(); bool recursiveMerging = false; QWidget *source = softkeySource(NULL, recursiveMerging); + d->initialSoftKeySource = source; while (source) { if (appendSoftkeys(*source, level)) ++level; @@ -254,16 +255,12 @@ bool QSoftKeyManager::handleUpdateSoftKeys() void QSoftKeyManager::setForceEnabledInSoftkeys(QAction *action) { - action->setProperty(FORCE_ENABLED_PROPERTY, QVariant(true)); + QActionPrivate::get(action)->forceEnabledInSoftkeys = true; } bool QSoftKeyManager::isForceEnabledInSofkeys(QAction *action) { - bool ret = false; - QVariant property = action->property(FORCE_ENABLED_PROPERTY); - if (property.isValid() && property.toBool()) - ret = true; - return ret; + return QActionPrivate::get(action)->forceEnabledInSoftkeys; } bool QSoftKeyManager::event(QEvent *e) |