VirtualBox

Changeset 28678 in vbox


Ignore:
Timestamp:
Apr 23, 2010 6:21:55 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: use const references

File:
1 edited

Legend:

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

    r28635 r28678  
    6666        bool bAttachmentsPresent = false;
    6767
    68         CStorageControllerVector controllers = machine.GetStorageControllers();
     68        const CStorageControllerVector &controllers = machine.GetStorageControllers();
    6969        foreach (const CStorageController &controller, controllers)
    7070        {
    7171            QString strAttData;
    72             CMediumAttachmentVector attachments = machine.GetMediumAttachmentsOfController(controller.GetName());
     72            const CMediumAttachmentVector &attachments = machine.GetMediumAttachmentsOfController(controller.GetName());
    7373            foreach (const CMediumAttachment &attachment, attachments)
    7474            {
     
    130130        bool bAttachmentsPresent = false;
    131131
    132         CStorageControllerVector controllers = machine.GetStorageControllers();
     132        const CStorageControllerVector &controllers = machine.GetStorageControllers();
    133133        foreach (const CStorageController &controller, controllers)
    134134        {
    135135            QString strAttData;
    136             CMediumAttachmentVector attachments = machine.GetMediumAttachmentsOfController(controller.GetName());
     136            const CMediumAttachmentVector &attachments = machine.GetMediumAttachmentsOfController(controller.GetName());
    137137            foreach (const CMediumAttachment &attachment, attachments)
    138138            {
     
    195195        bool attachmentsPresent = false;
    196196
    197         CStorageControllerVector controllers = machine.GetStorageControllers();
     197        const CStorageControllerVector &controllers = machine.GetStorageControllers();
    198198        foreach (const CStorageController &controller, controllers)
    199199        {
    200200            QString attData;
    201             CMediumAttachmentVector attachments = machine.GetMediumAttachmentsOfController (controller.GetName());
     201            const CMediumAttachmentVector &attachments = machine.GetMediumAttachmentsOfController (controller.GetName());
    202202            foreach (const CMediumAttachment &attachment, attachments)
    203203            {
     
    257257    void updateAppearance()
    258258    {
    259         CMachine machine = m_session.GetMachine();
     259        const CMachine &machine = m_session.GetMachine();
    260260
    261261        ulong uMaxCount = vboxGlobal().virtualBox().GetSystemProperties().GetNetworkAdapterCount();
     
    272272        for (ulong uSlot = 0, uEnabled = 0; uSlot < uMaxCount; ++ uSlot)
    273273        {
    274             CNetworkAdapter adapter = machine.GetNetworkAdapter(uSlot);
     274            const CNetworkAdapter &adapter = machine.GetNetworkAdapter(uSlot);
    275275            if (adapter.GetEnabled())
    276276            {
     
    346346        QString strFullData;
    347347
    348         CUSBController usbctl = machine.GetUSBController();
     348        const CUSBController &usbctl = machine.GetUSBController();
    349349        setState(!usbctl.isNull() && usbctl.GetEnabled() && usbctl.GetProxyAvailable() ? KDeviceActivity_Idle : KDeviceActivity_Null);
    350350        if (!usbctl.isNull() && usbctl.GetEnabled())
     
    352352            const CConsole &console = m_session.GetConsole();
    353353
    354             CUSBDeviceVector devsvec = console.GetUSBDevices();
     354            const CUSBDeviceVector &devsvec = console.GetUSBDevices();
    355355            for (int i = 0; i < devsvec.size(); ++ i)
    356356            {
     
    408408
    409409        /* Permanent folders */
    410         CSharedFolderVector psfvec = machine.GetSharedFolders();
     410        const CSharedFolderVector &psfvec = machine.GetSharedFolders();
    411411
    412412        for (int i = 0; i < psfvec.size(); ++ i)
    413413        {
    414             CSharedFolder sf = psfvec[i];
     414            const CSharedFolder &sf = psfvec[i];
    415415            sfs.insert(sf.GetName(), sf.GetHostPath());
    416416        }
    417417
    418418        /* Transient folders */
    419         CSharedFolderVector tsfvec = console.GetSharedFolders();
     419        const CSharedFolderVector &tsfvec = console.GetSharedFolders();
    420420
    421421        for (int i = 0; i < tsfvec.size(); ++ i)
    422422        {
    423             CSharedFolder sf = tsfvec[i];
     423            const CSharedFolder &sf = tsfvec[i];
    424424            sfs.insert(sf.GetName(), sf.GetHostPath());
    425425        }
     
    472472    void updateAppearance()
    473473    {
    474         CVRDPServer vrdpsrv = m_session.GetMachine().GetVRDPServer();
     474        const CVRDPServer &vrdpsrv = m_session.GetMachine().GetVRDPServer();
    475475        if (!vrdpsrv.isNull())
    476476        {
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