VirtualBox

Changeset 83258 in vbox for trunk/src


Ignore:
Timestamp:
Mar 11, 2020 1:57:57 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Handle cloud instance state-changes for inaccessible cases.

File:
1 edited

Legend:

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

    r83254 r83258  
    287287    /* Acquire current item: */
    288288    UIVirtualMachineItem *pItem = currentItem();
    289 
    290     /* If we still have same item selected: */
    291     if (pItem && pItem->id() == strId)
    292     {
    293         /* Propagate current items to update the Details-pane: */
    294         m_pPaneToolsMachine->setItems(currentItems());
    295         /* Repeat the task a bit delayed: */
    296         pItem->toCloud()->updateInfoAsync(true /* delayed? */);
     289    const bool fCurrentItemIsOk = pItem && pItem->accessible();
     290
     291    /* If current item is Ok: */
     292    if (fCurrentItemIsOk)
     293    {
     294        /* If we still have same item selected: */
     295        if (pItem && pItem->id() == strId)
     296        {
     297            /* Propagate current items to update the Details-pane: */
     298            m_pPaneToolsMachine->setItems(currentItems());
     299            /* Repeat the task a bit delayed: */
     300            pItem->toCloud()->updateInfoAsync(true /* delayed? */);
     301        }
     302    }
     303    else
     304    {
     305        /* Make sure Error pane raised: */
     306        m_pPaneToolsMachine->openTool(UIToolType_Error);
     307
     308        /* If we still have same item selected: */
     309        if (pItem && pItem->id() == strId)
     310        {
     311            /* Propagate current items to update the Details-pane (in any case): */
     312            m_pPaneToolsMachine->setItems(currentItems());
     313            /* Propagate last access error to update the Error-pane (if machine selected but inaccessible): */
     314            m_pPaneToolsMachine->setErrorDetails(pItem->accessError());
     315        }
    297316    }
    298317
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