VirtualBox

Changeset 86748 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 28, 2020 7:14:47 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane: Cloud VM is now notifying model about updates as well; This process is unified with cloud profile update registry.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager
Files:
5 edited

Legend:

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

    r86326 r86748  
    306306        m_pProgressHandler = new UIProgress(m_comProgress, this);
    307307        if (m_pProgressHandler)
     308        {
    308309            connect(m_pProgressHandler.data(), &UIProgress::sigProgressEventHandlingFinished,
    309310                    this, &UIVirtualMachineItemCloud::sltHandleRefreshCloudMachineInfoDone);
     311            emit sigRefreshStarted();
     312        }
    310313    }
    311314}
     
    329332    /* If not canceled => notify listeners: */
    330333    if (!fCanceled)
    331         emit sigStateChange();
     334        emit sigRefreshFinished();
    332335}
    333336
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.h

    r86215 r86748  
    4444signals:
    4545
    46     /** Notifies listeners about state change. */
    47     void sigStateChange();
     46    /** Notifies listeners about refresh started. */
     47    void sigRefreshStarted();
     48    /** Notifies listeners about refresh finished. */
     49    void sigRefreshFinished();
    4850
    4951public:
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp

    r86746 r86748  
    662662}
    663663
    664 void UIChooserAbstractModel::sltHandleCloudMachineStateChange()
    665 {
     664void UIChooserAbstractModel::sltHandleCloudMachineRefreshStarted()
     665{
     666    /* Acquire sender: */
    666667    UIVirtualMachineItem *pCache = qobject_cast<UIVirtualMachineItem*>(sender());
    667668    AssertPtrReturnVoid(pCache);
    668     emit sigCloudMachineStateChange(pCache->id());
     669
     670    /* Acquire sender's ID: */
     671    const QUuid uId = pCache->id();
     672
     673    /* Search for a first machine node with passed ID: */
     674    UIChooserNode *pMachineNode = searchMachineNode(invisibleRoot(), uId);
     675
     676    /* Insert cloud entity key into a list of keys currently being updated: */
     677    const UICloudEntityKey cloudEntityKey = UICloudEntityKey(pMachineNode->parentNode()->parentNode()->name(),
     678                                                             pMachineNode->parentNode()->name(),
     679                                                             pMachineNode->toMachineNode()->id());
     680    insertCloudEntityKey(cloudEntityKey);
     681}
     682
     683void UIChooserAbstractModel::sltHandleCloudMachineRefreshFinished()
     684{
     685    /* Acquire sender: */
     686    UIVirtualMachineItem *pCache = qobject_cast<UIVirtualMachineItem*>(sender());
     687    AssertPtrReturnVoid(pCache);
     688
     689    /* Acquire sender's ID: */
     690    const QUuid uId = pCache->id();
     691
     692    /* Search for a first machine node with passed ID: */
     693    UIChooserNode *pMachineNode = searchMachineNode(invisibleRoot(), uId);
     694
     695    /* Remove cloud entity key from the list of keys currently being updated: */
     696    const UICloudEntityKey cloudEntityKey = UICloudEntityKey(pMachineNode->parentNode()->parentNode()->name(),
     697                                                             pMachineNode->parentNode()->name(),
     698                                                             pMachineNode->toMachineNode()->id());
     699    removeCloudEntityKey(cloudEntityKey);
     700
     701    /* Notify listeners: */
     702    emit sigCloudMachineStateChange(uId);
    669703}
    670704
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h

    r86745 r86748  
    180180    /** @name Cloud machine stuff.
    181181      * @{ */
    182         /** Handles cloud machine state change. */
    183         void sltHandleCloudMachineStateChange();
     182        /** Handles cloud machine refresh started. */
     183        void sltHandleCloudMachineRefreshStarted();
     184        /** Handles cloud machine refresh finished. */
     185        void sltHandleCloudMachineRefreshFinished();
    184186    /** @} */
    185187
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserNodeMachine.cpp

    r84625 r86748  
    4848
    4949    /* Cloud VM item can notify machine node only directly (no console), we have to setup listener: */
    50     connect(static_cast<UIVirtualMachineItemCloud*>(m_pCache), &UIVirtualMachineItemCloud::sigStateChange,
     50    connect(static_cast<UIVirtualMachineItemCloud*>(m_pCache), &UIVirtualMachineItemCloud::sigRefreshFinished,
    5151            this, &UIChooserNodeMachine::sltHandleStateChange);
    52     connect(static_cast<UIVirtualMachineItemCloud*>(m_pCache), &UIVirtualMachineItemCloud::sigStateChange,
    53             static_cast<UIChooserAbstractModel*>(model()), &UIChooserAbstractModel::sltHandleCloudMachineStateChange);
     52    connect(static_cast<UIVirtualMachineItemCloud*>(m_pCache), &UIVirtualMachineItemCloud::sigRefreshStarted,
     53            static_cast<UIChooserAbstractModel*>(model()), &UIChooserAbstractModel::sltHandleCloudMachineRefreshStarted);
     54    connect(static_cast<UIVirtualMachineItemCloud*>(m_pCache), &UIVirtualMachineItemCloud::sigRefreshFinished,
     55            static_cast<UIChooserAbstractModel*>(model()), &UIChooserAbstractModel::sltHandleCloudMachineRefreshFinished);
    5456
    5557    /* Apply language settings: */
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