VirtualBox

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


Ignore:
Timestamp:
Oct 20, 2020 2:59:16 PM (4 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane: Do not allow to remove cloud VMs while cloud account update is in progress.

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

Legend:

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

    r86345 r86655  
    512512}
    513513
     514void UIVirtualBoxManager::sltHandleCloudUpdateProgressChange()
     515{
     516    updateActionsAppearance();
     517}
     518
    514519void UIVirtualBoxManager::sltHandleToolTypeChange()
    515520{
     
    20872092    connect(m_pWidget, &UIVirtualBoxManagerWidget::sigGroupSavingStateChanged,
    20882093            this, &UIVirtualBoxManager::sltHandleGroupSavingProgressChange);
     2094    connect(m_pWidget, &UIVirtualBoxManagerWidget::sigCloudUpdateStateChanged,
     2095            this, &UIVirtualBoxManager::sltHandleCloudUpdateProgressChange);
    20892096    connect(m_pWidget, &UIVirtualBoxManagerWidget::sigStartOrShowRequest,
    20902097            this, &UIVirtualBoxManager::sltPerformStartOrShowMachine);
     
    23802387}
    23812388
     2389bool UIVirtualBoxManager::isCloudUpdateInProgress() const
     2390{
     2391    return m_pWidget->isCloudUpdateInProgress();
     2392}
     2393
    23822394void UIVirtualBoxManager::openAddMachineDialog(const QString &strFileName /* = QString() */)
    23832395{
     
    31783190        {
    31793191            return !isGroupSavingInProgress() &&
     3192                   (isItemsLocal(items) || !isCloudUpdateInProgress()) &&
    31803193                   isAtLeastOneItemRemovable(items);
    31813194        }
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.h

    r86344 r86655  
    131131        /** Handles signal about group saving progress change. */
    132132        void sltHandleGroupSavingProgressChange();
     133        /** Handles signal about cloud update progress change. */
     134        void sltHandleCloudUpdateProgressChange();
    133135
    134136        /** Handles singal about Tool type change.  */
     
    360362        /** Returns whether single cloud profile group is selected. */
    361363        bool isSingleCloudProfileGroupSelected() const;
     364
     365        /** Returns whether cloud update is in progress. */
     366        bool isCloudUpdateInProgress() const;
    362367    /** @} */
    363368
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r86344 r86655  
    117117}
    118118
     119bool UIVirtualBoxManagerWidget::isCloudUpdateInProgress() const
     120{
     121    return m_pPaneChooser->isCloudUpdateInProgress();
     122}
     123
    119124void UIVirtualBoxManagerWidget::openGroupNameEditor()
    120125{
     
    675680    connect(m_pPaneChooser, &UIChooser::sigGroupSavingStateChanged,
    676681            this, &UIVirtualBoxManagerWidget::sigGroupSavingStateChanged);
     682    connect(m_pPaneChooser, &UIChooser::sigCloudUpdateStateChanged,
     683            this, &UIVirtualBoxManagerWidget::sigCloudUpdateStateChanged);
    677684    connect(m_pPaneChooser, &UIChooser::sigToolMenuRequested,
    678685            this, &UIVirtualBoxManagerWidget::sltHandleToolMenuRequested);
     
    940947    disconnect(m_pPaneChooser, &UIChooser::sigGroupSavingStateChanged,
    941948               this, &UIVirtualBoxManagerWidget::sigGroupSavingStateChanged);
     949    disconnect(m_pPaneChooser, &UIChooser::sigCloudUpdateStateChanged,
     950               this, &UIVirtualBoxManagerWidget::sigCloudUpdateStateChanged);
    942951    disconnect(m_pPaneChooser, &UIChooser::sigToolMenuRequested,
    943952               this, &UIVirtualBoxManagerWidget::sltHandleToolMenuRequested);
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.h

    r86233 r86655  
    7070        /** Notifies about Chooser-pane group saving change. */
    7171        void sigGroupSavingStateChanged();
     72        /** Notifies about Chooser-pane cloud update change. */
     73        void sigCloudUpdateStateChanged();
    7274
    7375        /** Notifies about state change for cloud machine with certain @a uId. */
     
    145147        /** Returns whether group saving is in progress. */
    146148        bool isGroupSavingInProgress() const;
     149        /** Returns whether cloud update is in progress. */
     150        bool isCloudUpdateInProgress() const;
    147151
    148152        /** Opens group name editor. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.cpp

    r85508 r86655  
    4646}
    4747
     48bool UIChooser::isCloudUpdateInProgress() const
     49{
     50    AssertPtrReturn(model(), false);
     51    return model()->isCloudUpdateInProgress();
     52}
     53
    4854UIVirtualMachineItem *UIChooser::currentItem() const
    4955{
     
    241247    connect(model(), &UIChooserModel::sigGroupSavingStateChanged,
    242248            this, &UIChooser::sigGroupSavingStateChanged);
     249    connect(model(), &UIChooserModel::sigCloudUpdateStateChanged,
     250            this, &UIChooser::sigCloudUpdateStateChanged);
    243251
    244252    /* Chooser-model connections: */
     
    287295    disconnect(model(), &UIChooserModel::sigGroupSavingStateChanged,
    288296               this, &UIChooser::sigGroupSavingStateChanged);
     297    disconnect(model(), &UIChooserModel::sigCloudUpdateStateChanged,
     298               this, &UIChooser::sigCloudUpdateStateChanged);
    289299
    290300    /* Chooser-model connections: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooser.h

    r85508 r86655  
    5353    /** @} */
    5454
     55    /** @name Cloud update stuff.
     56      * @{ */
     57        /** Notifies listeners about cloud update state change. */
     58        void sigCloudUpdateStateChanged();
     59    /** @} */
     60
    5561    /** @name Tool stuff.
    5662      * @{ */
     
    103109        /** Returns whether group saving is in progress. */
    104110        bool isGroupSavingInProgress() const;
     111    /** @} */
     112
     113    /** @name Cloud update stuff.
     114      * @{ */
     115        /** Returns whether cloud update is in progress. */
     116        bool isCloudUpdateInProgress() const;
    105117    /** @} */
    106118
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp

    r86631 r86655  
    585585{
    586586    m_cloudAccountKeysBeingUpdated.insert(key);
     587    emit sigCloudUpdateStateChanged();
    587588}
    588589
     
    590591{
    591592    m_cloudAccountKeysBeingUpdated.remove(key);
     593    emit sigCloudUpdateStateChanged();
    592594}
    593595
     
    595597{
    596598    return m_cloudAccountKeysBeingUpdated.contains(key);
     599}
     600
     601bool UIChooserAbstractModel::isCloudUpdateInProgress() const
     602{
     603    return !m_cloudAccountKeysBeingUpdated.isEmpty();
    597604}
    598605
     
    10591066                                                                         strProfileName,
    10601067                                                                         true /* with refresh? */);
    1061             if (pTask)
    1062                 uiCommon().threadPoolCloud()->enqueueTask(pTask);
     1068            AssertPtrReturnVoid(pTask);
     1069            uiCommon().threadPoolCloud()->enqueueTask(pTask);
    10631070        }
    10641071    }
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.h

    r86631 r86655  
    6565    /** @} */
    6666
     67    /** @name Cloud update stuff.
     68      * @{ */
     69        /** Notifies listeners about cloud update state changed. */
     70        void sigCloudUpdateStateChanged();
     71    /** @} */
     72
    6773public:
    6874
     
    133139        /** Returns whether cloud account @a key is a part of key set currently being updated. */
    134140        bool containsCloudAccountKey(const UICloudAccountKey &key) const;
     141        /** Returns whether at least one cloud account update is in progress. */
     142        bool isCloudUpdateInProgress() const;
    135143    /** @} */
    136144
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