Changeset 73944 in vbox
- Timestamp:
- Aug 29, 2018 12:15:37 PM (7 years ago)
- svn:sync-xref-src-repo-rev:
- 124671
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp ¶
r72363 r73944 213 213 /* Cache medium data early if necessary: */ 214 214 if (vboxGlobal().agressiveCaching()) 215 vboxGlobal().startMediumEnumeration(); 216 215 { 216 AssertReturn(!m_pSession, false); 217 vboxGlobal().startMediumEnumeration(m_pSession->getMachineMedia()); 218 } 217 219 /* Prepare machine-logic: */ 218 220 prepareMachineLogic(); … … 316 318 sltChangeVisualState(m_initialVisualState); 317 319 } 318 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp ¶
r72457 r73944 2119 2119 } 2120 2120 2121 CMediumVector UISession::getMachineMedia() const 2122 { 2123 CMediumVector media; 2124 foreach (const CStorageController &controller, m_machine.GetStorageControllers()) 2125 { 2126 QString strAttData; 2127 /* Enumerate all the attachments: */ 2128 foreach (const CMediumAttachment &attachment, m_machine.GetMediumAttachmentsOfController(controller.GetName())) 2129 { 2130 /* Skip unrelated attachments: */ 2131 if (attachment.GetType() != KDeviceType_HardDisk && 2132 attachment.GetType() != KDeviceType_Floppy && 2133 attachment.GetType() != KDeviceType_DVD) 2134 continue; 2135 if (attachment.GetIsEjected() || attachment.GetMedium().isNull()) 2136 continue; 2137 media.append(attachment.GetMedium()); 2138 } 2139 } 2140 return media; 2141 } 2142 2121 2143 void UISession::loadVMSettings() 2122 2144 { … … 2270 2292 } 2271 2293 #endif /* VBOX_GUI_WITH_KEYS_RESET_HANDLER */ 2272 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h ¶
r72330 r73944 39 39 #include "CKeyboard.h" 40 40 #include "CMachineDebugger.h" 41 #include "CMedium.h" 41 42 42 43 /* Forward declarations: */ … … 279 280 /** Returns the list of visible guest windows. */ 280 281 QList<int> listOfVisibleWindows() const; 282 283 /** Returns a vector of media attached to the machine. */ 284 CMediumVector getMachineMedia() const; 281 285 282 286 signals: … … 559 563 560 564 #endif /* !___UISession_h___ */ 561
Note:
See TracChangeset
for help on using the changeset viewer.