VirtualBox

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


Ignore:
Timestamp:
Apr 29, 2020 3:24:38 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
137670
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Chooser pane: Do not show cloud profile loading messages at startup, set them to fake inaccessible cloud VM items instead; Add possibility to refresh fake inaccessible cloud VM item to reload cloud profile contents.

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

Legend:

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

    r84085 r84087  
    6262}
    6363
     64void UIVirtualMachineItemCloud::setFakeCloudItemErrorMessage(const QString &strErrorMessage)
     65{
     66    m_strFakeCloudItemErrorMessage = strErrorMessage;
     67    recache();
     68}
     69
    6470void UIVirtualMachineItemCloud::updateInfoAsync(bool fDelayed)
    6571{
     
    8187
    8288            /* Determine whether VM is accessible: */
    83             m_fAccessible = true;
    84             m_strAccessError = QString();
     89            m_fAccessible = m_strFakeCloudItemErrorMessage.isNull();
     90            m_strAccessError = m_strFakeCloudItemErrorMessage;
    8591
    8692            /* Determine VM OS type: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.h

    r84085 r84087  
    6464        UIFakeCloudVirtualMachineItemState fakeCloudItemState() const { return m_enmFakeCloudItemState; }
    6565
     66        /** Defines fake cloud item @a strErrorMessage. */
     67        void setFakeCloudItemErrorMessage(const QString &strErrorMessage);
     68        /** Returns fake cloud item error message. */
     69        QString fakeCloudItemErrorMessage() const { return m_strFakeCloudItemErrorMessage; }
     70
    6671        /** Updates cloud VM info async way, @a fDelayed if requested or instant otherwise. */
    6772        void updateInfoAsync(bool fDelayed);
     
    125130        /** Holds fake cloud item state. */
    126131        UIFakeCloudVirtualMachineItemState  m_enmFakeCloudItemState;
     132        /** Holds fake cloud item error message. */
     133        QString                             m_strFakeCloudItemErrorMessage;
    127134
    128135        /** Holds the info acquire task instance. */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp

    r84085 r84087  
    445445    UITaskCloudListMachines *pAcquiringTask = static_cast<UITaskCloudListMachines*>(pTask);
    446446
    447     /* Make sure there were no errors: */
    448     if (!pAcquiringTask->errorInfo().isNull())
    449         return msgCenter().cannotAcquireCloudInstanceList(pAcquiringTask->errorInfo());
    450 
    451447    /* Search for profile node: */
    452448    const QString strProfileNodeName = QString("/%1/%2").arg(pAcquiringTask->providerShortName(), pAcquiringTask->profileName());
     
    482478        AssertPtrReturnVoid(pFakeCloudMachineItem);
    483479        pFakeCloudMachineItem->setFakeCloudItemState(UIFakeCloudVirtualMachineItemState_Done);
     480        pFakeCloudMachineItem->setFakeCloudItemErrorMessage(pAcquiringTask->errorInfo());
    484481    }
    485482}
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r84059 r84087  
    4343#include "UIMessageCenter.h"
    4444#include "UIModalWindowManager.h"
    45 #include "UITask.h"
     45#include "UITaskCloudListMachines.h"
     46#include "UIThreadPool.h"
    4647#include "UIVirtualBoxManagerWidget.h"
    4748#include "UIVirtualMachineItemCloud.h"
     
    10771078                                                              UIChooserItemSearchFlag_ExactId);
    10781079                }
     1080
     1081                break;
     1082            }
     1083            case UIVirtualMachineItemType_CloudFake:
     1084            {
     1085                /* Create list cloud machines task: */
     1086                UIChooserItem *pParent = pItem->parentItem();
     1087                AssertPtrReturnVoid(pParent);
     1088                UIChooserItem *pParentOfParent = pParent->parentItem();
     1089                AssertPtrReturnVoid(pParentOfParent);
     1090                UITaskCloudListMachines *pTask = new UITaskCloudListMachines(pParentOfParent->name(),
     1091                                                                             pParent->name());
     1092                AssertPtrReturnVoid(pTask);
     1093                uiCommon().threadPoolCloud()->enqueueTask(pTask);
    10791094
    10801095                break;
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