Changeset 17192 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 27, 2009 9:17:19 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 43482
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r17175 r17192 6 6 7 7 /* 8 * Copyright (C) 2006-200 8Sun Microsystems, Inc.8 * Copyright (C) 2006-2009 Sun Microsystems, Inc. 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 3133 3133 3134 3134 hostDVDMap.clear(); 3135 CHostDVDDrive Enumerator en=3136 vboxGlobal().virtualBox().GetHost().GetDVDDrives() .Enumerate();3137 while (en.HasMore())3138 { 3139 CHostDVDDrive hostDVD = en.GetNext();3135 CHostDVDDriveVector drvvec = 3136 vboxGlobal().virtualBox().GetHost().GetDVDDrives(); 3137 for (int i = 0; i < drvvec.size(); ++i) 3138 { 3139 CHostDVDDrive hostDVD = drvvec[i]; 3140 3140 /** @todo set icon */ 3141 3141 QString drvName = hostDVD.GetName(); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMFirstRunWzd.cpp
r16867 r17192 6 6 7 7 /* 8 * Copyright (C) 2006-200 8Sun Microsystems, Inc.8 * Copyright (C) 2006-2009 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 Collectioncoll =178 CHostDVDDriveVector coll = 179 179 vboxGlobal().virtualBox().GetHost().GetDVDDrives(); 180 mHostDVDs.resize (coll.GetCount()); 181 int id = 0; 182 CHostDVDDriveEnumerator en = coll.Enumerate(); 183 while (en.HasMore()) 184 { 185 CHostDVDDrive hostDVD = en.GetNext(); 180 mHostDVDs.resize (coll.size()); 181 182 for (int id = 0; id < coll.size(); ++id) 183 { 184 CHostDVDDrive hostDVD = coll[id]; 186 185 QString name = hostDVD.GetName(); 187 186 QString description = hostDVD.GetDescription(); … … 190 189 mCbHost->insertItem (id, fullName); 191 190 mHostDVDs [id] = hostDVD; 192 ++ id;193 191 } 194 192 … … 222 220 223 221 /* Repopulate the media list */ 224 222 mCbImage->repopulate(); 225 223 226 224 /* Revalidate updated page */ -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsCD.cpp
r16853 r17192 6 6 7 7 /* 8 * Copyright (C) 2006-200 8Sun Microsystems, Inc.8 * Copyright (C) 2006-2009 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 Collectioncoll =61 CHostDVDDriveVector coll = 62 62 vboxGlobal().virtualBox().GetHost().GetDVDDrives(); 63 mHostCDs.resize (coll. GetCount());63 mHostCDs.resize (coll.size()); 64 64 mCbHostCD->clear(); 65 int id = 0; 66 CHostDVDDriveEnumerator en = coll.Enumerate(); 67 while (en.HasMore()) 68 { 69 CHostDVDDrive hostDVD = en.GetNext(); 65 66 for (int id = 0; id < coll.size(); ++id) 67 { 68 CHostDVDDrive hostDVD = coll[id]; 70 69 /// @todo (r=dmik) set icon? 71 70 QString name = hostDVD.GetName(); … … 75 74 mCbHostCD->insertItem (id, fullName); 76 75 mHostCDs [id] = hostDVD; 77 ++ id;78 76 } 79 77 … … 89 87 name : 90 88 QString ("%1 (%2)").arg (description, name); 91 if ( coll.FindByName (name).isNull())89 if (vboxGlobal().virtualBox().GetHost().FindHostDVDDrive (name).isNull()) 92 90 { 93 91 /* If the DVD drive is not currently available,
Note:
See TracChangeset
for help on using the changeset viewer.