Changeset 846 for trunk/src/gui/kernel/qsoftkeymanager.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/gui/kernel/qsoftkeymanager.cpp
r769 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 44 44 #include "qbitmap.h" 45 45 #include "private/qsoftkeymanager_p.h" 46 #include "private/q object_p.h"46 #include "private/qaction_p.h" 47 47 #include "private/qsoftkeymanager_common_p.h" 48 48 … … 105 105 switch (standardKey) { 106 106 case MenuSoftKey: // FALL-THROUGH 107 action->setProperty(MENU_ACTION_PROPERTY, QVariant(true)); // TODO: can be refactored away to use _q_action_menubar107 QActionPrivate::get(action)->menuActionSoftkeys = true; 108 108 case OkSoftKey: 109 109 case SelectSoftKey: … … 163 163 void QSoftKeyManager::updateSoftKeys() 164 164 { 165 QSoftKeyManager::instance()->d_func()->pendingUpdate = true; 165 166 QEvent *event = new QEvent(QEvent::UpdateSoftKeys); 166 167 QApplication::postEvent(QSoftKeyManager::instance(), event); … … 251 252 252 253 d->updateSoftKeys_sys(); 254 d->pendingUpdate = false; 253 255 return true; 254 256 } … … 256 258 void QSoftKeyManager::setForceEnabledInSoftkeys(QAction *action) 257 259 { 258 action->setProperty(FORCE_ENABLED_PROPERTY, QVariant(true));260 QActionPrivate::get(action)->forceEnabledInSoftkeys = true; 259 261 } 260 262 261 263 bool QSoftKeyManager::isForceEnabledInSofkeys(QAction *action) 262 264 { 263 bool ret = false; 264 QVariant property = action->property(FORCE_ENABLED_PROPERTY); 265 if (property.isValid() && property.toBool()) 266 ret = true; 267 return ret; 265 return QActionPrivate::get(action)->forceEnabledInSoftkeys; 268 266 } 269 267 … … 280 278 bool QSoftKeyManager::handleCommand(int command) 281 279 { 280 if (QSoftKeyManager::instance()->d_func()->pendingUpdate) 281 (void)QSoftKeyManager::instance()->handleUpdateSoftKeys(); 282 282 283 return static_cast<QSoftKeyManagerPrivateS60*>(QSoftKeyManager::instance()->d_func())->handleCommand(command); 283 284 }
Note:
See TracChangeset
for help on using the changeset viewer.