Changeset 17218 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 27, 2009 6:02:48 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 43527
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r17201 r17218 6 6 7 7 /* 8 * Copyright (C) 2006-200 9Sun Microsystems, Inc.8 * Copyright (C) 2006-2008 Sun Microsystems, Inc. 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 3064 3064 3065 3065 hostDVDMap.clear(); 3066 CHostDVDDrive Vector drvvec=3067 vboxGlobal().virtualBox().GetHost().GetDVDDrives() ;3068 for (int i = 0; i < drvvec.size(); ++i)3069 { 3070 CHostDVDDrive hostDVD = drvvec[i];3066 CHostDVDDriveEnumerator en = 3067 vboxGlobal().virtualBox().GetHost().GetDVDDrives().Enumerate(); 3068 while (en.HasMore()) 3069 { 3070 CHostDVDDrive hostDVD = en.GetNext(); 3071 3071 /** @todo set icon */ 3072 3072 QString drvName = hostDVD.GetName(); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMFirstRunWzd.cpp
r17200 r17218 6 6 7 7 /* 8 * Copyright (C) 2006-200 9Sun Microsystems, Inc.8 * Copyright (C) 2006-2008 Sun Microsystems, Inc. 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 176 176 { 177 177 /* Search for the host dvd-drives */ 178 CHostDVDDrive Vectorcoll =178 CHostDVDDriveCollection coll = 179 179 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(); 185 186 QString name = hostDVD.GetName(); 186 187 QString description = hostDVD.GetDescription(); … … 189 190 mCbHost->insertItem (id, fullName); 190 191 mHostDVDs [id] = hostDVD; 192 ++ id; 191 193 } 192 194 … … 220 222 221 223 /* Repopulate the media list */ 222 mCbImage->repopulate();224 mCbImage->repopulate(); 223 225 224 226 /* Revalidate updated page */ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsCD.cpp
r17200 r17218 6 6 7 7 /* 8 * Copyright (C) 2006-200 9Sun Microsystems, Inc.8 * Copyright (C) 2006-2008 Sun Microsystems, Inc. 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 59 59 60 60 /* Read out the host DVD drive list and prepare the combobox */ 61 CHostDVDDrive Vectorcoll =61 CHostDVDDriveCollection coll = 62 62 vboxGlobal().virtualBox().GetHost().GetDVDDrives(); 63 mHostCDs.resize (coll. size());63 mHostCDs.resize (coll.GetCount()); 64 64 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(); 69 70 /// @todo (r=dmik) set icon? 70 71 QString name = hostDVD.GetName(); … … 74 75 mCbHostCD->insertItem (id, fullName); 75 76 mHostCDs [id] = hostDVD; 77 ++ id; 76 78 } 77 79 … … 87 89 name : 88 90 QString ("%1 (%2)").arg (description, name); 89 if ( vboxGlobal().virtualBox().GetHost().FindHostDVDDrive (name).isNull())91 if (coll.FindByName (name).isNull()) 90 92 { 91 93 /* If the DVD drive is not currently available,
Note:
See TracChangeset
for help on using the changeset viewer.