VirtualBox

Changeset 86664 in vbox for trunk/src


Ignore:
Timestamp:
Oct 21, 2020 2:11:10 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane: A shortcut to call for fake cloud machine node creation to make corresponding function reusable.

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

Legend:

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

    r86655 r86664  
    730730    /* If there are no items left => add fake cloud VM node: */
    731731    if (pProfileNode->nodes(UIChooserNodeType_Machine).isEmpty())
    732         new UIChooserNodeMachine(pProfileNode /* parent */,
    733                                  0 /* position */,
    734                                  UIFakeCloudVirtualMachineItemState_Done);
     732        createCloudMachineNode(pProfileNode, UIFakeCloudVirtualMachineItemState_Done);
    735733}
    736734
     
    753751    /* If there are no items left => add fake cloud VM node: */
    754752    if (pProfileNode->nodes(UIChooserNodeType_Machine).isEmpty())
    755         new UIChooserNodeMachine(pProfileNode /* parent */,
    756                                  0 /* position */,
    757                                  UIFakeCloudVirtualMachineItemState_Done);
     753        createCloudMachineNode(pProfileNode, UIFakeCloudVirtualMachineItemState_Done);
    758754}
    759755
     
    10541050
    10551051            /* Add fake cloud VM item: */
    1056             new UIChooserNodeMachine(pProfileNode /* parent */,
    1057                                      0 /* position */,
    1058                                      UIFakeCloudVirtualMachineItemState_Loading);
     1052            createCloudMachineNode(pProfileNode, UIFakeCloudVirtualMachineItemState_Loading);
    10591053
    10601054            /* Insert cloud account key into a list of keys currently being updated: */
     
    14651459}
    14661460
     1461void UIChooserAbstractModel::createCloudMachineNode(UIChooserNode *pParentNode, UIFakeCloudVirtualMachineItemState enmState)
     1462{
     1463    new UIChooserNodeMachine(pParentNode,
     1464                             0 /* position */,
     1465                             enmState);
     1466}
     1467
    14671468void UIChooserAbstractModel::createCloudMachineNode(UIChooserNode *pParentNode, const CCloudMachine &comMachine)
    14681469{
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h

    r86655 r86664  
    2828/* GUI includes: */
    2929#include "UIChooserDefs.h"
     30#include "UIManagerDefs.h"
    3031
    3132/* COM includes: */
     
    280281        /** Creates local machine node based on certain @a comMachine as a child of specified @a pParentNode. */
    281282        void createLocalMachineNode(UIChooserNode *pParentNode, const CMachine &comMachine);
    282         /** Creates cloud machine node based on certain @a comMachine as a child of specified @a pParentNode. */
     283        /** Creates fake cloud machine node in passed @a enmState as a child of specified @a pParentNode. */
     284        void createCloudMachineNode(UIChooserNode *pParentNode, UIFakeCloudVirtualMachineItemState enmState);
     285        /** Creates real cloud machine node based on certain @a comMachine as a child of specified @a pParentNode. */
    283286        void createCloudMachineNode(UIChooserNode *pParentNode, const CCloudMachine &comMachine);
    284287
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