Changeset 83700 in vbox for trunk/src/VBox
- Timestamp:
- Apr 15, 2020 1:48:33 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualMachineItemCloud.cpp
r83656 r83700 23 23 #include "UICommon.h" 24 24 #include "UIConverter.h" 25 #include "UIErrorString.h" 25 26 #include "UIIconPool.h" 26 27 #include "UIMessageCenter.h" … … 31 32 /* COM includes: */ 32 33 #include "CProgress.h" 34 #include "CVirtualBoxErrorInfo.h" 33 35 34 36 … … 106 108 107 109 /* Now determine whether VM is accessible: */ 108 m_fAccessible = /*!m_comCloudMachine.isNull() 109 ? m_comCloudMachine.accessible() 110 : */true; 111 m_strAccessError = /*!m_comCloudMachine.isNull() 112 ? m_comCloudMachine.accessError() 113 : */QString(); 110 m_fAccessible = !m_comCloudMachine.isNull() 111 ? m_comCloudMachine.GetAccessible() 112 : true; 113 m_strAccessError = !m_comCloudMachine.isNull() 114 && !m_comCloudMachine.GetAccessible() 115 && !m_comCloudMachine.GetAccessError().isNull() 116 ? UIErrorString::formatErrorInfo(m_comCloudMachine.GetAccessError()) 117 : QString(); 114 118 115 119 /* Determine own VM attributes: */ 116 m_strOSTypeId = !m_comCloudMachine.isNull() 120 m_strOSTypeId = !m_comCloudMachine.isNull() 121 && m_comCloudMachine.GetAccessible() 117 122 ? m_comCloudMachine.GetOSTypeId() 118 123 : "Other"; 119 124 120 125 /* Determine VM states: */ 121 m_enmMachineState = !m_comCloudMachine.isNull() 126 m_enmMachineState = !m_comCloudMachine.isNull() 127 && m_comCloudMachine.GetAccessible() 122 128 ? m_comCloudMachine.GetState() 123 129 : KMachineState_PoweredOff; … … 155 161 void UIVirtualMachineItemCloud::recachePixmap() 156 162 { 157 /* If machine is accessible: */ 158 if (m_fAccessible) 159 { 160 /* We are using icon corresponding to cached guest OS type: */ 161 if ( itemType() == ItemType_CloudFake 162 && fakeCloudItemState() == FakeCloudItemState_Loading) 163 m_pixmap = uiCommon().vmGuestOSTypePixmapDefault("Cloud", &m_logicalPixmapSize); 164 else 165 m_pixmap = uiCommon().vmGuestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize); 166 } 167 /* Otherwise: */ 168 else 169 { 170 /// @todo handle inaccessible cloud VM 171 } 163 /* We are using icon corresponding to cached guest OS type: */ 164 if ( itemType() == ItemType_CloudFake 165 && fakeCloudItemState() == FakeCloudItemState_Loading) 166 m_pixmap = uiCommon().vmGuestOSTypePixmapDefault("Cloud", &m_logicalPixmapSize); 167 else 168 m_pixmap = uiCommon().vmGuestOSTypePixmapDefault(m_strOSTypeId, &m_logicalPixmapSize); 172 169 } 173 170 … … 227 224 { 228 225 /* If machine is accessible: */ 229 if ( m_fAccessible)226 if (accessible()) 230 227 { 231 228 if (itemType() == ItemType_CloudFake)
Note:
See TracChangeset
for help on using the changeset viewer.