VirtualBox

Ignore:
Timestamp:
Feb 27, 2009 10:00:17 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
43484
Message:

Revert r43482 which used a linux specific way to iterate over DVD drives.

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

Legend:

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

    r17192 r17193  
    66
    77/*
    8  * Copyright (C) 2006-2009 Sun Microsystems, Inc.
     8 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    31333133
    31343134    hostDVDMap.clear();
    3135     CHostDVDDriveVector drvvec =
    3136         vboxGlobal().virtualBox().GetHost().GetDVDDrives();
    3137     for (int i = 0; i < drvvec.size(); ++i)
    3138     {
    3139         CHostDVDDrive hostDVD = drvvec[i];
     3135    CHostDVDDriveEnumerator en =
     3136        vboxGlobal().virtualBox().GetHost().GetDVDDrives().Enumerate();
     3137    while (en.HasMore())
     3138    {
     3139        CHostDVDDrive hostDVD = en.GetNext();
    31403140        /** @todo set icon */
    31413141        QString drvName = hostDVD.GetName();
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMFirstRunWzd.cpp

    r17192 r17193  
    66
    77/*
    8  * Copyright (C) 2006-2009 Sun Microsystems, Inc.
     8 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    176176    {
    177177        /* Search for the host dvd-drives */
    178         CHostDVDDriveVector coll =
     178        CHostDVDDriveCollection coll =
    179179            vboxGlobal().virtualBox().GetHost().GetDVDDrives();
    180         mHostDVDs.resize (coll.size());
    181 
    182         for (int id = 0; id < coll.size(); ++id)
    183         {
    184             CHostDVDDrive hostDVD = coll[id];
     180        mHostDVDs.resize (coll.GetCount());
     181        int id = 0;
     182        CHostDVDDriveEnumerator en = coll.Enumerate();
     183        while (en.HasMore())
     184        {
     185            CHostDVDDrive hostDVD = en.GetNext();
    185186            QString name = hostDVD.GetName();
    186187            QString description = hostDVD.GetDescription();
     
    189190            mCbHost->insertItem (id, fullName);
    190191            mHostDVDs [id] = hostDVD;
     192            ++ id;
    191193        }
    192194
     
    220222
    221223    /* Repopulate the media list */
    222     mCbImage->repopulate();
     224        mCbImage->repopulate();
    223225
    224226    /* Revalidate updated page */
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsCD.cpp

    r17192 r17193  
    66
    77/*
    8  * Copyright (C) 2006-2009 Sun Microsystems, Inc.
     8 * Copyright (C) 2006-2008 Sun Microsystems, Inc.
    99 *
    1010 * This file is part of VirtualBox Open Source Edition (OSE), as
     
    5959
    6060    /* Read out the host DVD drive list and prepare the combobox */
    61     CHostDVDDriveVector coll =
     61    CHostDVDDriveCollection coll =
    6262        vboxGlobal().virtualBox().GetHost().GetDVDDrives();
    63     mHostCDs.resize (coll.size());
     63    mHostCDs.resize (coll.GetCount());
    6464    mCbHostCD->clear();
    65 
    66     for (int id = 0; id < coll.size(); ++id)
    67     {
    68         CHostDVDDrive hostDVD = coll[id];
     65    int id = 0;
     66    CHostDVDDriveEnumerator en = coll.Enumerate();
     67    while (en.HasMore())
     68    {
     69        CHostDVDDrive hostDVD = en.GetNext();
    6970        /// @todo (r=dmik) set icon?
    7071        QString name = hostDVD.GetName();
     
    7475        mCbHostCD->insertItem (id, fullName);
    7576        mHostCDs [id] = hostDVD;
     77        ++ id;
    7678    }
    7779
     
    8789                name :
    8890                QString ("%1 (%2)").arg (description, name);
    89             if (vboxGlobal().virtualBox().GetHost().FindHostDVDDrive (name).isNull())
     91            if (coll.FindByName (name).isNull())
    9092            {
    9193                /* If the DVD drive is not currently available,
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