Changeset 39968 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Feb 2, 2012 7:26:12 PM (13 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r39800 r39968 19 19 #include <VBox/vd.h> 20 20 #include <VBox/version.h> 21 #include < stdio.h>21 #include <iprt/stream.h> 22 22 23 23 #include "VBoxUtils.h" … … 283 283 , mRecompileUser(false) 284 284 , mVerString("1.0") 285 , m3DAvailable( -1)285 , m3DAvailable(false) 286 286 { 287 287 } … … 393 393 } 394 394 395 bool VBoxGlobal::is3DAvailable()396 {397 if (m3DAvailable < 0)398 m3DAvailable = virtualBox().GetHost().GetAcceleration3DAvailable();399 return m3DAvailable;400 }401 402 395 /** 403 396 * Sets the new global settings and saves them to the VirtualBox server. … … 1666 1659 1667 1660 /* VT-x/AMD-V availability: */ 1668 bool fVTxAMDVSupported = virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx);1661 bool fVTxAMDVSupported = host().GetProcessorFeature(KProcessorFeature_HWVirtEx); 1669 1662 1670 1663 if (fVTxAMDVSupported) … … 2413 2406 addNullMediumToList (mMediaList, mMediaList.end()); 2414 2407 addHardDisksToList (mVBox.GetHardDisks(), mMediaList, mMediaList.end()); 2415 addMediumsToList (m VBox.GetHost().GetDVDDrives(), mMediaList, mMediaList.end(), VBoxDefs::MediumType_DVD);2408 addMediumsToList (mHost.GetDVDDrives(), mMediaList, mMediaList.end(), VBoxDefs::MediumType_DVD); 2416 2409 addMediumsToList (mVBox.GetDVDImages(), mMediaList, mMediaList.end(), VBoxDefs::MediumType_DVD); 2417 addMediumsToList (m VBox.GetHost().GetFloppyDrives(), mMediaList, mMediaList.end(), VBoxDefs::MediumType_Floppy);2410 addMediumsToList (mHost.GetFloppyDrives(), mMediaList, mMediaList.end(), VBoxDefs::MediumType_Floppy); 2418 2411 addMediumsToList (mVBox.GetFloppyImages(), mMediaList, mMediaList.end(), VBoxDefs::MediumType_Floppy); 2419 2412 … … 4800 4793 return; 4801 4794 } 4795 mHost = virtualBox().GetHost(); 4796 m3DAvailable = mHost.GetAcceleration3DAvailable(); 4802 4797 4803 4798 /* create default non-null global settings */ … … 5458 5453 mUSBDevicesMap.clear(); 5459 5454 5460 CHost host = vboxGlobal(). virtualBox().GetHost();5455 CHost host = vboxGlobal().host(); 5461 5456 5462 5457 bool isUSBEmpty = host.GetUSBDevices().size() == 0; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r39872 r39968 135 135 136 136 CVirtualBox virtualBox() const { return mVBox; } 137 CHost host() const { return mHost; } 137 138 138 139 VBoxGlobalSettings &settings() { return gset; } … … 150 151 QWidget *mainWindow() const { return mMainWindow; } 151 152 152 bool is3DAvailable() ;153 bool is3DAvailable() const { return m3DAvailable; } 153 154 154 155 #ifdef VBOX_GUI_WITH_PIDFILE … … 806 807 807 808 CVirtualBox mVBox; 809 CHost mHost; 808 810 809 811 VBoxGlobalSettings gset; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r39932 r39968 1077 1077 { 1078 1078 case VBoxDefs::MediumType_DVD: 1079 mediums = vboxGlobal(). virtualBox().GetHost().GetDVDDrives();1079 mediums = vboxGlobal().host().GetDVDDrives(); 1080 1080 strRecentMediumAddress = VBoxDefs::GUI_RecentListCD; 1081 1081 break; 1082 1082 case VBoxDefs::MediumType_Floppy: 1083 mediums = vboxGlobal(). virtualBox().GetHost().GetFloppyDrives();1083 mediums = vboxGlobal().host().GetFloppyDrives(); 1084 1084 strRecentMediumAddress = VBoxDefs::GUI_RecentListFD; 1085 1085 break; … … 1366 1366 1367 1367 /* Get current host: */ 1368 CHost host = vboxGlobal(). virtualBox().GetHost();1368 CHost host = vboxGlobal().host(); 1369 1369 1370 1370 /* Get host USB device list: */ … … 1435 1435 { 1436 1436 /* Get current host: */ 1437 CHost host = vboxGlobal(). virtualBox().GetHost();1437 CHost host = vboxGlobal().host(); 1438 1438 /* Search the host for the corresponding USB device: */ 1439 1439 CHostUSBDevice hostDevice = host.FindUSBDeviceById(target.id); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r39074 r39968 270 270 bool fShouldWeClose; 271 271 272 bool fVTxAMDVSupported = vboxGlobal(). virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx);272 bool fVTxAMDVSupported = vboxGlobal().host().GetProcessorFeature(KProcessorFeature_HWVirtEx); 273 273 274 274 QApplication::processEvents(); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp
r39800 r39968 275 275 /* Variables: */ 276 276 CVirtualBox m_vbox; 277 CHost m_host; 277 278 UIDetails *m_pUIDetails; 278 279 int m_iBlockNumber; … … 625 626 : QWidget(pParent) 626 627 , m_vbox(vboxGlobal().virtualBox()) 628 , m_host(vboxGlobal().host()) 627 629 , m_pUIDetails(pParent) 628 630 , m_iBlockNumber(iBlockNumber) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r39779 r39968 533 533 #ifdef ENABLE_GLOBAL_USB 534 534 /* Get the host object: */ 535 CHost host = vboxGlobal(). virtualBox().GetHost();535 CHost host = vboxGlobal().host(); 536 536 /* Show the host error message if any: */ 537 537 if (!host.isReallyOk()) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp
r38311 r39968 252 252 253 253 /* Load to cache: */ 254 const CHostNetworkInterfaceVector &interfaces = vboxGlobal(). virtualBox().GetHost().GetNetworkInterfaces();254 const CHostNetworkInterfaceVector &interfaces = vboxGlobal().host().GetNetworkInterfaces(); 255 255 for (int iNetworkIndex = 0; iNetworkIndex < interfaces.size(); ++iNetworkIndex) 256 256 { … … 305 305 /* Prepare useful variables: */ 306 306 CVirtualBox vbox = vboxGlobal().virtualBox(); 307 CHost host = vbox .GetHost();307 CHost host = vboxGlobal().host(); 308 308 309 309 /* Update all the host-only interfaces: */ … … 411 411 /* Prepare useful variables: */ 412 412 CVirtualBox vbox = vboxGlobal().virtualBox(); 413 CHost host = vbox .GetHost();413 CHost host = vboxGlobal().host(); 414 414 415 415 /* Create new host-only interface: */ … … 457 457 /* Prepare useful variables: */ 458 458 CVirtualBox vbox = vboxGlobal().virtualBox(); 459 CHost host = vbox .GetHost();459 CHost host = vboxGlobal().host(); 460 460 461 461 /* Find corresponding interface: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r37945 r39968 480 480 void UIMachineSettingsNetwork::sltGenerateMac() 481 481 { 482 m_pMACEditor->setText(vboxGlobal(). virtualBox().GetHost().GenerateMACAddress());482 m_pMACEditor->setText(vboxGlobal().host().GenerateMACAddress()); 483 483 } 484 484 … … 1001 1001 /* Reload bridged interface list: */ 1002 1002 m_bridgedAdapterList.clear(); 1003 const CHostNetworkInterfaceVector &ifaces = vboxGlobal(). virtualBox().GetHost().GetNetworkInterfaces();1003 const CHostNetworkInterfaceVector &ifaces = vboxGlobal().host().GetNetworkInterfaces(); 1004 1004 for (int i = 0; i < ifaces.size(); ++i) 1005 1005 { … … 1034 1034 /* Reload host-only interface list: */ 1035 1035 m_hostInterfaceList.clear(); 1036 const CHostNetworkInterfaceVector &ifaces = vboxGlobal(). virtualBox().GetHost().GetNetworkInterfaces();1036 const CHostNetworkInterfaceVector &ifaces = vboxGlobal().host().GetNetworkInterfaces(); 1037 1037 for (int i = 0; i < ifaces.size(); ++i) 1038 1038 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r37753 r39968 39 39 /* Setup constants */ 40 40 CSystemProperties properties = vboxGlobal().virtualBox().GetSystemProperties(); 41 uint hostCPUs = vboxGlobal(). virtualBox().GetHost().GetProcessorCount();41 uint hostCPUs = vboxGlobal().host().GetProcessorCount(); 42 42 mMinGuestCPU = properties.GetMinGuestCPUCount(); 43 43 mMaxGuestCPU = RT_MIN (2 * hostCPUs, properties.GetMaxGuestCPUCount()); … … 227 227 } 228 228 /* Gather other system data: */ 229 systemData.m_fPFHwVirtExSupported = vboxGlobal(). virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx);230 systemData.m_fPFPAESupported = vboxGlobal(). virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_PAE);229 systemData.m_fPFHwVirtExSupported = vboxGlobal().host().GetProcessorFeature(KProcessorFeature_HWVirtEx); 230 systemData.m_fPFPAESupported = vboxGlobal().host().GetProcessorFeature(KProcessorFeature_PAE); 231 231 systemData.m_fIoApicEnabled = m_machine.GetBIOSSettings().GetIOAPICEnabled(); 232 232 systemData.m_fEFIEnabled = m_machine.GetFirmwareType() >= KFirmwareType_EFI && m_machine.GetFirmwareType() <= KFirmwareType_EFIDUAL; … … 387 387 bool UIMachineSettingsSystem::revalidate (QString &aWarning, QString & /* aTitle */) 388 388 { 389 ulong fullSize = vboxGlobal(). virtualBox().GetHost().GetMemorySize();389 ulong fullSize = vboxGlobal().host().GetMemorySize(); 390 390 if (mSlMemory->value() > (int)mSlMemory->maxRAMAlw()) 391 391 { … … 410 410 411 411 /* VCPU amount test */ 412 int totalCPUs = vboxGlobal(). virtualBox().GetHost().GetProcessorOnlineCount();412 int totalCPUs = vboxGlobal().host().GetProcessorOnlineCount(); 413 413 if (mSlCPU->value() > 2 * totalCPUs) 414 414 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
r38913 r39968 155 155 { 156 156 /* For each USB filter: */ 157 const CHostUSBDeviceFilterVector &filters = vboxGlobal(). virtualBox().GetHost().GetUSBDeviceFilters();157 const CHostUSBDeviceFilterVector &filters = vboxGlobal().host().GetUSBDeviceFilters(); 158 158 for (int iFilterIndex = 0; iFilterIndex < filters.size(); ++iFilterIndex) 159 159 { … … 350 350 { 351 351 /* Get host: */ 352 CHost host = vboxGlobal(). virtualBox().GetHost();352 CHost host = vboxGlobal().host(); 353 353 /* For each USB filter data set: */ 354 354 for (int iFilterIndex = 0; iFilterIndex < m_cache.childCount(); ++iFilterIndex) -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxGuestRAMSlider.cpp
r28800 r39968 64 64 void VBoxGuestRAMSlider::init() 65 65 { 66 ulong fullSize = vboxGlobal(). virtualBox().GetHost().GetMemorySize();66 ulong fullSize = vboxGlobal().host().GetMemorySize(); 67 67 CSystemProperties sys = vboxGlobal().virtualBox().GetSystemProperties(); 68 68 mMinRAM = sys.GetMinGuestRAM(); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/VBoxOSTypeSelectorWidget.cpp
r33781 r39968 54 54 55 55 /* Check if host supports (AMD-V or VT-x) and long mode */ 56 CHost host = vboxGlobal(). virtualBox().GetHost();56 CHost host = vboxGlobal().host(); 57 57 m_fSupportsHWVirtEx = host.GetProcessorFeature(KProcessorFeature_HWVirtEx); 58 58 m_fSupportsLongMode = host.GetProcessorFeature(KProcessorFeature_LongMode);
Note:
See TracChangeset
for help on using the changeset viewer.