- Timestamp:
- Sep 18, 2019 1:46:52 PM (5 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h
r80888 r80890 483 483 * @{ */ 484 484 /** Starts medium-enumeration. */ 485 void startMediumEnumeration(const CMediumVector & mediaList= CMediumVector());485 void startMediumEnumeration(const CMediumVector &comMedia = CMediumVector()); 486 486 /** Enumerates additional medium. */ 487 487 void enumerateAdditionalMedium(const CMedium &comMedium); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r80652 r80890 210 210 { 211 211 AssertReturn(m_pSession, false); 212 uiCommon().startMediumEnumeration(m_pSession->getMachineMedia()); 213 } 212 uiCommon().startMediumEnumeration(m_pSession->machineMedia()); 213 } 214 214 215 /* Prepare machine-logic: */ 215 216 prepareMachineLogic(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r80576 r80890 2173 2173 } 2174 2174 2175 CMediumVector UISession::getMachineMedia() const 2176 { 2177 CMediumVector media; 2175 CMediumVector UISession::machineMedia() const 2176 { 2177 CMediumVector comMedia; 2178 /* Enumerate all the controllers: */ 2178 2179 foreach (const CStorageController &comController, m_machine.GetStorageControllers()) 2179 2180 { 2180 QString strAttData;2181 2181 /* Enumerate all the attachments: */ 2182 2182 foreach (const CMediumAttachment &comAttachment, m_machine.GetMediumAttachmentsOfController(comController.GetName())) 2183 2183 { 2184 /* Skip unrelated attachments: */ 2185 if (comAttachment.GetType() != KDeviceType_HardDisk && 2186 comAttachment.GetType() != KDeviceType_Floppy && 2187 comAttachment.GetType() != KDeviceType_DVD) 2184 /* Skip unrelated device types: */ 2185 const KDeviceType enmDeviceType = comAttachment.GetType(); 2186 if ( enmDeviceType != KDeviceType_HardDisk 2187 && enmDeviceType != KDeviceType_Floppy 2188 && enmDeviceType != KDeviceType_DVD) 2188 2189 continue; 2189 if (comAttachment.GetIsEjected() || comAttachment.GetMedium().isNull()) 2190 if ( comAttachment.GetIsEjected() 2191 || comAttachment.GetMedium().isNull()) 2190 2192 continue; 2191 media.append(comAttachment.GetMedium());2192 } 2193 } 2194 return media;2193 comMedia.append(comAttachment.GetMedium()); 2194 } 2195 } 2196 return comMedia; 2195 2197 } 2196 2198 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r80543 r80890 298 298 299 299 /** Returns a vector of media attached to the machine. */ 300 CMediumVector getMachineMedia() const;300 CMediumVector machineMedia() const; 301 301 302 302 signals:
Note:
See TracChangeset
for help on using the changeset viewer.