Changeset 86833 in vbox
- Timestamp:
- Nov 9, 2020 12:26:26 PM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/extensions
- Files:
-
- 2 edited
-
QIManagerDialog.cpp (modified) (2 diffs)
-
QIManagerDialog.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIManagerDialog.cpp
r86233 r86833 59 59 , m_fCloseEmitted(false) 60 60 , m_pWidget(0) 61 , m_pWidgetMenu(0)62 61 #ifdef VBOX_WS_MAC 63 62 , m_pWidgetToolbar(0) … … 187 186 void QIManagerDialog::prepareMenuBar() 188 187 { 189 if (!m_pWidgetMenu) 188 /* Skip the call if there are no menus to add: */ 189 if (m_widgetMenus.isEmpty()) 190 190 return; 191 /* Add widget menu: */ 192 menuBar()->addMenu(m_pWidgetMenu); 191 192 /* Add all the widget menus: */ 193 foreach (QMenu *pMenu, m_widgetMenus) 194 menuBar()->addMenu(pMenu); 193 195 194 196 #ifdef VBOX_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIManagerDialog.h
r86687 r86833 126 126 /** Defines the @a pWidget instance. */ 127 127 void setWidget(QWidget *pWidget) { m_pWidget = pWidget; } 128 /** Defines the @a pWidgetMenu instance. */ 129 void setWidgetMenu(QMenu *pWidgetMenu) { m_pWidgetMenu = pWidgetMenu; } 128 /** Defines the reference to widget menu, replacing current one. */ 129 void setWidgetMenu(QMenu *pWidgetMenu) { m_widgetMenus = QList<QMenu*>() << pWidgetMenu; } 130 /** Defines the list of references to widget menus, replacing current one. */ 131 void setWidgetMenus(QList<QMenu*> widgetMenus) { m_widgetMenus = widgetMenus; } 130 132 #ifdef VBOX_WS_MAC 131 133 /** Defines the @a pWidgetToolbar instance. */ … … 186 188 QWidget *m_pWidget; 187 189 188 /** Holds the widget menu instance. */ 189 QMenu *m_pWidgetMenu; 190 /** Holds a list of widget menu references. */ 191 QList<QMenu*> m_widgetMenus; 192 190 193 #ifdef VBOX_WS_MAC 191 194 /** Holds the widget toolbar instance. */
Note:
See TracChangeset
for help on using the changeset viewer.

