- Timestamp:
- Jan 4, 2024 2:05:36 PM (13 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r102744 r102760 1186 1186 /* Remove instance if exist: */ 1187 1187 delete m_settings.take(UIAdvancedSettingsDialog::Type_Global); 1188 } 1189 1190 void UIVirtualBoxManager::sltPerformShowGlobalTool(QAction *pAction) 1191 { 1192 /* Sanity checks: */ 1193 AssertPtrReturnVoid(pAction); 1194 AssertPtrReturnVoid(m_pWidget); 1195 1196 /* Acquire tool type: */ 1197 const UIToolType enmType = pAction->property("UIToolType").value<UIToolType>(); 1198 AssertReturnVoid(enmType != UIToolType_Invalid); 1199 1200 /* Make sure global item is selected: */ 1201 m_pWidget->switchToGlobalItem(); 1202 1203 /* Make sure corresponding manager window is closed (if any): */ 1204 sltCloseManagerWindow(enmType); 1205 1206 /* Open the tool finally: */ 1207 m_pWidget->setToolsTypeGlobal(enmType); 1188 1208 } 1189 1209 … … 2250 2270 } 2251 2271 2252 void UIVirtualBoxManager::sltPerformShowGlobalTool(QAction *pAction)2253 {2254 /* Sanity checks: */2255 AssertPtrReturnVoid(pAction);2256 AssertPtrReturnVoid(m_pWidget);2257 2258 /* Acquire tool type: */2259 const UIToolType enmType = pAction->property("UIToolType").value<UIToolType>();2260 AssertReturnVoid(enmType != UIToolType_Invalid);2261 2262 /* Make sure global item is selected: */2263 m_pWidget->switchToGlobalItem();2264 2265 /* Make sure corresponding manager window is closed (if any): */2266 sltCloseManagerWindow(enmType);2267 2268 /* Open the tool finally: */2269 m_pWidget->setToolsTypeGlobal(enmType);2270 }2271 2272 2272 void UIVirtualBoxManager::sltPerformShowMachineTool(QAction *pAction) 2273 2273 { … … 2562 2562 connect(actionPool()->action(UIActionIndexMN_M_File_S_Close), &UIAction::triggered, 2563 2563 this, &UIVirtualBoxManager::sltPerformExit); 2564 2565 /* 'File/Tools' menu connections: */ 2564 2566 connect(actionPool()->actionGroup(UIActionIndexMN_M_File_M_Tools), &QActionGroup::triggered, 2565 2567 this, &UIVirtualBoxManager::sltPerformShowGlobalTool); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h
r102731 r102760 216 216 /** Handles call to close Preferences dialog. */ 217 217 void sltClosePreferencesDialog(); 218 219 /** Handles call to show global tool corresponding to passed @a pAction. */ 220 void sltPerformShowGlobalTool(QAction *pAction); 218 221 219 222 /** Handles call to exit application. */ … … 322 325 void sltHandlePoweredOffMachine(bool fSuccess, bool fIncludingDiscard); 323 326 324 /** Handles call to show global tool corresponding to passed @a pAction. */325 void sltPerformShowGlobalTool(QAction *pAction);326 327 /** Handles call to show machine tool corresponding to passed @a pAction. */ 327 328 void sltPerformShowMachineTool(QAction *pAction);
Note:
See TracChangeset
for help on using the changeset viewer.