- Timestamp:
- Sep 18, 2019 4:21:48 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp
r80894 r80895 197 197 m_media = guiMedia; 198 198 199 /* Notify listener about enumeration started: */ 200 LogRel(("GUI: UIMediumEnumerator: Medium-enumeration started...\n")); 201 m_fMediumEnumerationInProgress = true; 202 emit sigMediumEnumerationStarted(); 203 204 /* Make sure we really have more than one UIMedium (which is NULL): */ 205 if ( m_media.size() == 1 206 && m_media.first().id() == UIMedium::nullID()) 207 { 208 /* Notify listener about enumeration finished instantly: */ 209 LogRel(("GUI: UIMediumEnumerator: Medium-enumeration finished!\n")); 210 m_fMediumEnumerationInProgress = false; 211 emit sigMediumEnumerationFinished(); 199 /* If enumeration hasn't yet started: */ 200 if (!m_fMediumEnumerationInProgress) 201 { 202 /* Notify listener about enumeration started: */ 203 LogRel(("GUI: UIMediumEnumerator: Medium-enumeration started...\n")); 204 m_fMediumEnumerationInProgress = true; 205 emit sigMediumEnumerationStarted(); 206 207 /* Make sure we really have more than one UIMedium (which is NULL): */ 208 if ( guiMedia.size() == 1 209 && guiMedia.first().id() == UIMedium::nullID()) 210 { 211 /* Notify listener about enumeration finished instantly: */ 212 LogRel(("GUI: UIMediumEnumerator: Medium-enumeration finished!\n")); 213 m_fMediumEnumerationInProgress = false; 214 emit sigMediumEnumerationFinished(); 215 } 212 216 } 213 217 214 218 /* Start enumeration for media with non-NULL ID: */ 215 foreach (const QUuid &uMediumID, m_media.keys())219 foreach (const QUuid &uMediumID, guiMedia.keys()) 216 220 if (!uMediumID.isNull()) 217 createMediumEnumerationTask( m_media[uMediumID]);221 createMediumEnumerationTask(guiMedia[uMediumID]); 218 222 } 219 223 … … 232 236 foreach (const QUuid &uMediumId, guiMedia.keys()) 233 237 m_media[uMediumId] = guiMedia.value(uMediumId); 238 239 /* If enumeration hasn't yet started: */ 240 if (!m_fMediumEnumerationInProgress) 241 { 242 /* Notify listener about enumeration started: */ 243 LogRel(("GUI: UIMediumEnumerator: Medium-enumeration started...\n")); 244 m_fMediumEnumerationInProgress = true; 245 emit sigMediumEnumerationStarted(); 246 247 /* Make sure we really have more than one UIMedium (which is NULL): */ 248 if ( guiMedia.size() == 1 249 && guiMedia.first().id() == UIMedium::nullID()) 250 { 251 /* Notify listener about enumeration finished instantly: */ 252 LogRel(("GUI: UIMediumEnumerator: Medium-enumeration finished!\n")); 253 m_fMediumEnumerationInProgress = false; 254 emit sigMediumEnumerationFinished(); 255 } 256 } 234 257 235 258 /* Start enumeration for media with non-NULL ID: */
Note:
See TracChangeset
for help on using the changeset viewer.