Changeset 79129 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 13, 2019 1:17:48 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 131293
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/medium
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp
r79128 r79129 760 760 #else /* VBOX_GUI_WITH_NEW_MEDIA_EVENTS */ 761 761 762 void UIMediumEnumerator::parseMachine(CMachine comMachine, QList<QUuid> &result) 763 { 764 /* Acquire machine ID: */ 765 const QUuid uMachineId = comMachine.GetId(); 766 if (!comMachine.isOk()) 767 { 768 LogRel2(("GUI: UIMediumEnumerator: Unable to acquire machine ID!\n")); 769 msgCenter().cannotAcquireMachineParameter(comMachine); 770 } 771 else 772 { 773 /* For each the cached UIMedium we have: */ 774 foreach (const QUuid &uMediumId, mediumIDs()) 775 { 776 /* Check if medium isn't NULL, used by our 777 * machine and wasn't already enumerated. */ 778 const UIMedium guiMedium = medium(uMediumId); 779 if ( !guiMedium.isNull() 780 && guiMedium.machineIds().contains(uMachineId) 781 && !result.contains(uMediumId)) 782 { 783 /* Enumerate corresponding UIMedium: */ 784 LogRel2(("GUI: UIMediumEnumerator: Medium {%s} of machine {%s} will be enumerated..\n", 785 uMediumId.toString().toUtf8().constData(), 786 uMachineId.toString().toUtf8().constData())); 787 createMediumEnumerationTask(guiMedium); 788 result << uMediumId; 789 } 762 void UIMediumEnumerator::parseMachineId(const QUuid &uMachineId, QList<QUuid> &result) 763 { 764 /* For each the cached UIMedium we have: */ 765 foreach (const QUuid &uMediumId, mediumIDs()) 766 { 767 /* Check if medium isn't NULL, used by our 768 * machine and wasn't already enumerated. */ 769 const UIMedium guiMedium = medium(uMediumId); 770 if ( !guiMedium.isNull() 771 && guiMedium.machineIds().contains(uMachineId) 772 && !result.contains(uMediumId)) 773 { 774 /* Enumerate corresponding UIMedium: */ 775 LogRel2(("GUI: UIMediumEnumerator: Medium {%s} of machine {%s} will be enumerated..\n", 776 uMediumId.toString().toUtf8().constData(), 777 uMachineId.toString().toUtf8().constData())); 778 createMediumEnumerationTask(guiMedium); 779 result << uMediumId; 790 780 } 791 781 } … … 829 819 else 830 820 { 831 /* Parse machine: */ 832 parseMachine(comMachine, result); 821 /* Acquire machine ID: */ 822 const QUuid uMachineId = comMachine.GetId(); 823 if (!comMachine.isOk()) 824 { 825 LogRel2(("GUI: UIMediumEnumerator: Unable to acquire machine ID!\n")); 826 msgCenter().cannotAcquireMachineParameter(comMachine); 827 } 828 else 829 { 830 /* Parse machine ID: */ 831 parseMachineId(uMachineId, result); 832 } 833 833 } 834 834 } -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.h
r79128 r79129 183 183 const QList<QUuid> ¤tCMediumIDs); 184 184 #else /* VBOX_GUI_WITH_NEW_MEDIA_EVENTS */ 185 /** Parses incoming @a comMachine, enumerating ONLY KNOWN media it has.185 /** Parses machine with incoming @a uMachineId, enumerating ONLY KNOWN media it has. 186 186 * @param result Brings the list of previously enumerated media 187 187 * IDs to be appended with newly enumerated. */ 188 void parseMachine (CMachine comMachine, QList<QUuid> &result);188 void parseMachineId(const QUuid &uMachineId, QList<QUuid> &result); 189 189 /** Parses incoming @a comAttachment, enumerating the media it has attached. 190 190 * @param result Brings the list of previously enumerated media
Note:
See TracChangeset
for help on using the changeset viewer.