VirtualBox

Changeset 87513 in vbox


Ignore:
Timestamp:
Feb 1, 2021 3:59:46 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9917: Throwing UIToolType action property to corresponding place in Manager's action pool.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolManager.cpp

    r87509 r87513  
    7272    UIActionSimpleManagerFileShowExtensionPackManager(UIActionPool *pParent)
    7373        : UIActionSimple(pParent, ":/extension_pack_manager_16px.png", ":/extension_pack_manager_disabled_16px.png")
    74     {}
     74    {
     75        setProperty("UIToolType", QVariant::fromValue(UIToolType_Extensions));
     76    }
    7577
    7678protected:
     
    106108    UIActionSimpleManagerFileShowVirtualMediaManager(UIActionPool *pParent)
    107109        : UIActionSimple(pParent, ":/media_manager_16px.png", ":/media_manager_disabled_16px.png")
    108     {}
     110    {
     111        setProperty("UIToolType", QVariant::fromValue(UIToolType_Media));
     112    }
    109113
    110114protected:
     
    140144    UIActionSimpleManagerFileShowHostNetworkManager(UIActionPool *pParent)
    141145        : UIActionSimple(pParent, ":/host_iface_manager_16px.png", ":/host_iface_manager_disabled_16px.png")
    142     {}
     146    {
     147        setProperty("UIToolType", QVariant::fromValue(UIToolType_Network));
     148    }
    143149
    144150protected:
     
    174180    UIActionSimpleManagerFileShowCloudProfileManager(UIActionPool *pParent)
    175181        : UIActionSimple(pParent, ":/cloud_profile_manager_16px.png", ":/cloud_profile_manager_disabled_16px.png")
    176     {}
     182    {
     183        setProperty("UIToolType", QVariant::fromValue(UIToolType_Cloud));
     184    }
    177185
    178186protected:
     
    16131621                         ":/cloud_machine_console_configure_external_terminal_16px.png",
    16141622                         ":/cloud_machine_console_configure_external_terminal_disabled_16px.png")
    1615     {}
     1623    {
     1624        setProperty("UIToolType", QVariant::fromValue(UIToolType_CloudConsole));
     1625    }
    16161626
    16171627protected:
     
    41184128    pMenu->clear();
    41194129
    4120     /* Populate Welcome menu: */
     4130    /* Populate 'Welcome' menu: */
    41214131    pMenu->addAction(action(UIActionIndexMN_M_Welcome_S_New));
    41224132    pMenu->addAction(action(UIActionIndexMN_M_Welcome_S_Add));
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r87476 r87513  
    751751            UIAction *pAction = qobject_cast<UIAction*>(sender());
    752752            AssertPtrReturnVoid(pAction);
    753             enmType = pAction->property("toolType").value<UIToolType>();
     753            enmType = pAction->property("UIToolType").value<UIToolType>();
    754754        }
    755755    }
     
    22302230    /* Setup menu-bar policy: */
    22312231    menuBar()->setContextMenuPolicy(Qt::CustomContextMenu);
    2232 
    2233     /* Assign actions with corresponding tool types: */
    2234     actionPool()->action(UIActionIndexMN_M_File_S_ShowExtensionPackManager)->setProperty("toolType", QVariant::fromValue(UIToolType_Extensions));
    2235     actionPool()->action(UIActionIndexMN_M_File_S_ShowVirtualMediumManager)->setProperty("toolType", QVariant::fromValue(UIToolType_Media));
    2236     actionPool()->action(UIActionIndexMN_M_File_S_ShowHostNetworkManager)->setProperty("toolType", QVariant::fromValue(UIToolType_Network));
    2237     actionPool()->action(UIActionIndexMN_M_File_S_ShowCloudProfileManager)->setProperty("toolType", QVariant::fromValue(UIToolType_Cloud));
    2238     actionPool()->action(UIActionIndexMN_M_Machine_M_Console_S_ConfigureApplications)->setProperty("toolType", QVariant::fromValue(UIToolType_CloudConsole));
    2239     actionPool()->action(UIActionIndexMN_M_Group_M_Console_S_ConfigureApplications)->setProperty("toolType", QVariant::fromValue(UIToolType_CloudConsole));
    22402232}
    22412233
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