VirtualBox

Changeset 23880 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Oct 19, 2009 5:48:04 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53660
Message:

Main/MediumAttachment: change return value of Controller getter to return a reference to the StorageController instead of just the name

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp

    r23801 r23880  
    12651265                if (attachment.GetMedium().GetId() == aMedium.id())
    12661266                {
    1267                     machine.DetachDevice (attachment.GetController(), attachment.GetPort(), attachment.GetDevice());
     1267                    CStorageController controller = attachment.GetController();
     1268                    machine.DetachDevice (controller.GetName(), attachment.GetPort(), attachment.GetDevice());
    12681269                    if (!machine.isOk())
    12691270                    {
    1270                         CStorageController controller = machine.GetStorageControllerByName (attachment.GetController());
    12711271                        vboxProblem().cannotDetachDevice (this, machine, VBoxDefs::MediumType_HardDisk, aMedium.location(),
    12721272                                                          controller.GetBus(), attachment.GetPort(), attachment.GetDevice());
     
    12881288                if (medium.id() == aMedium.id())
    12891289                {
    1290                     machine.MountMedium (attachment.GetController(), attachment.GetPort(), attachment.GetDevice(), QString());
     1290                    machine.MountMedium (attachment.GetController().GetName(), attachment.GetPort(), attachment.GetDevice(), QString());
    12911291                    if (!machine.isOk())
    12921292                    {
    1293                         CStorageController controller = machine.GetStorageControllerByName (attachment.GetController());
    12941293                        vboxProblem().cannotUnmountMedium (this, machine, aMedium);
    12951294                        success = false;
     
    13101309                if (medium.id() == aMedium.id())
    13111310                {
    1312                     machine.MountMedium (attachment.GetController(), attachment.GetPort(), attachment.GetDevice(), QString());
     1311                    machine.MountMedium (attachment.GetController().GetName(), attachment.GetPort(), attachment.GetDevice(), QString());
    13131312                    if (!machine.isOk())
    13141313                    {
    1315                         CStorageController controller = machine.GetStorageControllerByName (attachment.GetController());
    13161314                        vboxProblem().cannotUnmountMedium (this, machine, aMedium);
    13171315                        success = false;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r23585 r23880  
    911911            {
    912912                CMediumAttachment hda = vec [i];
    913                 const QString ctlName = hda.GetController();
    914 
    915                 machine.DetachDevice(ctlName, hda.GetPort(), hda.GetDevice());
     913                CStorageController controller = hda.GetController();
     914                machine.DetachDevice(controller.GetName(), hda.GetPort(), hda.GetDevice());
    916915                if (!machine.isOk())
    917916                {
    918                     CStorageController ctl = machine.GetStorageControllerByName(ctlName);
    919917                    vboxProblem().cannotDetachDevice (this, machine, VBoxDefs::MediumType_HardDisk,
    920918                        vboxGlobal().getMedium (CMedium (hda.GetMedium())).location(),
    921                         ctl.GetBus(), hda.GetPort(), hda.GetDevice());
     919                        controller.GetBus(), hda.GetPort(), hda.GetDevice());
    922920                }
    923921            }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette