VirtualBox

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


Ignore:
Timestamp:
Nov 9, 2009 3:27:28 PM (15 years ago)
Author:
vboxsync
Message:

Main/MediumAttchment: back out API change which changed the return type of the Controller attribute from string to IStorageController *

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

Legend:

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

    r24501 r24511  
    21712171    Assert (mediumType != VBoxDefs::MediumType_Invalid);
    21722172
    2173     const CMediumAttachmentVector &attachments = mSession.GetMachine().GetMediumAttachments();
     2173    CMachine machine = mSession.GetMachine();
     2174    const CMediumAttachmentVector &attachments = machine.GetMediumAttachments();
    21742175    foreach (const CMediumAttachment &attachment, attachments)
    21752176    {
    2176         CStorageController controller = attachment.GetController();
     2177        CStorageController controller = machine.GetStorageControllerByName (attachment.GetController());
    21772178        if (   !controller.isNull()
    21782179            && (attachment.GetType() == deviceType))
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp

    r24493 r24511  
    11791179                if (attachment.GetMedium().GetId() == aMedium.id())
    11801180                {
    1181                     CStorageController controller = attachment.GetController();
    1182                     machine.DetachDevice (controller.GetName(), attachment.GetPort(), attachment.GetDevice());
     1181                    machine.DetachDevice (attachment.GetController(), attachment.GetPort(), attachment.GetDevice());
    11831182                    if (!machine.isOk())
    11841183                    {
     1184                        CStorageController controller = machine.GetStorageControllerByName (attachment.GetController());
    11851185                        vboxProblem().cannotDetachDevice (this, machine, VBoxDefs::MediumType_HardDisk, aMedium.location(),
    11861186                                                          controller.GetBus(), attachment.GetPort(), attachment.GetDevice());
     
    12021202                if (medium.id() == aMedium.id())
    12031203                {
    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 */);
    12051205                    if (!machine.isOk())
    12061206                    {
     1207                        CStorageController controller = machine.GetStorageControllerByName (attachment.GetController());
    12071208                        vboxProblem().cannotUnmountMedium (this, machine, aMedium);
    12081209                        success = false;
     
    12231224                if (medium.id() == aMedium.id())
    12241225                {
    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 */);
    12261227                    if (!machine.isOk())
    12271228                    {
     1229                        CStorageController controller = machine.GetStorageControllerByName (attachment.GetController());
    12281230                        vboxProblem().cannotUnmountMedium (this, machine, aMedium);
    12291231                        success = false;
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp

    r24301 r24511  
    911911            {
    912912                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());
    915916                if (!machine.isOk())
    916917                {
     918                    CStorageController ctl = machine.GetStorageControllerByName(ctlName);
    917919                    vboxProblem().cannotDetachDevice (this, machine, VBoxDefs::MediumType_HardDisk,
    918920                        vboxGlobal().getMedium (CMedium (hda.GetMedium())).location(),
    919                         controller.GetBus(), hda.GetPort(), hda.GetDevice());
     921                        ctl.GetBus(), hda.GetPort(), hda.GetDevice());
    920922                }
    921923            }
Note: See TracChangeset for help on using the changeset viewer.

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