Changeset 16867 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 17, 2009 5:00:56 PM (16 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxGlobal.h
r16853 r16867 146 146 } 147 147 148 const CHardDisk 2&hardDisk() const { return mHardDisk; }148 const CHardDisk &hardDisk() const { return mHardDisk; } 149 149 const CDVDImage &dvdImage() const { return mDVDImage; } 150 const CFloppyImage 2&floppyImage() const { return mFloppyImage; }150 const CFloppyImage &floppyImage() const { return mFloppyImage; } 151 151 152 152 QUuid id() const { return mId; } … … 246 246 COMResult mResult; 247 247 248 CHardDisk 2mHardDisk;248 CHardDisk mHardDisk; 249 249 CDVDImage mDVDImage; 250 CFloppyImage 2mFloppyImage;250 CFloppyImage mFloppyImage; 251 251 252 252 QUuid mId; … … 613 613 * normal hard disks that have a parent. 614 614 */ 615 QString hardDiskTypeString (const CHardDisk 2&aHD) const615 QString hardDiskTypeString (const CHardDisk &aHD) const 616 616 { 617 617 if (!aHD.GetParent().isNull()) … … 799 799 /* details generators */ 800 800 801 QString details (const CHardDisk 2&aHD, bool aPredictDiff);801 QString details (const CHardDisk &aHD, bool aPredictDiff); 802 802 803 803 QString details (const CUSBDevice &aDevice) const; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxNewHDWzd.h
r13580 r16867 39 39 VBoxNewHDWzd (QWidget *aParent = 0); 40 40 41 CHardDisk 2hardDisk() { return mHD; }41 CHardDisk hardDisk() { return mHD; } 42 42 void setRecommendedFileName (const QString &aName); 43 43 void setRecommendedSize (quint64 aSize); … … 66 66 67 67 QIWidgetValidator *mWValNameAndSize; 68 CHardDisk 2mHD;68 CHardDisk mHD; 69 69 int mSliderScale; 70 70 quint64 mMaxVDISize; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxNewVMWzd.h
r14437 r16867 67 67 QIWidgetValidator *mWvalMemory; 68 68 QIWidgetValidator *mWvalHDD; 69 CHardDisk 2mHardDisk;69 CHardDisk mHardDisk; 70 70 CMachine mMachine; 71 71 }; -
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r16617 r16867 264 264 int confirmDeleteHardDiskStorage (QWidget *aParent, 265 265 const QString &aLocation); 266 void cannotDeleteHardDiskStorage (QWidget *aParent, const CHardDisk 2&aHD,266 void cannotDeleteHardDiskStorage (QWidget *aParent, const CHardDisk &aHD, 267 267 const CProgress &aProgress); 268 268 … … 272 272 void cannotCreateHardDiskStorage (QWidget *aParent, const CVirtualBox &aVBox, 273 273 const QString &aLocaiton, 274 const CHardDisk 2&aHD,274 const CHardDisk &aHD, 275 275 const CProgress &aProgress); 276 276 void cannotAttachHardDisk (QWidget *aParent, const CMachine &aMachine, -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r16853 r16867 1917 1917 QString data; 1918 1918 bool hasDisks = false; 1919 CHardDisk 2AttachmentVector vec = cmachine.GetHardDisk2Attachments();1920 for (CHardDisk 2AttachmentVector::ConstIterator hda = vec.begin();1919 CHardDiskAttachmentVector vec = cmachine.GetHardDiskAttachments(); 1920 for (CHardDiskAttachmentVector::ConstIterator hda = vec.begin(); 1921 1921 hda != vec.end(); ++ hda) 1922 1922 { 1923 CHardDisk 2hd = hda->GetHardDisk();1923 CHardDisk hd = hda->GetHardDisk(); 1924 1924 data += QString ("<br><nobr><b>%1 %2</b>: %3</nobr>") 1925 1925 .arg (vboxGlobal().toString (hda->GetBus(), hda->GetChannel())) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobal.cpp
r16853 r16867 219 219 * to an item from VBoxGlobal::currentMediaList()) */ 220 220 221 CHardDisk 2parent = mHardDisk.GetParent();221 CHardDisk parent = mHardDisk.GetParent(); 222 222 Assert (!parent.isNull() || mParent == NULL); 223 223 … … 1938 1938 * @todo in VBoxMedium::details()). 1939 1939 */ 1940 QString VBoxGlobal::details (const CHardDisk 2&aHD,1940 QString VBoxGlobal::details (const CHardDisk &aHD, 1941 1941 bool aPredictDiff) 1942 1942 { … … 2161 2161 int rows = 2; /* including section header and footer */ 2162 2162 2163 CHardDisk 2AttachmentVector vec = aMachine.GetHardDisk2Attachments();2163 CHardDiskAttachmentVector vec = aMachine.GetHardDiskAttachments(); 2164 2164 for (size_t i = 0; i < (size_t) vec.size(); ++ i) 2165 2165 { 2166 CHardDisk 2Attachment hda = vec [i];2167 CHardDisk 2hd = hda.GetHardDisk();2166 CHardDiskAttachment hda = vec [i]; 2167 CHardDisk hd = hda.GetHardDisk(); 2168 2168 2169 2169 /// @todo for the explaination of the below isOk() checks, see *** … … 2332 2332 case KDriveState_ImageMounted: 2333 2333 { 2334 CFloppyImage 2img = floppy.GetImage();2334 CFloppyImage img = floppy.GetImage(); 2335 2335 item = QString (sSectionItemTpl2) 2336 2336 .arg (tr ("Image", "details report (floppy)"), … … 2915 2915 */ 2916 2916 static 2917 void AddHardDisksToList (const CHardDisk 2Vector &aVector,2917 void AddHardDisksToList (const CHardDiskVector &aVector, 2918 2918 VBoxMediaList &aList, 2919 2919 VBoxMediaList::iterator aWhere, … … 2923 2923 2924 2924 /* First pass: Add siblings sorted */ 2925 for (CHardDisk 2Vector::ConstIterator it = aVector.begin();2925 for (CHardDiskVector::ConstIterator it = aVector.begin(); 2926 2926 it != aVector.end(); ++ it) 2927 2927 { … … 2945 2945 for (VBoxMediaList::iterator it = first; it != aWhere;) 2946 2946 { 2947 CHardDisk 2Vector children = (*it).hardDisk().GetChildren();2947 CHardDiskVector children = (*it).hardDisk().GetChildren(); 2948 2948 VBoxMedium *parent = &(*it); 2949 2949 … … 2997 2997 mMediaList.clear(); 2998 2998 { 2999 AddHardDisksToList (mVBox.GetHardDisks 2(), mMediaList, mMediaList.end());2999 AddHardDisksToList (mVBox.GetHardDisks(), mMediaList, mMediaList.end()); 3000 3000 } 3001 3001 { … … 3025 3025 VBoxMediaList::iterator first = mMediaList.end(); 3026 3026 3027 CFloppyImage 2Vector vec = mVBox.GetFloppyImages();3028 for (CFloppyImage 2Vector::ConstIterator it = vec.begin();3027 CFloppyImageVector vec = mVBox.GetFloppyImages(); 3028 for (CFloppyImageVector::ConstIterator it = vec.begin(); 3029 3029 it != vec.end(); ++ it) 3030 3030 { -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxMediaManagerDlg.cpp
r16853 r16867 972 972 if (dlg.exec() == QDialog::Accepted) 973 973 { 974 CHardDisk 2hd = dlg.hardDisk();974 CHardDisk hd = dlg.hardDisk(); 975 975 /* Select the newly created hard disk */ 976 976 MediaItem *item = searchItem (mHardDiskView, hd.GetId()); … … 1094 1094 } 1095 1095 1096 CHardDisk 2hardDisk = item->medium().hardDisk();1096 CHardDisk hardDisk = item->medium().hardDisk(); 1097 1097 1098 1098 if (deleteStorage) … … 1134 1134 case VBoxDefs::MediaType_Floppy: 1135 1135 { 1136 CFloppyImage 2image = item->medium().floppyImage();1136 CFloppyImage image = item->medium().floppyImage(); 1137 1137 image.Close(); 1138 1138 result = image; … … 1232 1232 case VBoxDefs::MediaType_HardDisk: 1233 1233 { 1234 CHardDisk 2AttachmentVector vec =machine.GetHardDisk2Attachments();1234 CHardDiskAttachmentVector vec =machine.GetHardDiskAttachments(); 1235 1235 for (int i = 0; i < vec.size(); ++ i) 1236 1236 { 1237 CHardDisk 2Attachment hda = vec [i];1237 CHardDiskAttachment hda = vec [i]; 1238 1238 if (hda.GetHardDisk().GetId() == aMedium.id()) 1239 1239 { 1240 machine.DetachHardDisk 2(hda.GetBus(),1241 1242 1240 machine.DetachHardDisk(hda.GetBus(), 1241 hda.GetChannel(), 1242 hda.GetDevice()); 1243 1243 if (!machine.isOk()) 1244 1244 { … … 1543 1543 case VBoxDefs::MediaType_HardDisk: 1544 1544 { 1545 CHardDisk 2 hd = mVBox.OpenHardDisk2(aLocation);1545 CHardDisk hd = mVBox.OpenHardDisk(aLocation); 1546 1546 if (mVBox.isOk()) 1547 1547 { … … 1565 1565 case VBoxDefs::MediaType_Floppy: 1566 1566 { 1567 CFloppyImage 2image = mVBox.OpenFloppyImage (aLocation, uuid);1567 CFloppyImage image = mVBox.OpenFloppyImage (aLocation, uuid); 1568 1568 if (mVBox.isOk()) 1569 1569 { … … 1591 1591 MediaItem *item = 0; 1592 1592 1593 CHardDisk 2parent = aMedium.hardDisk().GetParent();1593 CHardDisk parent = aMedium.hardDisk().GetParent(); 1594 1594 if (parent.isNull()) 1595 1595 { -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxNewHDWzd.cpp
r14540 r16867 384 384 CProgress progress; 385 385 386 CHardDisk 2 hd = vbox.CreateHardDisk2(QString ("VDI"), loc);386 CHardDisk hd = vbox.CreateHardDisk(QString ("VDI"), loc); 387 387 388 388 if (!vbox.isOk()) -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxNewVMWzd.cpp
r16633 r16867 352 352 { 353 353 CMachine m = session.GetMachine(); 354 m.AttachHardDisk 2(mHDCombo->id(), KStorageBus_IDE, 0, 0);354 m.AttachHardDisk(mHDCombo->id(), KStorageBus_IDE, 0, 0); 355 355 if (m.isOk()) 356 356 { -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
r16656 r16867 1203 1203 1204 1204 void VBoxProblemReporter::cannotDeleteHardDiskStorage (QWidget *aParent, 1205 const CHardDisk 2&aHD,1205 const CHardDisk &aHD, 1206 1206 const CProgress &aProgress) 1207 1207 { 1208 /* below, we use CHardDisk 2(aHD) to preserve current error info1208 /* below, we use CHardDisk (aHD) to preserve current error info 1209 1209 * for formatErrorInfo() */ 1210 1210 1211 1211 message (aParent, Error, 1212 1212 tr ("Failed to delete the storage unit of the hard disk <b>%1</b>.") 1213 .arg (CHardDisk 2(aHD).GetLocation()),1213 .arg (CHardDisk (aHD).GetLocation()), 1214 1214 !aHD.isOk() ? formatErrorInfo (aHD) : 1215 1215 !aProgress.isOk() ? formatErrorInfo (aProgress) : … … 1248 1248 void VBoxProblemReporter::cannotCreateHardDiskStorage ( 1249 1249 QWidget *aParent, const CVirtualBox &aVBox, const QString &aLocation, 1250 const CHardDisk 2&aHD, const CProgress &aProgress)1250 const CHardDisk &aHD, const CProgress &aProgress) 1251 1251 { 1252 1252 message (aParent, Error, -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r16743 r16867 872 872 CMachine machine = session.GetMachine(); 873 873 /* Detach all attached Hard Disks */ 874 CHardDisk 2AttachmentVector vec = machine.GetHardDisk2Attachments();874 CHardDiskAttachmentVector vec = machine.GetHardDiskAttachments(); 875 875 for (int i = 0; i < vec.size(); ++ i) 876 876 { 877 CHardDisk 2Attachment hda = vec [i];878 machine.DetachHardDisk 2(hda.GetBus(), hda.GetChannel(), hda.GetDevice());877 CHardDiskAttachment hda = vec [i]; 878 machine.DetachHardDisk(hda.GetBus(), hda.GetChannel(), hda.GetDevice()); 879 879 if (!machine.isOk()) 880 880 vboxProblem().cannotDetachHardDisk (this, machine, -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMFirstRunWzd.cpp
r13580 r16867 36 36 37 37 /* Hide unnecessary text labels */ 38 CHardDisk 2AttachmentVector vec = mMachine.GetHardDisk2Attachments();38 CHardDiskAttachmentVector vec = mMachine.GetHardDiskAttachments(); 39 39 if (vec.size() != 0) 40 40 { -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMInformationDlg.cpp
r16087 r16867 467 467 468 468 /* IDE Hard Disk (Primary Master) */ 469 if (!m.GetHardDisk 2(KStorageBus_IDE, 0, 0).isNull())469 if (!m.GetHardDisk(KStorageBus_IDE, 0, 0).isNull()) 470 470 { 471 471 hdStat += formatHardDisk (KStorageBus_IDE, 0, 0, "IDE00"); … … 474 474 475 475 /* IDE Hard Disk (Primary Slave) */ 476 if (!m.GetHardDisk 2(KStorageBus_IDE, 0, 1).isNull())476 if (!m.GetHardDisk(KStorageBus_IDE, 0, 1).isNull()) 477 477 { 478 478 hdStat += formatHardDisk (KStorageBus_IDE, 0, 1, "IDE01"); … … 481 481 482 482 /* IDE Hard Disk (Secondary Slave) */ 483 if (!m.GetHardDisk 2(KStorageBus_IDE, 1, 1).isNull())483 if (!m.GetHardDisk(KStorageBus_IDE, 1, 1).isNull()) 484 484 { 485 485 hdStat += formatHardDisk (KStorageBus_IDE, 1, 1, "IDE11"); … … 490 490 for (int i = 0; i < 30; ++ i) 491 491 { 492 if (!m.GetHardDisk 2(KStorageBus_SATA, i, 0).isNull())492 if (!m.GetHardDisk(KStorageBus_SATA, i, 0).isNull()) 493 493 { 494 494 hdStat += formatHardDisk (KStorageBus_SATA, i, 0, … … 574 574 return QString::null; 575 575 576 CHardDisk 2 hd = mSession.GetMachine().GetHardDisk2(aBus, aChannel, aDevice);576 CHardDisk hd = mSession.GetMachine().GetHardDisk(aBus, aChannel, aDevice); 577 577 QString header = "<tr><td></td><td colspan=2><nobr><u>%1</u></nobr></td></tr>"; 578 578 QString name = vboxGlobal().toFullString (aBus, aChannel, aDevice); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsFD.cpp
r14039 r16867 110 110 case KDriveState_ImageMounted: 111 111 { 112 CFloppyImage 2img = floppy.GetImage();112 CFloppyImage img = floppy.GetImage(); 113 113 QString src = img.GetLocation(); 114 114 AssertMsg (!src.isNull(), ("Image file must not be null")); -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxVMSettingsHD.cpp
r13580 r16867 77 77 78 78 VBoxMedium medium = vboxGlobal().getMedium ( 79 CMedium (vboxGlobal().virtualBox().GetHardDisk 2(aId)));79 CMedium (vboxGlobal().virtualBox().GetHardDisk(aId))); 80 80 medium.refresh(); 81 81 bool noDiffs = !HDSettings::instance()->showDiffs(); … … 662 662 663 663 /* Load attachments list */ 664 CHardDisk 2AttachmentVector vec = mMachine.GetHardDisk2Attachments();664 CHardDiskAttachmentVector vec = mMachine.GetHardDiskAttachments(); 665 665 for (int i = 0; i < vec.size(); ++ i) 666 666 { 667 CHardDisk 2Attachment hda = vec [i];667 CHardDiskAttachment hda = vec [i]; 668 668 SlotValue slot (hda.GetBus(), hda.GetChannel(), hda.GetDevice()); 669 669 DiskValue disk (hda.GetHardDisk().GetId()); … … 687 687 688 688 /* Detach all attached Hard Disks */ 689 CHardDisk 2AttachmentVector vec = mMachine.GetHardDisk2Attachments();689 CHardDiskAttachmentVector vec = mMachine.GetHardDiskAttachments(); 690 690 for (int i = 0; i < vec.size(); ++ i) 691 691 { 692 CHardDisk 2Attachment hda = vec [i];693 mMachine.DetachHardDisk 2(hda.GetBus(), hda.GetChannel(), hda.GetDevice());692 CHardDiskAttachment hda = vec [i]; 693 mMachine.DetachHardDisk(hda.GetBus(), hda.GetChannel(), hda.GetDevice()); 694 694 695 695 /* [dsen] check this */ … … 708 708 maxSATAPort = maxSATAPort < (list [i].slot.channel + 1) ? 709 709 (list [i].slot.channel + 1) : maxSATAPort; 710 mMachine.AttachHardDisk 2(list [i].disk.id,710 mMachine.AttachHardDisk(list [i].disk.id, 711 711 list [i].slot.bus, list [i].slot.channel, list [i].slot.device); 712 712 … … 715 715 vboxProblem().cannotAttachHardDisk (this, mMachine, 716 716 vboxGlobal().getMedium (CMedium (vboxGlobal().virtualBox() 717 .GetHardDisk 2(list [i].disk.id))).location(),717 .GetHardDisk(list [i].disk.id))).location(), 718 718 list [i].slot.bus, list [i].slot.channel, list [i].slot.device); 719 719 }
Note:
See TracChangeset
for help on using the changeset viewer.