VirtualBox

Ignore:
Timestamp:
Oct 14, 2020 11:20:30 AM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Another part of cleanup for Chooser pane VM registration stuff (s.a. r140923).

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

Legend:

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

    r86569 r86570  
    637637
    638638void UIChooserAbstractModel::sltCloudMachineRegistered(const QString &strProviderShortName, const QString &strProfileName,
    639                                                        const QUuid &uId, const bool fRegistered)
     639                                                       const QUuid &uMachineId, const bool fRegistered)
    640640{
    641641    /* Search for profile node: */
     
    651651    {
    652652        /* Remove machine-items with passed id: */
    653         pProfileNode->removeAllNodes(uId);
     653        pProfileNode->removeAllNodes(uMachineId);
    654654
    655655        /* If there are no items left: */
     
    666666    {
    667667        /* Add new machine-item: */
    668         const CCloudMachine comMachine = cloudMachineById(strProviderShortName, strProfileName, uId);
     668        const CCloudMachine comMachine = cloudMachineById(strProviderShortName, strProfileName, uMachineId);
    669669        addCloudMachineIntoTheTree(strProfileNodeName, comMachine, true /* make it visible */);
    670670
     
    689689}
    690690
    691 void UIChooserAbstractModel::sltHandleCloudProviderUninstall(const QUuid &uId)
     691void UIChooserAbstractModel::sltHandleCloudProviderUninstall(const QUuid &uProviderId)
    692692{
    693693    /* Search for top-level provider node: */
     
    702702        const QUuid uIteratedId = pGroupNode->property("id").toUuid();
    703703        AssertReturnVoid(!uIteratedId.isNull());
    704         if (uIteratedId != uId)
     704        if (uIteratedId != uProviderId)
    705705            continue;
    706706
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h

    r86569 r86570  
    149149          * @param  strProfileName        Brings profile name. */
    150150        virtual void sltCloudMachineRegistered(const QString &strProviderShortName, const QString &strProfileName,
    151                                                const QUuid &uId, const bool fRegistered);
     151                                               const QUuid &uMachineId, const bool fRegistered);
    152152        /** Handles session @a enmState change for machine with certain @a uMachineId. */
    153153        virtual void sltSessionStateChanged(const QUuid &uMachineId, const KSessionState enmState);
    154154        /** Handles snapshot change for machine/snapshot with certain @a uMachineId / @a uSnapshotId. */
    155155        virtual void sltSnapshotChanged(const QUuid &uMachineId, const QUuid &uSnapshotId);
    156         /** Handles event about cloud provider with @a uId being uninstalled. */
    157         virtual void sltHandleCloudProviderUninstall(const QUuid &uId);
     156        /** Handles event about cloud provider with @a uProviderId being uninstalled. */
     157        virtual void sltHandleCloudProviderUninstall(const QUuid &uProviderId);
    158158    /** @} */
    159159
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r86569 r86570  
    10791079}
    10801080
    1081 void UIChooserModel::sltLocalMachineRegistered(const QUuid &uId, const bool fRegistered)
    1082 {
    1083     /* Existing VM unregistered => make sure no item with passed uId is selected: */
     1081void UIChooserModel::sltLocalMachineRegistered(const QUuid &uMachineId, const bool fRegistered)
     1082{
     1083    /* Existing VM unregistered => make sure no item with passed uMachineId is selected: */
    10841084    if (!fRegistered)
    1085         makeSureNoItemWithCertainIdSelected(uId);
     1085        makeSureNoItemWithCertainIdSelected(uMachineId);
    10861086
    10871087    /* Call to base-class: */
    1088     UIChooserAbstractModel::sltLocalMachineRegistered(uId, fRegistered);
     1088    UIChooserAbstractModel::sltLocalMachineRegistered(uMachineId, fRegistered);
    10891089
    10901090    /* Existing VM unregistered? */
     
    10981098    {
    10991099        /* Should we show this VM? */
    1100         if (gEDataManager->showMachineInVirtualBoxManagerChooser(uId))
     1100        if (gEDataManager->showMachineInVirtualBoxManagerChooser(uMachineId))
    11011101        {
    11021102            /* Rebuild tree for main root: */
    11031103            buildTreeForMainRoot(false /* preserve selection */);
    11041104            /* Select newly added item: */
    1105             setSelectedItem(root()->searchForItem(uId.toString(),
     1105            setSelectedItem(root()->searchForItem(uMachineId.toString(),
    11061106                                                  UIChooserItemSearchFlag_Machine |
    11071107                                                  UIChooserItemSearchFlag_ExactId));
     
    11111111
    11121112void UIChooserModel::sltCloudMachineRegistered(const QString &strProviderShortName, const QString &strProfileName,
    1113                                                const QUuid &uId, const bool fRegistered)
    1114 {
    1115     /* Existing VM unregistered => make sure no item with passed uId is selected: */
     1113                                               const QUuid &uMachineId, const bool fRegistered)
     1114{
     1115    /* Existing VM unregistered => make sure no item with passed uMachineId is selected: */
    11161116    if (!fRegistered)
    1117         makeSureNoItemWithCertainIdSelected(uId);
     1117        makeSureNoItemWithCertainIdSelected(uMachineId);
    11181118
    11191119    /* Call to base-class: */
    1120     UIChooserAbstractModel::sltCloudMachineRegistered(strProviderShortName, strProfileName, uId, fRegistered);
     1120    UIChooserAbstractModel::sltCloudMachineRegistered(strProviderShortName, strProfileName, uMachineId, fRegistered);
    11211121
    11221122    /* Existing VM unregistered? */
     
    11321132        buildTreeForMainRoot(false /* preserve selection */);
    11331133        /* Select newly added item: */
    1134         setSelectedItem(root()->searchForItem(uId.toString(),
     1134        setSelectedItem(root()->searchForItem(uMachineId.toString(),
    11351135                                              UIChooserItemSearchFlag_Machine |
    11361136                                              UIChooserItemSearchFlag_ExactId));
     
    11381138}
    11391139
    1140 void UIChooserModel::sltHandleCloudProviderUninstall(const QUuid &uId)
     1140void UIChooserModel::sltHandleCloudProviderUninstall(const QUuid &uProviderId)
    11411141{
    11421142    /* Search for selected cloud machine items: */
     
    11541154
    11551155    /* Call to base-class: */
    1156     UIChooserAbstractModel::sltHandleCloudProviderUninstall(uId);
     1156    UIChooserAbstractModel::sltHandleCloudProviderUninstall(uProviderId);
    11571157
    11581158    /* Notify about selection invalidated: */
     
    11601160}
    11611161
    1162 void UIChooserModel::sltReloadMachine(const QUuid &uId)
     1162void UIChooserModel::sltReloadMachine(const QUuid &uMachineId)
    11631163{
    11641164    /* Call to base-class: */
    1165     UIChooserAbstractModel::sltReloadMachine(uId);
     1165    UIChooserAbstractModel::sltReloadMachine(uMachineId);
    11661166
    11671167    /* Should we show this VM? */
    1168     if (gEDataManager->showMachineInVirtualBoxManagerChooser(uId))
     1168    if (gEDataManager->showMachineInVirtualBoxManagerChooser(uMachineId))
    11691169    {
    11701170        /* Rebuild tree for main root: */
    11711171        buildTreeForMainRoot(false /* preserve selection */);
    11721172        /* Select newly added item: */
    1173         setSelectedItem(root()->searchForItem(uId.toString(),
     1173        setSelectedItem(root()->searchForItem(uMachineId.toString(),
    11741174                                              UIChooserItemSearchFlag_Machine |
    11751175                                              UIChooserItemSearchFlag_ExactId));
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.h

    r86569 r86570  
    261261    /** @name Main event handling stuff.
    262262      * @{ */
    263         /** Handles local machine registering/unregistering for machine with certain @a uId. */
    264         virtual void sltLocalMachineRegistered(const QUuid &uId, const bool fRegistered) /* override */;
    265         /** Handles cloud machine registering/unregistering for machine with certain @a uId.
     263        /** Handles local machine registering/unregistering for machine with certain @a uMachineId. */
     264        virtual void sltLocalMachineRegistered(const QUuid &uMachineId, const bool fRegistered) /* override */;
     265        /** Handles cloud machine registering/unregistering for machine with certain @a uMachineId.
    266266          * @param  strProviderShortName  Brings provider short name.
    267267          * @param  strProfileName        Brings profile name. */
    268268        virtual void sltCloudMachineRegistered(const QString &strProviderShortName, const QString &strProfileName,
    269                                                const QUuid &uId, const bool fRegistered);
    270         /** Handles event about cloud provider with @a uId being uninstalled. */
    271         virtual void sltHandleCloudProviderUninstall(const QUuid &uId);
     269                                               const QUuid &uMachineId, const bool fRegistered);
     270        /** Handles event about cloud provider with @a uProviderId being uninstalled. */
     271        virtual void sltHandleCloudProviderUninstall(const QUuid &uProviderId);
    272272    /** @} */
    273273
    274274    /** @name Children stuff.
    275275      * @{ */
    276         /** Handles reload machine with certain @a uId request. */
    277         virtual void sltReloadMachine(const QUuid &uId) /* override */;
     276        /** Handles reload machine with certain @a uMachineId request. */
     277        virtual void sltReloadMachine(const QUuid &uMachineId) /* override */;
    278278    /** @} */
    279279
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