VirtualBox

Changeset 23759 in vbox for trunk/src


Ignore:
Timestamp:
Oct 14, 2009 12:38:03 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53487
Message:

FE/Qt4: VBox Details report updated according multi-controller support.

File:
1 edited

Legend:

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

    r23750 r23759  
    15651565    static const char *sSectionItemTpl2 =
    15661566        "<tr><td width=40%><nobr>%1:</nobr></td><td/><td>%2</td></tr>";
     1567    static const char *sSectionItemTpl3 =
     1568        "<tr><td width=40%><nobr>%1</nobr></td><td/><td/></tr>";
    15671569
    15681570    const QString &sectionTpl = aWithLinks ? sSectionHrefTpl : sSectionBoldTpl;
     
    17191721        QString item;
    17201722
    1721         CMediumAttachmentVector vec = aMachine.GetMediumAttachments();
    1722         for (int i = 0; i < vec.size(); ++ i)
    1723         {
    1724             CMediumAttachment ma = vec [i];
    1725             CMedium medium = ma.GetMedium();
    1726 
    1727             /// @todo for the explaination of the below isOk() checks, see ***
    1728             /// in VBoxMedium::details().
    1729             if (ma.isOk())
     1723        CStorageControllerVector controllers = aMachine.GetStorageControllers();
     1724        foreach (const CStorageController &controller, controllers)
     1725        {
     1726            item += QString (sSectionItemTpl3).arg (controller.GetName());
     1727            ++ rows;
     1728
     1729            CMediumAttachmentVector attachments = aMachine.GetMediumAttachmentsOfController (controller.GetName());
     1730            foreach (const CMediumAttachment &attachment, attachments)
    17301731            {
    1731                 const QString controller = ma.GetController();
    1732                 KStorageBus bus;
    1733 
    1734                 CStorageController ctrl = aMachine.GetStorageControllerByName (controller);
    1735                 bus = ctrl.GetBus();
    1736 
    1737                 LONG port   = ma.GetPort();
    1738                 LONG device = ma.GetDevice();
    1739                 item += QString (sSectionItemTpl2)
    1740                         .arg (toString (StorageSlot (bus, port, device)))
    1741                         .arg (details (medium, false));
    1742                 ++ rows;
     1732                CMedium medium = attachment.GetMedium();
     1733                if (attachment.isOk())
     1734                {
     1735                    item += QString (sSectionItemTpl2)
     1736                            .arg (QString ("&nbsp;&nbsp;") +
     1737                                  toString (StorageSlot (controller.GetBus(),
     1738                                                         attachment.GetPort(),
     1739                                                         attachment.GetDevice())))
     1740                            .arg (details (medium, false));
     1741                    ++ rows;
     1742                }
    17431743            }
    17441744        }
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