Changeset 44598 in vbox for trunk/src/VBox
- Timestamp:
- Feb 8, 2013 11:44:48 AM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r44449 r44598 51 51 , m_type(type) 52 52 , m_actionPoolType(pParent->type()) 53 , m_fShortcutHidden(false) 53 54 { 54 55 /* By default there is no specific menu role. … … 75 76 if (m_actionPoolType == UIActionPoolType_Selector) 76 77 { 77 /* Call to base-class: */ 78 QAction::setShortcut(shortcut); 78 /* If shortcut is visible: */ 79 if (!m_fShortcutHidden) 80 /* Call to base-class: */ 81 QAction::setShortcut(shortcut); 79 82 /* Remember shortcut: */ 80 83 m_shortcut = shortcut; … … 86 89 void UIAction::showShortcut() 87 90 { 91 m_fShortcutHidden = false; 88 92 if (!m_shortcut.isEmpty()) 89 93 QAction::setShortcut(m_shortcut); … … 92 96 void UIAction::hideShortcut() 93 97 { 98 m_fShortcutHidden = true; 94 99 if (!shortcut().isEmpty()) 95 100 QAction::setShortcut(QKeySequence()); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.h
r44448 r44598 115 115 QString m_strName; 116 116 QKeySequence m_shortcut; 117 bool m_fShortcutHidden; 117 118 }; 118 119
Note:
See TracChangeset
for help on using the changeset viewer.