src/gui/kernel/qsoftkeymanager.cpp
changeset 30 5dc02b23752f
parent 22 79de32ba3296
child 33 3e2da88830cd
--- a/src/gui/kernel/qsoftkeymanager.cpp	Wed Jun 23 19:07:03 2010 +0300
+++ b/src/gui/kernel/qsoftkeymanager.cpp	Tue Jul 06 15:10:48 2010 +0300
@@ -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::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:
@@ -255,16 +255,12 @@
 
 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)