VirtualBox

Changeset 83268 in vbox


Ignore:
Timestamp:
Mar 11, 2020 8:31:25 PM (5 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9653: VirtualBox Manager: Implement refresh for inaccessible cloud VMs; Make sure cloud VM which became accessible again show details-pane if error-pane was previously reflected.

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

Legend:

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

    r83065 r83268  
    19911991        case UIActionIndexST_M_Machine_S_Refresh:
    19921992        {
    1993             return isItemsLocal(items) &&
    1994                    isAtLeastOneItemInaccessible(items);
     1993            return isAtLeastOneItemInaccessible(items);
    19951994        }
    19961995        case UIActionIndexST_M_Group_S_ShowInFileManager:
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r83258 r83268  
    292292    if (fCurrentItemIsOk)
    293293    {
     294        /* If Error-pane is chosen currently => open tool currently chosen in Tools-pane: */
     295        if (m_pPaneToolsMachine->currentTool() == UIToolType_Error)
     296            sltHandleToolsPaneIndexChange();
     297
    294298        /* If we still have same item selected: */
    295299        if (pItem && pItem->id() == strId)
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserModel.cpp

    r83199 r83268  
    4545#include "UITask.h"
    4646#include "UIVirtualBoxManagerWidget.h"
    47 #include "UIVirtualMachineItem.h"
     47#include "UIVirtualMachineItemCloud.h"
    4848#include "UIWizardNewCloudVM.h"
    4949#include "UIWizardNewVM.h"
     
    10191019    foreach (UIChooserItemMachine *pItem, inaccessibleMachineItemList)
    10201020    {
    1021         /* Recache: */
    1022         pItem->recache();
    1023         /* Become accessible? */
    1024         if (pItem->accessible())
    1025         {
    1026             /* Machine name: */
    1027             const QString strMachineName = ((UIChooserItem*)pItem)->name();
    1028             /* We should reload this machine: */
    1029             sltReloadMachine(pItem->id());
    1030             /* Select first of reloaded items: */
    1031             if (!pSelectedItem)
    1032                 pSelectedItem = root()->searchForItem(strMachineName,
    1033                                                       UIChooserItemSearchFlag_Machine |
    1034                                                       UIChooserItemSearchFlag_ExactName);
     1021        switch (pItem->node()->toMachineNode()->cache()->itemType())
     1022        {
     1023            case UIVirtualMachineItem::ItemType_Local:
     1024            {
     1025                /* Recache: */
     1026                pItem->recache();
     1027
     1028                /* Become accessible? */
     1029                if (pItem->accessible())
     1030                {
     1031                    /* Machine name: */
     1032                    const QString strMachineName = ((UIChooserItem*)pItem)->name();
     1033                    /* We should reload this machine: */
     1034                    sltReloadMachine(pItem->id());
     1035                    /* Select first of reloaded items: */
     1036                    if (!pSelectedItem)
     1037                        pSelectedItem = root()->searchForItem(strMachineName,
     1038                                                              UIChooserItemSearchFlag_Machine |
     1039                                                              UIChooserItemSearchFlag_ExactName);
     1040                }
     1041
     1042                break;
     1043            }
     1044            case UIVirtualMachineItem::ItemType_CloudReal:
     1045            {
     1046                /* Much more simple than for local items, we are not reloading them, just refreshing: */
     1047                pItem->node()->toMachineNode()->cache()->toCloud()->updateInfoAsync(false /* delayed */);
     1048
     1049                break;
     1050            }
     1051            default:
     1052                break;
    10351053        }
    10361054    }
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