Changeset 52686 in vbox
- Timestamp:
- Sep 10, 2014 6:16:52 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r52645 r52686 1008 1008 QMenu *pDockMenu = actionPool()->action(UIActionIndexRT_M_Dock)->menu(); 1009 1009 1010 /* Add all VM menu entries to the dock menu. Leave out close and stuff like 1011 * this. */ 1010 /* Add all the 'Machine' menu entries to the 'Dock' menu: */ 1012 1011 QList<QAction*> actions = actionPool()->action(UIActionIndexRT_M_Machine)->menu()->actions(); 1013 1012 for (int i=0; i < actions.size(); ++i) 1014 if (actions.at(i)->menuRole() == QAction::NoRole) 1015 pDockMenu->addAction(actions.at(i)); 1013 { 1014 /* Check if we really have correct action: */ 1015 UIAction *pAction = qobject_cast<UIAction*>(actions.at(i)); 1016 /* Skip incorrect actions: */ 1017 if (!pAction) 1018 continue; 1019 /* Skip actions which have 'role' (to prevent consuming): */ 1020 if (pAction->menuRole() != QAction::NoRole) 1021 continue; 1022 /* Skip actions which have menu (to prevent consuming): */ 1023 if (qobject_cast<UIActionMenu*>(pAction)) 1024 continue; 1025 pDockMenu->addAction(actions.at(i)); 1026 } 1016 1027 pDockMenu->addSeparator(); 1017 1028
Note:
See TracChangeset
for help on using the changeset viewer.