VirtualBox

Changeset 102761 in vbox for trunk


Ignore:
Timestamp:
Jan 4, 2024 2:41:07 PM (9 months ago)
Author:
vboxsync
Message:

FE/Qt: UIVirtualBoxManager: More refactoring for Tool switch code; Renaming handlers as they are initiating tool switch through tools menu, not switching tool in pane itself; Also, no need for duplicate closing corresponding manager window, it is handled by switch handler later anyway.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r102760 r102761  
    11881188}
    11891189
    1190 void UIVirtualBoxManager::sltPerformShowGlobalTool(QAction *pAction)
     1190void UIVirtualBoxManager::sltPerformSwitchToGlobalTool(QAction *pAction)
    11911191{
    11921192    /* Sanity checks: */
     
    12001200    /* Make sure global item is selected: */
    12011201    m_pWidget->switchToGlobalItem();
    1202 
    1203     /* Make sure corresponding manager window is closed (if any): */
    1204     sltCloseManagerWindow(enmType);
    12051202
    12061203    /* Open the tool finally: */
     
    22702267}
    22712268
    2272 void UIVirtualBoxManager::sltPerformShowMachineTool(QAction *pAction)
     2269void UIVirtualBoxManager::sltPerformSwitchToMachineTool(QAction *pAction)
    22732270{
    22742271    /* Sanity checks: */
     
    22792276    const UIToolType enmType = pAction->property("UIToolType").value<UIToolType>();
    22802277    AssertReturnVoid(enmType != UIToolType_Invalid);
    2281 
    2282     /* Make sure corresponding manager window is closed (if any): */
    2283     sltCloseManagerWindow(enmType);
    22842278
    22852279    /* Open the tool finally: */
     
    25652559    /* 'File/Tools' menu connections: */
    25662560    connect(actionPool()->actionGroup(UIActionIndexMN_M_File_M_Tools), &QActionGroup::triggered,
    2567             this, &UIVirtualBoxManager::sltPerformShowGlobalTool);
     2561            this, &UIVirtualBoxManager::sltPerformSwitchToGlobalTool);
    25682562
    25692563    /* 'Welcome' menu connections: */
     
    27112705    /* 'Group/Tools' menu connections: */
    27122706    connect(actionPool()->actionGroup(UIActionIndexMN_M_Group_M_Tools), &QActionGroup::triggered,
    2713             this, &UIVirtualBoxManager::sltPerformShowMachineTool);
     2707            this, &UIVirtualBoxManager::sltPerformSwitchToMachineTool);
    27142708
    27152709    /* 'Machine/Tools' menu connections: */
    27162710    connect(actionPool()->actionGroup(UIActionIndexMN_M_Machine_M_Tools), &QActionGroup::triggered,
    2717             this, &UIVirtualBoxManager::sltPerformShowMachineTool);
     2711            this, &UIVirtualBoxManager::sltPerformSwitchToMachineTool);
    27182712
    27192713    /* 'Help' menu contents action connection. It is done here since we need different behaviour in
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette