- Timestamp:
- May 7, 2020 2:28:29 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r84102 r84188 805 805 foreach (UIVirtualMachineItem *pItem, items) 806 806 { 807 /* Get item state: */ 807 /* But for local machine items only: */ 808 AssertPtrReturnVoid(pItem); 809 if (pItem->itemType() != UIVirtualMachineItemType_Local) 810 continue; 811 812 /* Get machine item state: */ 808 813 const KMachineState enmState = pItem->machineState(); 809 814 … … 919 924 { 920 925 /* Check if current item could be saved: */ 926 AssertPtrReturnVoid(pItem); 921 927 if (!isActionEnabled(UIActionIndexST_M_Machine_M_Close_S_SaveState, QList<UIVirtualMachineItem*>() << pItem)) 922 928 continue; … … 931 937 /* Get session machine: */ 932 938 CMachine comMachine = comSession.GetMachine(); 939 /* Get machine item state: */ 940 const KMachineState enmState = pItem->machineState(); 933 941 /* Pause VM first if necessary: */ 934 if ( pItem->machineState()!= KMachineState_Paused)942 if (enmState != KMachineState_Paused) 935 943 comConsole.Pause(); 936 944 if (comConsole.isOk()) -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.cpp
r83946 r84188 92 92 bool UIChooserItemMachine::isLockedMachine() const 93 93 { 94 const KMachineState enmState = cacheType() == UIVirtualMachineItemType_Local 95 ? cache()->machineState() 96 : KMachineState_Null; 97 return enmState != KMachineState_PoweredOff && 98 enmState != KMachineState_Saved && 99 enmState != KMachineState_Teleported && 100 enmState != KMachineState_Aborted; 94 /* For local machines only, others always unlocked: */ 95 if (cacheType() != UIVirtualMachineItemType_Local) 96 return false; 97 98 /* Acquire local machine state: */ 99 const KMachineState enmState = cache()->machineState(); 100 return enmState != KMachineState_PoweredOff 101 && enmState != KMachineState_Saved 102 && enmState != KMachineState_Teleported 103 && enmState != KMachineState_Aborted; 101 104 } 102 105
Note:
See TracChangeset
for help on using the changeset viewer.