Changeset 24511 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Nov 9, 2009 3:27:28 PM (15 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r24501 r24511 2171 2171 Assert (mediumType != VBoxDefs::MediumType_Invalid); 2172 2172 2173 const CMediumAttachmentVector &attachments = mSession.GetMachine().GetMediumAttachments(); 2173 CMachine machine = mSession.GetMachine(); 2174 const CMediumAttachmentVector &attachments = machine.GetMediumAttachments(); 2174 2175 foreach (const CMediumAttachment &attachment, attachments) 2175 2176 { 2176 CStorageController controller = attachment.GetController();2177 CStorageController controller = machine.GetStorageControllerByName (attachment.GetController()); 2177 2178 if ( !controller.isNull() 2178 2179 && (attachment.GetType() == deviceType)) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp
r24493 r24511 1179 1179 if (attachment.GetMedium().GetId() == aMedium.id()) 1180 1180 { 1181 CStorageController controller = attachment.GetController(); 1182 machine.DetachDevice (controller.GetName(), attachment.GetPort(), attachment.GetDevice()); 1181 machine.DetachDevice (attachment.GetController(), attachment.GetPort(), attachment.GetDevice()); 1183 1182 if (!machine.isOk()) 1184 1183 { 1184 CStorageController controller = machine.GetStorageControllerByName (attachment.GetController()); 1185 1185 vboxProblem().cannotDetachDevice (this, machine, VBoxDefs::MediumType_HardDisk, aMedium.location(), 1186 1186 controller.GetBus(), attachment.GetPort(), attachment.GetDevice()); … … 1202 1202 if (medium.id() == aMedium.id()) 1203 1203 { 1204 machine.MountMedium (attachment.GetController() .GetName(), attachment.GetPort(), attachment.GetDevice(), QString(""), false /* force */);1204 machine.MountMedium (attachment.GetController(), attachment.GetPort(), attachment.GetDevice(), QString(""), false /* force */); 1205 1205 if (!machine.isOk()) 1206 1206 { 1207 CStorageController controller = machine.GetStorageControllerByName (attachment.GetController()); 1207 1208 vboxProblem().cannotUnmountMedium (this, machine, aMedium); 1208 1209 success = false; … … 1223 1224 if (medium.id() == aMedium.id()) 1224 1225 { 1225 machine.MountMedium (attachment.GetController() .GetName(), attachment.GetPort(), attachment.GetDevice(), QString(""), false /* force */);1226 machine.MountMedium (attachment.GetController(), attachment.GetPort(), attachment.GetDevice(), QString(""), false /* force */); 1226 1227 if (!machine.isOk()) 1227 1228 { 1229 CStorageController controller = machine.GetStorageControllerByName (attachment.GetController()); 1228 1230 vboxProblem().cannotUnmountMedium (this, machine, aMedium); 1229 1231 success = false; -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r24301 r24511 911 911 { 912 912 CMediumAttachment hda = vec [i]; 913 CStorageController controller = hda.GetController(); 914 machine.DetachDevice(controller.GetName(), hda.GetPort(), hda.GetDevice()); 913 const QString ctlName = hda.GetController(); 914 915 machine.DetachDevice(ctlName, hda.GetPort(), hda.GetDevice()); 915 916 if (!machine.isOk()) 916 917 { 918 CStorageController ctl = machine.GetStorageControllerByName(ctlName); 917 919 vboxProblem().cannotDetachDevice (this, machine, VBoxDefs::MediumType_HardDisk, 918 920 vboxGlobal().getMedium (CMedium (hda.GetMedium())).location(), 919 c ontroller.GetBus(), hda.GetPort(), hda.GetDevice());921 ctl.GetBus(), hda.GetPort(), hda.GetDevice()); 920 922 } 921 923 }
Note:
See TracChangeset
for help on using the changeset viewer.