Changeset 103771 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Mar 11, 2024 3:16:04 PM (9 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 106 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityOverviewWidget.cpp
r103711 r103771 50 50 #include "UIExtraDataDefs.h" 51 51 #include "UIExtraDataManager.h" 52 #include "UIGlobalSession.h" 52 53 #include "UIIconPool.h" 53 54 #include "UIMessageCenter.h" … … 1513 1514 void UIActivityOverviewModel::initializeItems() 1514 1515 { 1515 foreach (const CMachine &comMachine, uiCommon().virtualBox().GetMachines())1516 foreach (const CMachine &comMachine, gpGlobalSession->virtualBox().GetMachines()) 1516 1517 { 1517 1518 if (!comMachine.isNull()) … … 1540 1541 if (fRegistered) 1541 1542 { 1542 CMachine comMachine = uiCommon().virtualBox().FindMachine(uId.toString());1543 CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(uId.toString()); 1543 1544 if (!comMachine.isNull()) 1544 1545 addItem(uId, comMachine.GetName(), comMachine.GetState()); … … 1551 1552 void UIActivityOverviewModel::getHostRAMStats() 1552 1553 { 1553 CHost comHost = uiCommon().host();1554 CHost comHost = gpGlobalSession->host(); 1554 1555 m_hostStats.m_iRAMTotal = _1M * (quint64)comHost.GetMemorySize(); 1555 1556 m_hostStats.m_iRAMFree = _1M * (quint64)comHost.GetMemoryAvailable(); … … 1591 1592 const int iMetricSetupCount = 1; 1592 1593 if (m_performanceCollector.isNull()) 1593 m_performanceCollector = uiCommon().virtualBox().GetPerformanceCollector();1594 m_performanceCollector = gpGlobalSession->virtualBox().GetPerformanceCollector(); 1594 1595 for (int i = 0; i < m_itemList.size(); ++i) 1595 1596 m_nameList << "Guest/RAM/Usage*"; -
trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityToolWidget.cpp
r102264 r103771 32 32 /* GUI includes: */ 33 33 #include "UIActionPoolManager.h" 34 #include "UI Common.h"34 #include "UIGlobalSession.h" 35 35 #include "UIVMActivityMonitor.h" 36 36 #include "UIVMActivityToolWidget.h" … … 228 228 if (pActivityMonitor) 229 229 { 230 CMachine comMachine = uiCommon().virtualBox().FindMachine(pActivityMonitor->machineId().toString());230 CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(pActivityMonitor->machineId().toString()); 231 231 if (!comMachine.isNull()) 232 232 { -
trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.cpp
r103711 r103771 43 43 #include "UICommon.h" 44 44 #include "UIConverter.h" 45 #include "UIGlobalSession.h" 45 46 #include "UIIconPool.h" 46 47 #include "UITranslator.h" … … 1467 1468 void UIVMActivityMonitorLocal::prepareMetrics() 1468 1469 { 1469 m_performanceCollector = uiCommon().virtualBox().GetPerformanceCollector();1470 m_performanceCollector = gpGlobalSession->virtualBox().GetPerformanceCollector(); 1470 1471 if (m_performanceCollector.isNull()) 1471 1472 return; … … 2000 2001 if (RT_SUCCESS(rc)) 2001 2002 return QString(szPath); 2002 return uiCommon().virtualBox().GetHomeFolder();2003 return gpGlobalSession->virtualBox().GetHomeFolder(); 2003 2004 } 2004 2005 -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r103362 r103771 32 32 33 33 /* GUI includes: */ 34 #include "UICommon.h"35 34 #include "UIConverter.h" 35 #include "UIDefs.h" 36 36 #include "UIExtraDataDefs.h" 37 #include "UIGlobalSession.h" 37 38 #include "UIIconPool.h" 39 #include "UIMediumDefs.h" 38 40 #include "UISettingsDefs.h" 39 41 #include "UITranslator.h" … … 149 151 case KStorageBus_IDE: 150 152 { 151 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);152 int iMaxDevice = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxDevicesPerPortForStorageBus(storageSlot.bus);153 int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 154 int iMaxDevice = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxDevicesPerPortForStorageBus(storageSlot.bus); 153 155 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 154 156 { … … 173 175 case KStorageBus_SATA: 174 176 { 175 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);177 int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 176 178 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 177 179 { … … 189 191 case KStorageBus_SCSI: 190 192 { 191 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);193 int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 192 194 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 193 195 { … … 205 207 case KStorageBus_SAS: 206 208 { 207 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);209 int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 208 210 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 209 211 { … … 221 223 case KStorageBus_Floppy: 222 224 { 223 int iMaxDevice = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxDevicesPerPortForStorageBus(storageSlot.bus);225 int iMaxDevice = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxDevicesPerPortForStorageBus(storageSlot.bus); 224 226 if (storageSlot.port != 0) 225 227 { … … 237 239 case KStorageBus_USB: 238 240 { 239 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);241 int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 240 242 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 241 243 { … … 253 255 case KStorageBus_PCIe: 254 256 { 255 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);257 int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 256 258 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 257 259 { … … 269 271 case KStorageBus_VirtioSCSI: 270 272 { 271 int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);273 int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus); 272 274 if (storageSlot.port < 0 || storageSlot.port > iMaxPort) 273 275 { … … 354 356 if (result.bus == KStorageBus_Null) 355 357 break; 356 const int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(result.bus);357 const int iMaxDevice = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxDevicesPerPortForStorageBus(result.bus);358 const int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(result.bus); 359 const int iMaxDevice = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxDevicesPerPortForStorageBus(result.bus); 358 360 const LONG iPort = iIndex / iMaxPort; 359 361 const LONG iDevice = iIndex % iMaxPort; … … 382 384 if (result.bus == KStorageBus_Null) 383 385 break; 384 const int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(result.bus);386 const int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(result.bus); 385 387 const LONG iPort = mt.captured(1).toInt(); 386 388 const LONG iDevice = 0; -
trunk/src/VBox/Frontends/VirtualBox/src/extensionpackmanager/UIExtensionPackManager.cpp
r103578 r103771 42 42 #include "UIExtensionPackManager.h" 43 43 #include "UIExtraDataManager.h" 44 #include "UIGlobalSession.h" 44 45 #include "UIIconPool.h" 45 46 #include "UIMessageCenter.h" … … 250 251 { 251 252 /* Get VirtualBox for further activities: */ 252 const CVirtualBox comVBox = uiCommon().virtualBox();253 const CVirtualBox comVBox = gpGlobalSession->virtualBox(); 253 254 /* Get Extension Pack Manager for further activities: */ 254 255 CExtPackManager comEPManager = comVBox.GetExtensionPackManager(); … … 345 346 346 347 /* [Re]insert it into the tree: */ 347 CExtPackManager comManager = uiCommon().virtualBox().GetExtensionPackManager();348 CExtPackManager comManager = gpGlobalSession->virtualBox().GetExtensionPackManager(); 348 349 const CExtPack comExtensionPack = comManager.Find(strName); 349 350 if (comExtensionPack.isOk()) … … 499 500 500 501 /* Get VirtualBox for further activities: */ 501 const CVirtualBox comVBox = uiCommon().virtualBox();502 const CVirtualBox comVBox = gpGlobalSession->virtualBox(); 502 503 /* Get Extension Pack Manager for further activities: */ 503 504 const CExtPackManager comEPManager = comVBox.GetExtensionPackManager(); -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r103551 r103771 57 57 #include "UIDesktopWidgetWatchdog.h" 58 58 #include "UIExtraDataManager.h" 59 #include "UIGlobalSession.h" 59 60 #include "UIHostComboEditor.h" 60 61 #include "UILoggingDefs.h" … … 176 177 177 178 /* Get VirtualBox: */ 178 const CVirtualBox comVBox = uiCommon().virtualBox();179 const CVirtualBox comVBox = gpGlobalSession->virtualBox(); 179 180 /* Get VirtualBox event source: */ 180 181 CEventSource comEventSourceVBox = comVBox.GetEventSource(); … … 217 218 218 219 /* Make sure VBoxSVC is available: */ 219 if (! uiCommon().isVBoxSVCAvailable())220 if (!gpGlobalSession->isVBoxSVCAvailable()) 220 221 return; 221 222 222 223 /* Get VirtualBox: */ 223 const CVirtualBox comVBox = uiCommon().virtualBox();224 const CVirtualBox comVBox = gpGlobalSession->virtualBox(); 224 225 /* Get VirtualBox event source: */ 225 226 CEventSource comEventSourceVBox = comVBox.GetEventSource(); … … 762 763 763 764 /* Get machine items: */ 764 const CMachineVector machines = uiCommon().virtualBox().GetMachines();765 const CMachineVector machines = gpGlobalSession->virtualBox().GetMachines(); 765 766 /* Look for the proper place to insert new machine item: */ 766 767 QUuid uPositionID = UIExtraDataManager::GlobalID; … … 1183 1184 1184 1185 /* Compose initial file-name: */ 1185 const QString strInitialFileName = QDir( uiCommon().homeFolder()).absoluteFilePath(QString("%1_ExtraData.xml").arg(currentChooserName()));1186 const QString strInitialFileName = QDir(gpGlobalSession->homeFolder()).absoluteFilePath(QString("%1_ExtraData.xml").arg(currentChooserName())); 1186 1187 /* Open file-save dialog to choose file to save extra-data into: */ 1187 1188 const QString strFileName = QIFileDialog::getSaveFileName(strInitialFileName, "XML files (*.xml)", this, … … 1270 1271 1271 1272 /* Compose initial file-name: */ 1272 const QString strInitialFileName = QDir( uiCommon().homeFolder()).absoluteFilePath(QString("%1_ExtraData.xml").arg(currentChooserName()));1273 const QString strInitialFileName = QDir(gpGlobalSession->homeFolder()).absoluteFilePath(QString("%1_ExtraData.xml").arg(currentChooserName())); 1273 1274 /* Open file-open dialog to choose file to open extra-data into: */ 1274 1275 const QString strFileName = QIFileDialog::getOpenFileName(strInitialFileName, "XML files (*.xml)", this, … … 1594 1595 addChooserItemByID(UIExtraDataManager::GlobalID); 1595 1596 /* Add machine chooser items into source-model: */ 1596 CMachineVector machines = uiCommon().virtualBox().GetMachines();1597 CMachineVector machines = gpGlobalSession->virtualBox().GetMachines(); 1597 1598 foreach (const CMachine &machine, machines) 1598 1599 addChooserItemByMachine(machine); … … 1825 1826 1826 1827 /* Search for the corresponding machine by ID: */ 1827 CVirtualBox vbox = uiCommon().virtualBox();1828 CVirtualBox vbox = gpGlobalSession->virtualBox(); 1828 1829 const CMachine machine = vbox.FindMachine(uID.toString()); 1829 1830 /* Make sure VM is accessible: */ … … 2063 2064 2064 2065 /* Search for corresponding machine: */ 2065 CVirtualBox vbox = uiCommon().virtualBox();2066 CVirtualBox vbox = gpGlobalSession->virtualBox(); 2066 2067 CMachine machine = vbox.FindMachine(uID.toString()); 2067 2068 if (machine.isNull()) … … 2108 2109 { 2109 2110 /* Make sure VBoxSVC is available: */ 2110 if (! uiCommon().isVBoxSVCAvailable())2111 if (!gpGlobalSession->isVBoxSVCAvailable()) 2111 2112 return; 2112 2113 … … 2125 2126 { 2126 2127 /* Get global object: */ 2127 CVirtualBox comVBox = uiCommon().virtualBox();2128 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2128 2129 /* Update global extra-data: */ 2129 2130 comVBox.SetExtraData(strKey, strValue); … … 2145 2146 { 2146 2147 /* Search for corresponding machine: */ 2147 CVirtualBox comVBox = uiCommon().virtualBox();2148 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2148 2149 const CMachine comMachine = comVBox.FindMachine(uID.toString()); 2149 2150 AssertReturnVoid(comVBox.isOk() && !comMachine.isNull()); … … 2209 2210 { 2210 2211 /* Make sure VBoxSVC is available: */ 2211 if (! uiCommon().isVBoxSVCAvailable())2212 if (!gpGlobalSession->isVBoxSVCAvailable()) 2212 2213 return; 2213 2214 … … 2226 2227 { 2227 2228 /* Get global object: */ 2228 CVirtualBox comVBox = uiCommon().virtualBox();2229 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2229 2230 /* Update global extra-data: */ 2230 2231 comVBox.SetExtraDataStringList(strKey, value); … … 2246 2247 { 2247 2248 /* Search for corresponding machine: */ 2248 CVirtualBox comVBox = uiCommon().virtualBox();2249 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2249 2250 const CMachine comMachine = comVBox.FindMachine(uID.toString()); 2250 2251 AssertReturnVoid(comVBox.isOk() && !comMachine.isNull()); … … 4961 4962 { 4962 4963 /* Get CVirtualBox: */ 4963 CVirtualBox vbox = uiCommon().virtualBox();4964 CVirtualBox vbox = gpGlobalSession->virtualBox(); 4964 4965 4965 4966 /* Make sure at least empty map is created: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp
r103552 r103771 35 35 #include "UIDesktopWidgetWatchdog.h" 36 36 #include "UIExtraDataManager.h" 37 #include "UIGlobalSession.h" 37 38 #include "UIIconPool.h" 38 39 #include "UIShortcutPool.h" … … 3502 3503 3503 3504 /* Recache extension-pack related action restrictions: */ 3504 CExtPackManager extPackManager = uiCommon().virtualBox().GetExtensionPackManager();3505 CExtPackManager extPackManager = gpGlobalSession->virtualBox().GetExtensionPackManager(); 3505 3506 if (extPackManager.isNull() || !extPackManager.IsExtPackUsable(GUI_ExtPackName)) 3506 3507 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.cpp
r100861 r103771 28 28 /* GUI includes: */ 29 29 #include "UICloudNetworkingStuff.h" 30 #include "UICommon.h"31 30 #include "UIErrorString.h" 31 #include "UIGlobalSession.h" 32 32 #include "UIMessageCenter.h" 33 33 … … 45 45 { 46 46 /* Acquire VBox: */ 47 const CVirtualBox comVBox = uiCommon().virtualBox();47 const CVirtualBox comVBox = gpGlobalSession->virtualBox(); 48 48 if (comVBox.isNotNull()) 49 49 { … … 62 62 { 63 63 /* Acquire VBox: */ 64 const CVirtualBox comVBox = uiCommon().virtualBox();64 const CVirtualBox comVBox = gpGlobalSession->virtualBox(); 65 65 if (comVBox.isNotNull()) 66 66 { … … 203 203 { 204 204 /* Acquire VBox: */ 205 CVirtualBox comVBox = uiCommon().virtualBox();205 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 206 206 if (comVBox.isNotNull()) 207 207 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r103765 r103771 1202 1202 { 1203 1203 /* So that we could run existing VMs: */ 1204 CVirtualBox comVBox = virtualBox();1204 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 1205 1205 CMachine comMachine = comVBox.FindMachine(strFile); 1206 1206 if (!comMachine.isNull()) … … 1296 1296 1297 1297 #endif /* VBOX_GUI_WITH_PIDFILE */ 1298 1299 bool UICommon::comTokenTryLockForRead()1300 {1301 return gpGlobalSession->comTokenTryLockForRead();1302 }1303 1304 void UICommon::comTokenUnlock()1305 {1306 return gpGlobalSession->comTokenUnlock();1307 }1308 1309 CVirtualBoxClient UICommon::virtualBoxClient() const1310 {1311 return gpGlobalSession->virtualBoxClient();1312 }1313 1314 CVirtualBox UICommon::virtualBox() const1315 {1316 return gpGlobalSession->virtualBox();1317 }1318 1319 CHost UICommon::host() const1320 {1321 return gpGlobalSession->host();1322 }1323 1324 QString UICommon::homeFolder() const1325 {1326 return gpGlobalSession->homeFolder();1327 }1328 1329 bool UICommon::isVBoxSVCAvailable() const1330 {1331 return gpGlobalSession->isVBoxSVCAvailable();1332 }1333 1298 1334 1299 /* static */ … … 1603 1568 } 1604 1569 1605 const UIGuestOSTypeManager &UICommon::guestOSTypeManager() const1606 {1607 return gpGlobalSession->guestOSTypeManager();1608 }1609 1610 1570 void UICommon::enumerateMedia(const CMediumVector &comMedia /* = CMediumVector() */) 1611 1571 { … … 1714 1674 1715 1675 /* Initialize variables: */ 1716 CVirtualBox comVBox = virtualBox();1676 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 1717 1677 1718 1678 /* Open corresponding medium: */ … … 1762 1722 case UIMediumDeviceType_HardDisk: 1763 1723 { 1764 filters = HDDBackends( virtualBox());1724 filters = HDDBackends(gpGlobalSession->virtualBox()); 1765 1725 strTitle = tr("Please choose a virtual hard disk file"); 1766 1726 allType = tr("All virtual hard disk files (%1)"); … … 1769 1729 case UIMediumDeviceType_DVD: 1770 1730 { 1771 filters = DVDBackends( virtualBox());1731 filters = DVDBackends(gpGlobalSession->virtualBox()); 1772 1732 strTitle = tr("Please choose a virtual optical disk file"); 1773 1733 allType = tr("All virtual optical disk files (%1)"); … … 1776 1736 case UIMediumDeviceType_Floppy: 1777 1737 { 1778 filters = FloppyBackends( virtualBox());1738 filters = FloppyBackends(gpGlobalSession->virtualBox()); 1779 1739 strTitle = tr("Please choose a virtual floppy disk file"); 1780 1740 allType = tr("All virtual floppy disk files (%1)"); … … 1785 1745 } 1786 1746 QString strHomeFolder = fUseLastFolder && !strLastFolder.isEmpty() ? strLastFolder : 1787 strDefaultFolder.isEmpty() ? homeFolder() : strDefaultFolder;1747 strDefaultFolder.isEmpty() ? gpGlobalSession->homeFolder() : strDefaultFolder; 1788 1748 1789 1749 /* Prepare filters and backends: */ … … 1890 1850 switch (enmMediumType) 1891 1851 { 1892 case UIMediumDeviceType_DVD: comMedia = host().GetDVDDrives(); break;1893 case UIMediumDeviceType_Floppy: comMedia = host().GetFloppyDrives(); break;1852 case UIMediumDeviceType_DVD: comMedia = gpGlobalSession->host().GetDVDDrives(); break; 1853 case UIMediumDeviceType_Floppy: comMedia = gpGlobalSession->host().GetFloppyDrives(); break; 1894 1854 default: break; 1895 1855 } … … 2296 2256 2297 2257 if (strLastFolder.isEmpty()) 2298 return virtualBox().GetSystemProperties().GetDefaultMachineFolder();2258 return gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder(); 2299 2259 2300 2260 return strLastFolder; … … 2523 2483 { 2524 2484 int iSupportedFlag = 0; 2525 CSystemProperties comProperties = virtualBox().GetSystemProperties();2485 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 2526 2486 foreach (const KRecordingFeature &enmFeature, comProperties.GetSupportedRecordingFeatures()) 2527 2487 iSupportedFlag |= enmFeature; … … 2722 2682 KGraphicsControllerType UICommon::getRecommendedGraphicsController(const QString &strGuestOSTypeId) const 2723 2683 { 2724 return g uestOSTypeManager().getRecommendedGraphicsController(strGuestOSTypeId);2684 return gpGlobalSession->guestOSTypeManager().getRecommendedGraphicsController(strGuestOSTypeId); 2725 2685 } 2726 2686 … … 2742 2702 bool UICommon::isExtentionPackInstalled() const 2743 2703 { 2744 const CExtPackManager comEPManager = virtualBox().GetExtensionPackManager(); 2745 2746 if (!virtualBox().isOk()) 2704 const CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2705 const CExtPackManager comEPManager = comVBox.GetExtensionPackManager(); 2706 2707 if (!comVBox.isOk()) 2747 2708 return false; 2748 2709 … … 2881 2842 { 2882 2843 /* Register created machine. */ 2883 CVirtualBox comVBox = virtualBox();2844 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2884 2845 comVBox.RegisterMachine(comMachine); 2885 2846 if (!comVBox.isOk()) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h
r103765 r103771 45 45 46 46 /* COM includes: */ 47 #include "CHost.h"48 47 #include "CMedium.h" 49 48 #include "CSession.h" 50 #include "CVirtualBox.h"51 #include "CVirtualBoxClient.h"52 49 53 50 /* Forward declarations: */ … … 60 57 class CUSBDevice; 61 58 class UIActionPool; 62 class UIGuestOSTypeManager;63 59 class UIMedium; 64 60 class UIMediumEnumerator; … … 78 74 /** Asks #UIStarter listener to close UI. */ 79 75 void sigAskToCloseUI(); 80 81 /** Notifies listeners about the VBoxSVC availability change. */82 void sigVBoxSVCAvailabilityChange();83 76 84 77 /** Asks listeners to commit data. */ … … 313 306 /** @} */ 314 307 315 /** @name COM stuff.316 * @{ */317 /** Try to acquire COM cleanup protection token for reading. */318 bool comTokenTryLockForRead();319 /** Unlock previously acquired COM cleanup protection token. */320 void comTokenUnlock();321 322 /** Returns the copy of VirtualBox client wrapper. */323 CVirtualBoxClient virtualBoxClient() const;324 /** Returns the copy of VirtualBox object wrapper. */325 CVirtualBox virtualBox() const;326 /** Returns the copy of VirtualBox host-object wrapper. */327 CHost host() const;328 /** Returns the symbolic VirtualBox home-folder representation. */329 QString homeFolder() const;330 331 /** Returns the VBoxSVC availability value. */332 bool isVBoxSVCAvailable() const;333 /** @} */334 335 308 /** @name COM: Virtual Machine stuff. 336 309 * @{ */ … … 368 341 const QString &strProfileName, 369 342 const CCloudMachine &comMachine); 370 /** @} */371 372 /** @name COM: Guest OS type stuff.373 * @{ */374 const UIGuestOSTypeManager &guestOSTypeManager() const;375 343 /** @} */ 376 344 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp
r103481 r103771 37 37 #include "UIDetailsGenerator.h" 38 38 #include "UIErrorString.h" 39 #include "UIGlobalSession.h" 39 40 #include "UIGuestOSType.h" 40 41 #include "UIMedium.h" … … 124 125 .arg(strAnchorType, 125 126 strOsTypeId, 126 uiCommon().guestOSTypeManager().getDescription(strOsTypeId)));127 gpGlobalSession->guestOSTypeManager().getDescription(strOsTypeId))); 127 128 } 128 129 … … 392 393 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 393 394 QStringList acceleration; 394 if ( uiCommon().virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx))395 if (gpGlobalSession->virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx)) 395 396 { 396 397 /* Nested Paging: */ … … 735 736 const KPlatformArchitecture enmArch = comPlatform.GetArchitecture(); 736 737 const KChipsetType enmChipsetType = comPlatform.GetChipsetType(); 737 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);738 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 738 739 const ulong cMaxNetworkAdapters = comProperties.GetMaxNetworkAdapters(enmChipsetType); 739 740 for (ulong uSlot = 0; uSlot < cMaxNetworkAdapters; ++uSlot) … … 903 904 CPlatform comPlatform = comMachine.GetPlatform(); 904 905 const KPlatformArchitecture enmArch = comPlatform.GetArchitecture(); 905 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);906 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 906 907 const ulong cMaxSerialPorts = comProperties.GetSerialPortCount(); 907 908 for (ulong uSlot = 0; uSlot < cMaxSerialPorts; ++uSlot) … … 1318 1319 const KPlatformArchitecture enmArch = comPlatform.GetArchitecture(); 1319 1320 const KChipsetType enmChipsetType = comPlatform.GetChipsetType(); 1320 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);1321 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 1321 1322 const ulong cMaxNetworkAdapters = comProperties.GetMaxNetworkAdapters(enmChipsetType); 1322 1323 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIExtension.cpp
r99841 r103771 29 29 #include "UICommon.h" 30 30 #include "UIExtension.h" 31 #include "UIGlobalSession.h" 31 32 #include "UINotificationCenter.h" 32 33 #include "UIMessageCenter.h" … … 43 44 { 44 45 /* If the extension pack manager isn't available, skip any attempts to install: */ 45 CExtPackManager comExtPackManager = uiCommon().virtualBox().GetExtensionPackManager();46 CExtPackManager comExtPackManager = gpGlobalSession->virtualBox().GetExtensionPackManager(); 46 47 if (comExtPackManager.isNull()) 47 48 return; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.cpp
r103703 r103771 28 28 /* GUI includes: */ 29 29 #include "UICommon.h" 30 #include "UIGlobalSession.h" 30 31 #include "UIGuestOSType.h" 31 32 … … 39 40 { 40 41 /* Acquire CVirtualBox: */ 41 CVirtualBox comVBox = uiCommon().virtualBox();42 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 42 43 43 44 /* Acquire a total list of guest OS types, supported or not: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp
r102102 r103771 35 35 36 36 /* GUI includes: */ 37 #include "UICommon.h"38 37 #include "UIIconPool.h" 39 38 #include "UIExtraDataManager.h" 39 #include "UIGlobalSession.h" 40 40 #include "UIGuestOSType.h" 41 41 #include "UIModalWindowManager.h" … … 785 785 QString UIIconPoolGeneral::determineOSArchString(const QString &strOSTypeId) 786 786 { 787 bool fIs64Bit = uiCommon().guestOSTypeManager().is64Bit(strOSTypeId);788 KPlatformArchitecture enmPlatformArchitecture = uiCommon().guestOSTypeManager().getPlatformArchitecture(strOSTypeId);787 bool fIs64Bit = gpGlobalSession->guestOSTypeManager().is64Bit(strOSTypeId); 788 KPlatformArchitecture enmPlatformArchitecture = gpGlobalSession->guestOSTypeManager().getPlatformArchitecture(strOSTypeId); 789 789 790 790 if (enmPlatformArchitecture == KPlatformArchitecture_ARM) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
r103538 r103771 31 31 32 32 /* GUI includes: */ 33 #include "UI Common.h"33 #include "UIGlobalSession.h" 34 34 #include "UILoggingDefs.h" 35 35 #include "UIMainEventListener.h" … … 276 276 { 277 277 /* Try to acquire COM cleanup protection token first: */ 278 if (! uiCommon().comTokenTryLockForRead())278 if (!gpGlobalSession->comTokenTryLockForRead()) 279 279 return S_OK; 280 280 … … 645 645 646 646 /* Unlock COM cleanup protection token: */ 647 uiCommon().comTokenUnlock();647 gpGlobalSession->comTokenUnlock(); 648 648 649 649 return S_OK; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r103551 r103771 44 44 #include "UIErrorString.h" 45 45 #include "UIExtraDataManager.h" 46 #include "UIGlobalSession.h" 46 47 #include "UIHelpBrowserDialog.h" 47 48 #include "UIHostComboEditor.h" … … 1259 1260 /* Prepare the usage: */ 1260 1261 QStringList usage; 1261 CVirtualBox vbox = uiCommon().virtualBox();1262 CVirtualBox vbox = gpGlobalSession->virtualBox(); 1262 1263 foreach (const QUuid &uMachineID, medium.curStateMachineIds()) 1263 1264 { … … 2092 2093 void UIMessageCenter::sltShowHelpAboutDialog() 2093 2094 { 2094 CVirtualBox vbox = uiCommon().virtualBox();2095 CVirtualBox vbox = gpGlobalSession->virtualBox(); 2095 2096 const QString strFullVersion = uiCommon().brandingIsActive() 2096 2097 ? QString("%1 r%2 - %3").arg(vbox.GetVersion()) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIProgressEventHandler.cpp
r103537 r103771 28 28 /* GUI includes: */ 29 29 #include "UIExtraDataManager.h" 30 #include "UIGlobalSession.h" 30 31 #include "UIMainEventListener.h" 31 32 #include "UIProgressEventHandler.h" 32 #include "UICommon.h"33 33 #ifdef VBOX_WS_MAC 34 34 # include "VBoxUtils-darwin.h" … … 108 108 109 109 /* Make sure VBoxSVC is available: */ 110 if (! uiCommon().isVBoxSVCAvailable())110 if (!gpGlobalSession->isVBoxSVCAvailable()) 111 111 return; 112 112 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.cpp
r103579 r103771 27 27 28 28 /* GUI includes: */ 29 #include "UICommon.h"30 29 #include "UIActionPool.h" 31 30 #include "UIExtraDataManager.h" 31 #include "UIGlobalSession.h" 32 32 #include "UIShortcutPool.h" 33 33 … … 446 446 } 447 447 /* Save overrides into the extra-data: */ 448 uiCommon().virtualBox().SetExtraDataStringList(strPoolExtraDataID, overrides);448 gpGlobalSession->virtualBox().SetExtraDataStringList(strPoolExtraDataID, overrides); 449 449 } 450 450 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIStarter.cpp
r98926 r103771 32 32 #include "UICommon.h" 33 33 #include "UIExtraDataManager.h" 34 #include "UIGlobalSession.h" 34 35 #include "UIMessageCenter.h" 35 36 #include "UINotificationCenter.h" … … 84 85 # ifndef DEBUG 85 86 /* Show BETA warning if necessary: */ 86 const QString vboxVersion( uiCommon().virtualBox().GetVersion());87 const QString vboxVersion(gpGlobalSession->virtualBox().GetVersion()); 87 88 if ( vboxVersion.contains("BETA") 88 89 && gEDataManager->preventBetaBuildWarningForVersion() != vboxVersion) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxClientEventHandler.cpp
r103537 r103771 27 27 28 28 /* GUI includes: */ 29 #include "UICommon.h"30 29 #include "UIExtraDataManager.h" 30 #include "UIGlobalSession.h" 31 31 #include "UIMainEventListener.h" 32 32 #include "UIVirtualBoxClientEventHandler.h" … … 118 118 119 119 /* Get VirtualBoxClient: */ 120 const CVirtualBoxClient comVBoxClient = uiCommon().virtualBoxClient();120 const CVirtualBoxClient comVBoxClient = gpGlobalSession->virtualBoxClient(); 121 121 /* Get VirtualBoxClient event source: */ 122 122 m_comEventSource = comVBoxClient.GetEventSource(); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.cpp
r103537 r103771 27 27 28 28 /* GUI includes: */ 29 #include "UICommon.h"30 29 #include "UIExtraDataManager.h" 30 #include "UIGlobalSession.h" 31 31 #include "UIMainEventListener.h" 32 32 #include "UIVirtualBoxEventHandler.h" … … 167 167 168 168 /* Get VirtualBox: */ 169 const CVirtualBox comVBox = uiCommon().virtualBox();169 const CVirtualBox comVBox = gpGlobalSession->virtualBox(); 170 170 /* Get VirtualBox event source: */ 171 171 m_comEventSource = comVBox.GetEventSource(); -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp
r101020 r103771 40 40 #include "UIErrorString.h" 41 41 #include "UIExtraDataManager.h" 42 #include "UIGlobalSession.h" 42 43 #include "UIIconPool.h" 43 44 #include "UIFileManager.h" … … 851 852 foreach (const QUuid &id, machineIdsToAdd) 852 853 { 853 CMachine comMachine = uiCommon().virtualBox().FindMachine(id.toString());854 CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(id.toString()); 854 855 if (comMachine.isNull()) 855 856 continue; -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.cpp
r103578 r103771 31 31 32 32 /* GUI includes: */ 33 #include "UICommon.h"34 33 #include "UIDesktopWidgetWatchdog.h" 35 34 #include "UIExtraDataManager.h" 35 #include "UIGlobalSession.h" 36 36 #include "UIIconPool.h" 37 37 #include "UIFileManager.h" … … 126 126 { 127 127 CMachine comMachine; 128 CVirtualBox vbox = uiCommon().virtualBox();128 CVirtualBox vbox = gpGlobalSession->virtualBox(); 129 129 if (!vbox.isNull() && !m_uMachineId.isNull()) 130 130 comMachine = vbox.FindMachine(m_uMachineId.toString()); -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp
r103711 r103771 38 38 #include "UIConverter.h" 39 39 #include "UICommon.h" 40 #include "UIErrorString.h" 40 41 #include "UIFileSystemModel.h" 41 #include "UIErrorString.h"42 42 #include "UIFileManager.h" 43 43 #include "UIFileManagerHostTable.h" 44 44 #include "UIFileManagerGuestTable.h" 45 45 #include "UIFileTableNavigationWidget.h" 46 #include "UIGlobalSession.h" 46 47 #include "UIIconPool.h" 47 48 #include "UIMessageCenter.h" … … 1376 1377 QtListener.setNull(); 1377 1378 /* Make sure VBoxSVC is available: */ 1378 if (! uiCommon().isVBoxSVCAvailable())1379 if (!gpGlobalSession->isVBoxSVCAvailable()) 1379 1380 return; 1380 1381 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlTreeItem.cpp
r98875 r103771 29 29 #include "UIConverter.h" 30 30 #include "UIExtraDataManager.h" 31 #include "UIGlobalSession.h" 31 32 #include "UIGuestControlTreeItem.h" 32 33 #include "UIGuestProcessControlWidget.h" 33 #include "UICommon.h"34 34 35 35 /* COM includes: */ … … 91 91 92 92 /* Make sure VBoxSVC is available: */ 93 if (! uiCommon().isVBoxSVCAvailable())93 if (!gpGlobalSession->isVBoxSVCAvailable()) 94 94 return; 95 95 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlWidget.cpp
r103537 r103771 35 35 #include "QIDialogButtonBox.h" 36 36 #include "QIToolBar.h" 37 #include "UI Common.h"37 #include "UIGlobalSession.h" 38 38 #include "UIGuestControlConsole.h" 39 39 #include "UIGuestControlTreeItem.h" … … 547 547 548 548 /* Make sure VBoxSVC is available: */ 549 if (! uiCommon().isVBoxSVCAvailable())549 if (!gpGlobalSession->isVBoxSVCAvailable()) 550 550 return; 551 551 -
trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.cpp
r103549 r103771 38 38 #include "UIDesktopWidgetWatchdog.h" 39 39 #include "UIExtraDataManager.h" 40 #include "UIGlobalSession.h" 40 41 #include "UIIconPool.h" 41 42 #include "UIHelpBrowserDialog.h" … … 189 190 QString strUserManualFileName1 = uiCommon().helpFile(); 190 191 QString strShortFileName = QFileInfo(strUserManualFileName1).fileName(); 191 QString strUserManualFileName2 = QDir( uiCommon().homeFolder()).absoluteFilePath(strShortFileName);192 QString strUserManualFileName2 = QDir(gpGlobalSession->homeFolder()).absoluteFilePath(strShortFileName); 192 193 /* Show if user manual already present: */ 193 194 if (QFile::exists(strUserManualFileName1)) -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r103551 r103771 54 54 #include "UICommon.h" 55 55 #include "UIExtraDataManager.h" 56 #include "UIGlobalSession.h" 56 57 #include "UIIconPool.h" 57 58 #include "UIMessageCenter.h" … … 368 369 return; 369 370 370 CMachine comMachine = uiCommon().virtualBox().FindMachine(pCurrentPage->machineId().toString());371 CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(pCurrentPage->machineId().toString()); 371 372 if (comMachine.isNull()) 372 373 return; … … 985 986 m_pTabWidget->blockSignals(true); 986 987 987 const CSystemProperties &sys = uiCommon().virtualBox().GetSystemProperties();988 const CSystemProperties &sys = gpGlobalSession->virtualBox().GetSystemProperties(); 988 989 unsigned cMaxLogs = sys.GetLogHistoryCount() + 1 /*VBox.log*/ + 1 /*VBoxHardening.log*/; /** @todo Add api for getting total possible log count! */ 989 990 foreach (const QUuid &machineId, machineList) 990 991 { 991 CMachine comMachine = uiCommon().virtualBox().FindMachine(machineId.toString());992 CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(machineId.toString()); 992 993 if (comMachine.isNull()) 993 994 continue; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.cpp
r103550 r103771 39 39 #include "UIErrorPane.h" 40 40 #include "UIFileManager.h" 41 #include "UIGlobalSession.h" 41 42 #include "UIIconPool.h" 42 43 #include "UISnapshotPane.h" … … 231 232 if (!m_items.isEmpty()) 232 233 m_pPaneFileManager = new UIFileManager(EmbedTo_Stack, m_pActionPool, 233 uiCommon().virtualBox().FindMachine(m_items[0]->id().toString()),234 gpGlobalSession->virtualBox().FindMachine(m_items[0]->id().toString()), 234 235 0, false /* fShowToolbar */); 235 236 else -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp
r103552 r103771 62 62 #include "UIExtensionPackManager.h" 63 63 #include "UIExtraDataManager.h" 64 #include "UIGlobalSession.h" 64 65 #include "UIHelpBrowserDialog.h" 65 66 #include "UIIconPool.h" … … 254 255 void UIAcquirePublicKeyDialog::sltHandleOpenButtonClick() 255 256 { 256 CVirtualBox comVBox = uiCommon().virtualBox();257 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 257 258 const QString strFileName = QIFileDialog::getOpenFileName(comVBox.GetHomeFolder(), QString(), 258 259 this, tr("Choose a public key file")); … … 829 830 { 830 831 /* Handle VBox config file: */ 831 CVirtualBox comVBox = uiCommon().virtualBox();832 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 832 833 CMachine comMachine = comVBox.FindMachine(strFile); 833 834 if (comVBox.isOk() && comMachine.isNotNull()) … … 867 868 void UIVirtualBoxManager::sltCheckUSBAccesibility() 868 869 { 869 CHost comHost = uiCommon().host();870 CHost comHost = gpGlobalSession->host(); 870 871 if (!comHost.isOk()) 871 872 return; … … 1261 1262 const QString strFolder = uiCommon().defaultFolderPathForType(UIMediumDeviceType_HardDisk); 1262 1263 const QString strDiskName = uiCommon().findUniqueFileName(strFolder, "NewVirtualDisk"); 1263 const CGuestOSType comGuestOSType = uiCommon().virtualBox().GetGuestOSType("Other");1264 const CGuestOSType comGuestOSType = gpGlobalSession->virtualBox().GetGuestOSType("Other"); 1264 1265 const qulonglong uDiskSize = comGuestOSType.GetRecommendedHDD(); 1265 1266 m_wizards[enmType] = new UIWizardNewVD(this, … … 1495 1496 1496 1497 /* Open a file dialog for the user to select a destination folder. Start with the default machine folder: */ 1497 const QString strBaseFolder = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();1498 const QString strBaseFolder = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder(); 1498 1499 const QString strTitle = tr("Select a destination folder to move the selected virtual machine"); 1499 1500 const QString strDestinationFolder = QIFileDialog::getExistingDirectory(strBaseFolder, this, strTitle); … … 1752 1753 { 1753 1754 /* Otherwise upload command to external file which can be opened with Open command: */ 1754 QDir uiHomeFolder( uiCommon().virtualBox().GetHomeFolder());1755 QDir uiHomeFolder(gpGlobalSession->virtualBox().GetHomeFolder()); 1755 1756 const QString strAbsoluteCommandName = uiHomeFolder.absoluteFilePath("last.command"); 1756 1757 QFile file(strAbsoluteCommandName); … … 2841 2842 QString strTmpFile = strFileName; 2842 2843 #endif 2843 CVirtualBox comVBox = uiCommon().virtualBox();2844 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2844 2845 2845 2846 /* No file specified: */ … … 2968 2969 bool fStartHeadless, const QString &strMachineId) 2969 2970 { 2970 CVirtualBox comVBox = uiCommon().virtualBox();2971 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2971 2972 CMachine comMachine = comVBox.FindMachine(strMachineId); 2972 2973 if (comMachine.isNull()) -
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r103549 r103771 41 41 #include "UIChooser.h" 42 42 #include "UICommon.h" 43 #include "UIGlobalSession.h" 43 44 #include "UILoggingDefs.h" 44 45 #include "UIMessageCenter.h" … … 365 366 // In certain intermediate states VM info can be NULL which 366 367 // causing annoying assertions, such updates can be ignored? 367 CVirtualBox comVBox = uiCommon().virtualBox();368 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 368 369 CMachine comMachine = comVBox.FindMachine(uId.toString()); 369 370 if (comVBox.isOk() && comMachine.isNotNull()) -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp
r103538 r103771 40 40 #include "UICloudNetworkingStuff.h" 41 41 #include "UIExtraDataManager.h" 42 #include "UIGlobalSession.h" 42 43 #include "UILoggingDefs.h" 43 44 #include "UIMessageCenter.h" … … 767 768 { 768 769 /* Add new machine-item: */ 769 const CMachine comMachine = uiCommon().virtualBox().FindMachine(uMachineId.toString());770 const CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(uMachineId.toString()); 770 771 if (comMachine.isNotNull()) 771 772 addLocalMachineIntoTheTree(comMachine, true /* make it visible */); … … 787 788 788 789 /* Search for existing registered machine: */ 789 const CMachine comMachine = uiCommon().virtualBox().FindMachine(uMachineId.toString());790 const CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(uMachineId.toString()); 790 791 if (comMachine.isNull()) 791 792 return; … … 838 839 { 839 840 /* Add new machine-item: */ 840 const CMachine comMachine = uiCommon().virtualBox().FindMachine(uMachineId.toString());841 const CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(uMachineId.toString()); 841 842 addLocalMachineIntoTheTree(comMachine, true /* make it visible */); 842 843 } … … 1145 1146 1146 1147 /* Acquire VBox: */ 1147 const CVirtualBox comVBox = uiCommon().virtualBox();1148 const CVirtualBox comVBox = gpGlobalSession->virtualBox(); 1148 1149 1149 1150 /* Acquire existing local machines: */ -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp
r103708 r103771 38 38 #include "UIFDCreationDialog.h" 39 39 #include "UIFilePathSelector.h" 40 #include "UIGlobalSession.h" 40 41 #include "UIIconPool.h" 41 42 #include "UIMedium.h" … … 109 110 110 111 /* Get VBox for further activities: */ 111 CVirtualBox comVBox = uiCommon().virtualBox();112 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 112 113 113 114 /* Create medium: */ … … 291 292 /* Make sure it's not empty if possible: */ 292 293 if (strDefaultFilePath.isEmpty()) 293 strDefaultFilePath = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();294 strDefaultFilePath = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder(); 294 295 if (strDefaultFilePath.isEmpty()) 295 296 return strDefaultFilePath; … … 315 316 QVector<CMediumFormat> UIFDCreationDialog::getFormatsForDeviceType(KDeviceType enmDeviceType) 316 317 { 317 CSystemProperties comSystemProperties = uiCommon().virtualBox().GetSystemProperties();318 CSystemProperties comSystemProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 318 319 QVector<CMediumFormat> mediumFormats = comSystemProperties.GetMediumFormats(); 319 320 QVector<CMediumFormat> formatList; -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp
r103705 r103771 35 35 #include "UIErrorString.h" 36 36 #include "UIExtraDataManager.h" 37 #include "UIGlobalSession.h" 37 38 #include "UIIconPool.h" 38 39 #include "UIMedium.h" … … 328 329 { 329 330 /* Get CVirtualBox object: */ 330 CVirtualBox vbox = uiCommon().virtualBox();331 CVirtualBox vbox = gpGlobalSession->virtualBox(); 331 332 332 333 /* By default we assuming that this medium is attached -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.cpp
r103338 r103771 27 27 28 28 /* GUI includes: */ 29 #include "UIGlobalSession.h" 29 30 #include "UIMediumDefs.h" 30 #include "UICommon.h"31 31 32 32 /* COM includes: */ … … 116 116 QString UIMediumDefs::getPreferredExtensionForMedium(KDeviceType enmDeviceType) 117 117 { 118 CSystemProperties comSystemProperties = uiCommon().virtualBox().GetSystemProperties();118 CSystemProperties comSystemProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 119 119 QVector<CMediumFormat> mediumFormats = comSystemProperties.GetMediumFormats(); 120 120 for (int i = 0; i < mediumFormats.size(); ++i) -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp
r103538 r103771 32 32 #include "UICommon.h" 33 33 #include "UIErrorString.h" 34 #include "UIGlobalSession.h" 34 35 #include "UILoggingDefs.h" 35 36 #include "UIMediumEnumerator.h" … … 188 189 { 189 190 /* Compose new map of all known media & their children: */ 190 addMediaToMap( uiCommon().virtualBox().GetHardDisks(), guiMedia);191 addMediaToMap( uiCommon().host().GetDVDDrives(), guiMedia);192 addMediaToMap( uiCommon().virtualBox().GetDVDImages(), guiMedia);193 addMediaToMap( uiCommon().host().GetFloppyDrives(), guiMedia);194 addMediaToMap( uiCommon().virtualBox().GetFloppyImages(), guiMedia);191 addMediaToMap(gpGlobalSession->virtualBox().GetHardDisks(), guiMedia); 192 addMediaToMap(gpGlobalSession->host().GetDVDDrives(), guiMedia); 193 addMediaToMap(gpGlobalSession->virtualBox().GetDVDImages(), guiMedia); 194 addMediaToMap(gpGlobalSession->host().GetFloppyDrives(), guiMedia); 195 addMediaToMap(gpGlobalSession->virtualBox().GetFloppyImages(), guiMedia); 195 196 } 196 197 else … … 344 345 { 345 346 /* Get VBox for temporary usage, it will cache the error info: */ 346 CVirtualBox comVBox = uiCommon().virtualBox();347 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 347 348 /* Open existing medium, this API can be used to open known medium as well, using ID as location for that: */ 348 349 CMedium comMedium = comVBox.OpenMedium(uMediumId.toString(), enmMediumType, KAccessMode_ReadWrite, false); -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumItem.cpp
r101330 r103771 35 35 #include "UICommon.h" 36 36 #include "UIExtraDataManager.h" 37 #include "UIGlobalSession.h" 37 38 #include "UIIconPool.h" 38 39 #include "UIMediumItem.h" … … 153 154 foreach (const QUuid &uMachineId, medium().curStateMachineIds()) 154 155 { 155 CMachine comMachine = uiCommon().virtualBox().FindMachine(uMachineId.toString());156 CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(uMachineId.toString()); 156 157 if (comMachine.isNull()) 157 158 continue; … … 177 178 foreach (const QUuid &uMachineId, medium().curStateMachineIds()) 178 179 { 179 const CMachine &comMachine = uiCommon().virtualBox().FindMachine(uMachineId.toString());180 const CMachine &comMachine = gpGlobalSession->virtualBox().FindMachine(uMachineId.toString()); 180 181 if (comMachine.isNull()) 181 182 continue; -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r103578 r103771 44 44 #include "UICommon.h" 45 45 #include "UIExtraDataManager.h" 46 #include "UIGlobalSession.h" 46 47 #include "UIIconPool.h" 47 48 #include "UILoggingDefs.h" … … 456 457 void UIMediumManagerWidget::sltAddMedium() 457 458 { 458 QString strDefaultMachineFolder = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();459 QString strDefaultMachineFolder = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder(); 459 460 uiCommon().openMediumWithFileOpenDialog(currentMediumType(), this, 460 461 strDefaultMachineFolder, true /* use most recent medium folder */); -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderExtensionPack.cpp
r98103 r103771 36 36 #include "UICommon.h" 37 37 #include "UIDownloaderExtensionPack.h" 38 #include "UIGlobalSession.h" 38 39 #include "UIMessageCenter.h" 39 40 #include "UIModalWindowManager.h" … … 57 58 const QString strSource = strSourcePath + strSourceName; 58 59 const QString strPathSHA256SumsFile = QString("https://www.virtualbox.org/download/hashes/%1/SHA256SUMS").arg(strVersion); 59 const QString strTarget = QDir( uiCommon().homeFolder()).absoluteFilePath(strSourceName);60 const QString strTarget = QDir(gpGlobalSession->homeFolder()).absoluteFilePath(strSourceName); 60 61 61 62 /* Set source/target: */ -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderGuestAdditions.cpp
r98103 r103771 36 36 #include "UICommon.h" 37 37 #include "UIDownloaderGuestAdditions.h" 38 #include "UIGlobalSession.h" 38 39 #include "UIMessageCenter.h" 39 40 #include "UIModalWindowManager.h" … … 56 57 const QString strSource = strSourcePath + strSourceName; 57 58 const QString strPathSHA256SumsFile = QString("https://www.virtualbox.org/download/hashes/%1/SHA256SUMS").arg(strVersion); 58 const QString strTarget = QDir( uiCommon().homeFolder()).absoluteFilePath(QString("%1.tmp").arg(strSourceName));59 const QString strTarget = QDir(gpGlobalSession->homeFolder()).absoluteFilePath(QString("%1.tmp").arg(strSourceName)); 59 60 60 61 /* Set source/target: */ -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderUserManual.cpp
r98103 r103771 35 35 #include "UICommon.h" 36 36 #include "UIDownloaderUserManual.h" 37 #include "UIGlobalSession.h" 37 38 #include "UIMessageCenter.h" 38 39 #include "UIModalWindowManager.h" … … 58 59 59 60 /* Set target: */ 60 QString strUserManualDestination = QDir( uiCommon().homeFolder()).absoluteFilePath(strUserManualShortFileName);61 QString strUserManualDestination = QDir(gpGlobalSession->homeFolder()).absoluteFilePath(strUserManualShortFileName); 61 62 setTarget(strUserManualDestination); 62 63 } -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UINetworkReply.cpp
r103538 r103771 39 39 #include "UIExtraDataManager.h" 40 40 #ifndef VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS 41 # include "UI Common.h"41 # include "UIGlobalSession.h" 42 42 # include "VBoxUtils.h" 43 43 # include "CSystemProperties.h" … … 340 340 /* If the specific proxy settings are enabled, we'll use them 341 341 * unless user disabled that functionality manually. */ 342 const CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();342 const CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 343 343 const KProxyMode enmProxyMode = comProperties.GetProxyMode(); 344 344 AssertReturn(comProperties.isOk(), VERR_INTERNAL_ERROR_3); … … 611 611 { 612 612 #ifndef VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS 613 const QDir homeDir(QDir::toNativeSeparators( uiCommon().homeFolder()));613 const QDir homeDir(QDir::toNativeSeparators(gpGlobalSession->homeFolder())); 614 614 return QDir::toNativeSeparators(homeDir.absoluteFilePath(s_strCertificateFileName)); 615 615 #else /* VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS */ -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UINewVersionChecker.cpp
r98103 r103771 33 33 #include "UICommon.h" 34 34 #include "UIExtraDataManager.h" 35 #include "UIGlobalSession.h" 35 36 #include "UINetworkReply.h" 36 37 #include "UINewVersionChecker.h" … … 58 59 /* Compose query: */ 59 60 QUrlQuery url; 60 url.addQueryItem("platform", uiCommon().virtualBox().GetPackageType());61 url.addQueryItem("platform", gpGlobalSession->virtualBox().GetPackageType()); 61 62 /* Check if branding is active: */ 62 63 if (uiCommon().brandingIsActive()) … … 64 65 /* Branding: Check whether we have a local branding file which tells us our version suffix "FOO" 65 66 (e.g. 3.06.54321_FOO) to identify this installation: */ 66 url.addQueryItem("version", QString("%1_%2_%3").arg( uiCommon().virtualBox().GetVersion())67 .arg( uiCommon().virtualBox().GetRevision())67 url.addQueryItem("version", QString("%1_%2_%3").arg(gpGlobalSession->virtualBox().GetVersion()) 68 .arg(gpGlobalSession->virtualBox().GetRevision()) 68 69 .arg(uiCommon().brandingGetKey("VerSuffix"))); 69 70 } … … 71 72 { 72 73 /* Use hard coded version set by VBOX_VERSION_STRING: */ 73 url.addQueryItem("version", QString("%1_%2").arg( uiCommon().virtualBox().GetVersion())74 .arg( uiCommon().virtualBox().GetRevision()));74 url.addQueryItem("version", QString("%1_%2").arg(gpGlobalSession->virtualBox().GetVersion()) 75 .arg(gpGlobalSession->virtualBox().GetRevision())); 75 76 } 76 77 url.addQueryItem("count", QString::number(gEDataManager->applicationUpdateCheckCounter())); 77 78 url.addQueryItem("branch", VBoxUpdateData(gEDataManager->applicationUpdateData()).updateChannelName()); 78 const QString strUserAgent(QString("VirtualBox %1 <%2>").arg( uiCommon().virtualBox().GetVersion()).arg(platformInfo()));79 const QString strUserAgent(QString("VirtualBox %1 <%2>").arg(gpGlobalSession->virtualBox().GetVersion()).arg(platformInfo())); 79 80 80 81 /* Send GET request: */ -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateManager.cpp
r103551 r103771 35 35 #include "UIExtension.h" 36 36 #include "UIExtraDataManager.h" 37 #include "UIGlobalSession.h" 37 38 #include "UIMessageCenter.h" 38 39 #include "UIModalWindowManager.h" … … 140 141 141 142 /* Get extension pack manager: */ 142 CExtPackManager extPackManager = uiCommon().virtualBox().GetExtensionPackManager();143 CExtPackManager extPackManager = gpGlobalSession->virtualBox().GetExtensionPackManager(); 143 144 /* Return if extension pack manager is NOT available: */ 144 145 if (extPackManager.isNull()) … … 232 233 QFile::remove(QDir::toNativeSeparators(strTarget)); 233 234 /* Get the list of old extension pack files in VirtualBox homefolder: */ 234 const QStringList oldExtPackFiles = QDir( uiCommon().homeFolder()).entryList(QStringList("*.vbox-extpack"),235 const QStringList oldExtPackFiles = QDir(gpGlobalSession->homeFolder()).entryList(QStringList("*.vbox-extpack"), 235 236 QDir::Files); 236 237 /* Propose to delete old extension pack files if there are any: */ … … 242 243 { 243 244 /* Delete the old extension pack file: */ 244 QFile::remove(QDir::toNativeSeparators(QDir( uiCommon().homeFolder()).filePath(strExtPackFile)));245 QFile::remove(QDir::toNativeSeparators(QDir(gpGlobalSession->homeFolder()).filePath(strExtPackFile))); 245 246 } 246 247 } … … 328 329 /* Load/decode curent update data: */ 329 330 VBoxUpdateData currentData; 330 CHost comHost = uiCommon().host();331 CHost comHost = gpGlobalSession->host(); 331 332 currentData.load(comHost); 332 333 … … 352 353 /* Load/decode curent update data: */ 353 354 VBoxUpdateData currentData; 354 CHost comHost = uiCommon().host();355 CHost comHost = gpGlobalSession->host(); 355 356 currentData.load(comHost); 356 357 /* Encode/save new update data: */ -
trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UINetworkManager.cpp
r103711 r103771 45 45 #include "UIDetailsWidgetNATNetwork.h" 46 46 #include "UIExtraDataManager.h" 47 #include "UIGlobalSession.h" 47 48 #include "UIIconPool.h" 48 49 #include "UIMessageCenter.h" … … 547 548 548 549 /* Get VirtualBox for further activities: */ 549 CVirtualBox comVBox = uiCommon().virtualBox();550 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 550 551 551 552 /* Create network: */ … … 578 579 579 580 /* Get host for further activities: */ 580 CHost comHost = uiCommon().host();581 CHost comHost = gpGlobalSession->host(); 581 582 CHostNetworkInterface comInterface; 582 583 … … 602 603 { 603 604 /* Get VBox for further activities: */ 604 CVirtualBox comVBox = uiCommon().virtualBox();605 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 605 606 606 607 /* Find corresponding DHCP server (create if necessary): */ … … 647 648 648 649 /* Get VirtualBox for further activities: */ 649 CVirtualBox comVBox = uiCommon().virtualBox();650 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 650 651 651 652 /* Find corresponding network: */ … … 691 692 692 693 /* Get host for further activities: */ 693 CHost comHost = uiCommon().host();694 CHost comHost = gpGlobalSession->host(); 694 695 695 696 /* Find corresponding interface: */ … … 716 717 { 717 718 /* Get VBox for further activities: */ 718 CVirtualBox comVBox = uiCommon().virtualBox();719 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 719 720 720 721 /* Find corresponding DHCP server: */ … … 810 811 811 812 /* Get VirtualBox for further activities: */ 812 CVirtualBox comVBox = uiCommon().virtualBox();813 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 813 814 814 815 /* Create network: */ … … 875 876 876 877 /* Get VirtualBox for further activities: */ 877 CVirtualBox comVBox = uiCommon().virtualBox();878 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 878 879 879 880 /* Find corresponding network: */ … … 947 948 948 949 /* Get VirtualBox for further activities: */ 949 CVirtualBox comVBox = uiCommon().virtualBox();950 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 950 951 951 952 /* Create network: */ … … 1000 1001 1001 1002 /* Get VirtualBox for further activities: */ 1002 CVirtualBox comVBox = uiCommon().virtualBox();1003 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 1003 1004 1004 1005 /* Find corresponding network: */ … … 1274 1275 #ifdef VBOX_WS_MAC 1275 1276 /* Get VirtualBox for further activities: */ 1276 CVirtualBox comVBox = uiCommon().virtualBox();1277 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 1277 1278 1278 1279 /* Find corresponding network: */ … … 1317 1318 1318 1319 /* Get host for further activities: */ 1319 CHost comHost = uiCommon().host();1320 CHost comHost = gpGlobalSession->host(); 1320 1321 1321 1322 /* Find corresponding interface: */ … … 1366 1367 { 1367 1368 /* Get VBox for further activities: */ 1368 CVirtualBox comVBox = uiCommon().virtualBox();1369 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 1369 1370 1370 1371 /* Find corresponding DHCP server (create if necessary): */ … … 1503 1504 1504 1505 /* Get VirtualBox for further activities: */ 1505 CVirtualBox comVBox = uiCommon().virtualBox();1506 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 1506 1507 1507 1508 /* Find corresponding network: */ … … 1666 1667 1667 1668 /* Get VirtualBox for further activities: */ 1668 CVirtualBox comVBox = uiCommon().virtualBox();1669 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 1669 1670 1670 1671 /* Find corresponding network: */ … … 2041 2042 #ifdef VBOX_WS_MAC 2042 2043 /* Get VirtualBox for further activities: */ 2043 const CVirtualBox comVBox = uiCommon().virtualBox();2044 const CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2044 2045 2045 2046 /* Get networks for further activities: */ … … 2070 2071 2071 2072 /* Get host for further activities: */ 2072 const CHost comHost = uiCommon().host();2073 const CHost comHost = gpGlobalSession->host(); 2073 2074 2074 2075 /* Get interfaces for further activities: */ … … 2151 2152 2152 2153 /* Get VBox for further activities: */ 2153 CVirtualBox comVBox = uiCommon().virtualBox();2154 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2154 2155 2155 2156 /* Find corresponding DHCP server (create if necessary): */ … … 2192 2193 2193 2194 /* Get VirtualBox for further activities: */ 2194 const CVirtualBox comVBox = uiCommon().virtualBox();2195 const CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2195 2196 2196 2197 /* Get interfaces for further activities: */ … … 2304 2305 2305 2306 /* Get VirtualBox for further activities: */ 2306 const CVirtualBox comVBox = uiCommon().virtualBox();2307 const CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2307 2308 2308 2309 /* Get interfaces for further activities: */ -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r103551 r103771 35 35 #include "UIErrorString.h" 36 36 #include "UIExtraDataManager.h" 37 #include "UIGlobalSession.h" 37 38 #include "UIHostComboEditor.h" 38 39 #include "UINotificationCenter.h" … … 3830 3831 /* Acquire VM: */ 3831 3832 AssertReturn(!m_uMachineId.isNull(), CProgress()); 3832 CVirtualBox comVBox = uiCommon().virtualBox();3833 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 3833 3834 m_comMachine = comVBox.FindMachine(m_uMachineId.toString()); 3834 3835 if (!comVBox.isOk()) … … 4634 4635 4635 4636 #ifdef VBOX_WITH_UPDATE_AGENT 4636 CHost comHost = uiCommon().host();4637 CHost comHost = gpGlobalSession->host(); 4637 4638 if (!comHost.isNull()) 4638 4639 m_comUpdateHost = comHost.GetUpdateHost(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp
r103552 r103771 39 39 #include "UIDesktopWidgetWatchdog.h" 40 40 #include "UIExtraDataManager.h" 41 #include "UIGlobalSession.h" 41 42 #include "UIIconPool.h" 42 43 #include "UIMachine.h" … … 153 154 { 154 155 /* Get corresponding machine: */ 155 CMachine machine = uiCommon().virtualBox().FindMachine(uiCommon().managedVMUuid().toString());156 CMachine machine = gpGlobalSession->virtualBox().FindMachine(uiCommon().managedVMUuid().toString()); 156 157 AssertMsgReturn(!machine.isNull(), ("UICommon::managedVMUuid() should have filter that case before!\n"), false); 157 158 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r103711 r103771 51 51 #include "UIFileManagerDialog.h" 52 52 #include "UIFrameBuffer.h" 53 #include "UIGlobalSession.h" 53 54 #include "UIGuestProcessControlDialog.h" 54 55 #include "UIHelpBrowserDialog.h" … … 347 348 { 348 349 /* Do nothing if VBoxSVC still availabile: */ 349 if ( uiCommon().isVBoxSVCAvailable())350 if (gpGlobalSession->isVBoxSVCAvailable()) 350 351 return; 351 352 … … 857 858 { 858 859 /* We should watch for VBoxSVC availability changes: */ 859 connect( &uiCommon(), &UICommon::sigVBoxSVCAvailabilityChange,860 connect(gpGlobalSession, &UIGlobalSession::sigVBoxSVCAvailabilityChange, 860 861 this, &UIMachineLogic::sltHandleVBoxSVCAvailabilityChange); 861 862 … … 1417 1418 { 1418 1419 /* We should stop watching for VBoxSVC availability changes: */ 1419 disconnect( &uiCommon(), &UICommon::sigVBoxSVCAvailabilityChange,1420 disconnect(gpGlobalSession, &UIGlobalSession::sigVBoxSVCAvailabilityChange, 1420 1421 this, &UIMachineLogic::sltHandleVBoxSVCAvailabilityChange); 1421 1422 … … 2290 2291 2291 2292 /* Try to acquire default additions ISO: */ 2292 CSystemProperties comSystemProperties = uiCommon().virtualBox().GetSystemProperties();2293 CSystemProperties comSystemProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 2293 2294 const QString strAdditions = comSystemProperties.GetDefaultAdditionsISO(); 2294 2295 if (comSystemProperties.isOk() && !strAdditions.isEmpty()) … … 2301 2302 2302 2303 /* Check whether we have already registered image: */ 2303 CVirtualBox comVBox = uiCommon().virtualBox();2304 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2304 2305 CMediumVector comMedia = comVBox.GetDVDImages(); 2305 2306 if (!comVBox.isOk()) … … 2658 2659 KChipsetType enmChipsetType = KChipsetType_Null; 2659 2660 uimachine()->acquireChipsetType(enmChipsetType); 2660 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArchType);2661 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArchType); 2661 2662 const ulong uCount = qMin((ulong)4, (ulong)comProperties.GetMaxNetworkAdapters(enmChipsetType)); 2662 2663 … … 2779 2780 m_pSharedClipboardActions = new QActionGroup(this); 2780 2781 /* Load currently supported Clipboard modes: */ 2781 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();2782 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 2782 2783 QVector<KClipboardMode> clipboardModes = comProperties.GetSupportedClipboardModes(); 2783 2784 /* Take current clipboard mode into account: */ … … 2829 2830 m_pDragAndDropActions = new QActionGroup(this); 2830 2831 /* Load currently supported DnD modes: */ 2831 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();2832 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 2832 2833 QVector<KDnDMode> dndModes = comProperties.GetSupportedDnDModes(); 2833 2834 /* Take current DnD mode into account: */ … … 2992 2993 return; 2993 2994 2994 QVector<CMachine> machines = uiCommon().virtualBox().GetMachines();2995 QVector<CMachine> machines = gpGlobalSession->virtualBox().GetMachines(); 2995 2996 bool fAnother = false; 2996 2997 for (int i = 0; i < machines.size(); ++i) -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r103538 r103771 39 39 #include "UIExtraDataManager.h" 40 40 #include "UIFrameBuffer.h" 41 #include "UIGlobalSession.h" 41 42 #include "UIIconPool.h" 42 43 #include "UIGuestOSType.h" … … 892 893 893 894 /* Get recommended controller bus & type: */ 894 CVirtualBox comVBox = uiCommon().virtualBox();895 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 895 896 896 897 if (!comVBox.isOk()) … … 900 901 } 901 902 902 const KStorageBus enmRecommendedDvdBus = uiCommon().guestOSTypeManager().getRecommendedDVDStorageBus(osTypeId());903 const KStorageControllerType enmRecommendedDvdType = uiCommon().guestOSTypeManager().getRecommendedDVDStorageController(osTypeId());903 const KStorageBus enmRecommendedDvdBus = gpGlobalSession->guestOSTypeManager().getRecommendedDVDStorageBus(osTypeId()); 904 const KStorageControllerType enmRecommendedDvdType = gpGlobalSession->guestOSTypeManager().getRecommendedDVDStorageController(osTypeId()); 904 905 905 906 /* Search for an attachment of required bus & type: */ … … 1056 1057 1057 1058 /* Check whether video input devices are available: */ 1058 CHost comHost = uiCommon().host();1059 CHost comHost = gpGlobalSession->host(); 1059 1060 CHostVideoInputDeviceVector comVideoInputDevices = comHost.GetVideoInputDevices(); 1060 1061 if (!comHost.isOk() || comVideoInputDevices.isEmpty()) … … 1073 1074 bool UISession::usbDevices(QList<USBDeviceInfo> &guiUSBDevices) 1074 1075 { 1075 const CHost comHost = uiCommon().host();1076 const CHost comHost = gpGlobalSession->host(); 1076 1077 const CHostUSBDeviceVector comHostUSBDevices = comHost.GetUSBDevices(); 1077 1078 bool fSuccess = comHost.isOk(); … … 1135 1136 if (!fSuccess) 1136 1137 { 1137 CHost comHost = uiCommon().host();1138 CHost comHost = gpGlobalSession->host(); 1138 1139 /* Nothing to check for errors here because error is valid case as well. */ 1139 1140 CHostUSBDevice comHostUSBDevice = comHost.FindUSBDeviceById(uId); … … 1163 1164 bool UISession::webcamDevices(QList<WebcamDeviceInfo> &guiWebcamDevices) 1164 1165 { 1165 const CHost comHost = uiCommon().host();1166 const CHost comHost = gpGlobalSession->host(); 1166 1167 const CHostVideoInputDeviceVector comHostVideoInputDevices = comHost.GetVideoInputDevices(); 1167 1168 bool fSuccess = comHost.isOk(); … … 1278 1279 { 1279 1280 /* Acquire system properties: */ 1280 CVirtualBox comVBox = uiCommon().virtualBox();1281 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 1281 1282 AssertReturn(comVBox.isNotNull(), false); 1282 1283 CPlatformProperties comProperties = comVBox.GetPlatformProperties(enmArchType); … … 1359 1360 1360 1361 /* Auto GA update is currently for Windows and Linux guests only */ 1361 bool fIsWindowOrLinux = uiCommon().guestOSTypeManager().isLinux(uimachine()->osTypeId())1362 || uiCommon().guestOSTypeManager().isWindows(uimachine()->osTypeId());1362 bool fIsWindowOrLinux = gpGlobalSession->guestOSTypeManager().isLinux(uimachine()->osTypeId()) 1363 || gpGlobalSession->guestOSTypeManager().isWindows(uimachine()->osTypeId()); 1363 1364 1364 1365 if (!fIsWindowOrLinux) … … 2704 2705 2705 2706 /* Close session: */ 2706 if (!m_comSession.isNull() && uiCommon().isVBoxSVCAvailable())2707 if (!m_comSession.isNull() && gpGlobalSession->isVBoxSVCAvailable()) 2707 2708 { 2708 2709 m_comSession.UnlockMachine(); … … 2742 2743 2743 2744 /* Create host network interface names list: */ 2744 foreach (const CHostNetworkInterface &comNetIface, uiCommon().host().GetNetworkInterfaces())2745 foreach (const CHostNetworkInterface &comNetIface, gpGlobalSession->host().GetNetworkInterfaces()) 2745 2746 { 2746 2747 availableInterfaceNames << comNetIface.GetName(); … … 2750 2751 /* Enumerate all the virtual network adapters: */ 2751 2752 CPlatform comPlatform = machine().GetPlatform(); 2752 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(comPlatform.GetArchitecture());2753 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(comPlatform.GetArchitecture()); 2753 2754 const ulong cCount = comProperties.GetMaxNetworkAdapters(comPlatform.GetChipsetType()); 2754 2755 for (ulong uAdapterIndex = 0; uAdapterIndex < cCount; ++uAdapterIndex) … … 2798 2799 2799 2800 /* Check for USB enumeration warning. Don't return false even if we have a warning: */ 2800 CHost comHost = uiCommon().host();2801 CHost comHost = gpGlobalSession->host(); 2801 2802 if (comHost.GetUSBDevices().isEmpty() && comHost.isWarning()) 2802 2803 { … … 2817 2818 { 2818 2819 /* Get VBox: */ 2819 CVirtualBox comVBox = uiCommon().virtualBox();2820 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 2820 2821 2821 2822 /* Prepare medium to mount: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp
r103085 r103771 37 37 38 38 /* GUI includes: */ 39 #include "UICommon.h"40 39 #include "UIConverter.h" 40 #include "UIGlobalSession.h" 41 41 #include "UIIconPool.h" 42 42 #include "UIInformationRuntime.h" … … 352 352 else 353 353 { 354 strOSType = uiCommon().guestOSTypeManager().getDescription(strOSType);354 strOSType = gpGlobalSession->guestOSTypeManager().getDescription(strOSType); 355 355 } 356 356 updateInfoRow(InfoRow_GuestOSType, QString("%1").arg(m_strGuestOSTypeLabel), strOSType); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialogSpecific.cpp
r103169 r103771 33 33 #include "UICommon.h" 34 34 #include "UIExtraDataManager.h" 35 #include "UIGlobalSession.h" 35 36 #include "UIIconPool.h" 36 37 #include "UIMessageCenter.h" … … 129 130 { 130 131 /* Get host & properties: */ 131 CHost comHost = uiCommon().host();132 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();132 CHost comHost = gpGlobalSession->host(); 133 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 133 134 /* Prepare global data: */ 134 135 qRegisterMetaType<UISettingsDataGlobal>(); … … 146 147 { 147 148 /* Get host & properties: */ 148 CHost comHost = uiCommon().host();149 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();149 CHost comHost = gpGlobalSession->host(); 150 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 150 151 /* Prepare global data: */ 151 152 qRegisterMetaType<UISettingsDataGlobal>(); … … 318 319 319 320 /* Get corresponding machine (required to determine dialog type and page availability): */ 320 m_machine = uiCommon().virtualBox().FindMachine(m_uMachineId.toString());321 m_machine = gpGlobalSession->virtualBox().FindMachine(m_uMachineId.toString()); 321 322 AssertReturnVoid(!m_machine.isNull()); 322 323 m_enmSessionState = m_machine.GetSessionState(); … … 492 493 QString strDialogTitle; 493 494 /* Get corresponding machine (required to compose dialog title): */ 494 const CMachine &machine = uiCommon().virtualBox().FindMachine(m_uMachineId.toString());495 const CMachine &machine = gpGlobalSession->virtualBox().FindMachine(m_uMachineId.toString()); 495 496 if (!machine.isNull()) 496 497 strDialogTitle = tr("%1 - %2").arg(machine.GetName()).arg(titleExtension()); … … 633 634 634 635 /* Get corresponding machine (required to determine dialog type and page availability): */ 635 m_machine = uiCommon().virtualBox().FindMachine(m_uMachineId.toString());636 m_machine = gpGlobalSession->virtualBox().FindMachine(m_uMachineId.toString()); 636 637 AssertMsg(!m_machine.isNull(), ("Can't find corresponding machine!\n")); 637 638 m_enmSessionState = m_machine.GetSessionState(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioControllerEditor.cpp
r101867 r103771 33 33 34 34 /* GUI includes: */ 35 #include "UI Common.h"35 #include "UIAudioControllerEditor.h" 36 36 #include "UIConverter.h" 37 #include "UI AudioControllerEditor.h"37 #include "UIGlobalSession.h" 38 38 39 39 /* COM includes: */ … … 155 155 ? optionalFlags().value("arch").value<KPlatformArchitecture>() 156 156 : KPlatformArchitecture_x86; 157 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);157 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 158 158 m_supportedValues = comProperties.GetSupportedAudioControllerTypes(); 159 159 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioHostDriverEditor.cpp
r101011 r103771 33 33 34 34 /* GUI includes: */ 35 #include "UI Common.h"35 #include "UIAudioHostDriverEditor.h" 36 36 #include "UIConverter.h" 37 #include "UI AudioHostDriverEditor.h"37 #include "UIGlobalSession.h" 38 38 39 39 /* COM includes: */ … … 147 147 148 148 /* Load currently supported audio driver types: */ 149 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();149 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 150 150 m_supportedValues = comProperties.GetSupportedAudioDriverTypes(); 151 151 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBaseMemoryEditor.cpp
r101563 r103771 36 36 #include "QIAdvancedSlider.h" 37 37 #include "UIBaseMemoryEditor.h" 38 #include "UI Common.h"38 #include "UIGlobalSession.h" 39 39 40 40 /* COM includes: */ … … 128 128 void UIBaseMemorySlider::prepare() 129 129 { 130 ulong uFullSize = uiCommon().host().GetMemorySize();131 CSystemProperties sys = uiCommon().virtualBox().GetSystemProperties();130 ulong uFullSize = gpGlobalSession->host().GetMemorySize(); 131 CSystemProperties sys = gpGlobalSession->virtualBox().GetSystemProperties(); 132 132 m_uMinRAM = sys.GetMinGuestRAM(); 133 133 m_uMaxRAM = RT_MIN(RT_ALIGN(uFullSize, _1G / _1M), sys.GetMaxGuestRAM()); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBootOrderEditor.cpp
r103178 r103771 35 35 /* GUI includes: */ 36 36 #include "UIBootOrderEditor.h" 37 #include "UICommon.h"38 37 #include "UIConverter.h" 38 #include "UIGlobalSession.h" 39 39 #include "UIIconPool.h" 40 40 #include "QIToolBar.h" … … 352 352 CPlatform comPlatform = comMachine.GetPlatform(); 353 353 const KPlatformArchitecture comArch = comPlatform.GetArchitecture(); 354 const CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(comArch);354 const CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(comArch); 355 355 QVector<KDeviceType> possibleBootItems = comProperties.GetSupportedBootDevices(); 356 356 /* Limit the list to maximum boot position: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIChipsetEditor.cpp
r101867 r103771 33 33 34 34 /* GUI includes: */ 35 #include "UICommon.h"36 35 #include "UIConverter.h" 37 36 #include "UIChipsetEditor.h" 37 #include "UIGlobalSession.h" 38 38 39 39 /* COM includes: */ … … 158 158 ? optionalFlags().value("arch").value<KPlatformArchitecture>() 159 159 : KPlatformArchitecture_x86; 160 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);160 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 161 161 m_supportedValues = comProperties.GetSupportedChipsetTypes(); 162 162 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIDefaultMachineFolderEditor.cpp
r103610 r103771 31 31 32 32 /* GUI includes: */ 33 #include "UICommon.h"34 33 #include "UIDefaultMachineFolderEditor.h" 35 34 #include "UIFilePathSelector.h" 35 #include "UIGlobalSession.h" 36 36 37 37 … … 106 106 if (m_pLabel) 107 107 m_pLabel->setBuddy(m_pSelector); 108 m_pSelector->setInitialPath( uiCommon().homeFolder());108 m_pSelector->setInitialPath(gpGlobalSession->homeFolder()); 109 109 connect(m_pSelector, &UIFilePathSelector::pathChanged, 110 110 this, &UIDefaultMachineFolderEditor::sigPathChanged); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIDragAndDropEditor.cpp
r101498 r103771 33 33 34 34 /* GUI includes: */ 35 #include "UICommon.h"36 35 #include "UIConverter.h" 37 36 #include "UIDragAndDropEditor.h" 37 #include "UIGlobalSession.h" 38 38 39 39 /* COM includes: */ … … 147 147 148 148 /* Load currently supported audio driver types: */ 149 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();149 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 150 150 m_supportedValues = comProperties.GetSupportedDnDModes(); 151 151 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGraphicsControllerEditor.cpp
r101867 r103771 33 33 34 34 /* GUI includes: */ 35 #include "UICommon.h"36 35 #include "UIConverter.h" 36 #include "UIGlobalSession.h" 37 37 #include "UIGraphicsControllerEditor.h" 38 38 … … 163 163 ? optionalFlags().value("arch").value<KPlatformArchitecture>() 164 164 : KPlatformArchitecture_x86; 165 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);165 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 166 166 m_supportedValues = comProperties.GetSupportedGraphicsControllerTypes(); 167 167 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMonitorCountEditor.cpp
r101563 r103771 33 33 /* GUI includes: */ 34 34 #include "QIAdvancedSlider.h" 35 #include "UICommon.h"36 35 #include "UIDesktopWidgetWatchdog.h" 36 #include "UIGlobalSession.h" 37 37 #include "UIMonitorCountEditor.h" 38 38 … … 130 130 { 131 131 /* Prepare common variables: */ 132 const CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();132 const CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 133 133 134 134 /* Prepare main layout: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp
r103703 r103771 35 35 #include "QILineEdit.h" 36 36 #include "UICommon.h" 37 #include "UIGlobalSession.h" 37 38 #include "UIIconPool.h" 38 39 #include "UIFilePathSelector.h" … … 162 163 { 163 164 if (!m_pSelectorPath) 164 return uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();165 return gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder(); 165 166 return m_pSelectorPath->path(); 166 167 } … … 190 191 { 191 192 QString strComboFamilyId = m_pComboFamily->itemData(i).toString(); 192 if (!strComboFamilyId.isEmpty() && strComboFamilyId == uiCommon().guestOSTypeManager().getFamilyId(strTypeId))193 if (!strComboFamilyId.isEmpty() && strComboFamilyId == gpGlobalSession->guestOSTypeManager().getFamilyId(strTypeId)) 193 194 iFamilyComboIndex = i; 194 195 } … … 200 201 201 202 /* If distribution is not empty then try to select correct index. This will populate type combo: */ 202 QString strDistribution = uiCommon().guestOSTypeManager().getSubtype(strTypeId);203 QString strDistribution = gpGlobalSession->guestOSTypeManager().getSubtype(strTypeId); 203 204 if (!strDistribution.isEmpty()) 204 205 { … … 342 343 const UIGuestOSTypeManager::UIGuestOSTypeInfo types 343 344 = m_strDistribution.isEmpty() 344 ? uiCommon().guestOSTypeManager().getTypesForFamilyId(m_strFamilyId, enmArch)345 : uiCommon().guestOSTypeManager().getTypesForSubtype(m_strDistribution, enmArch);345 ? gpGlobalSession->guestOSTypeManager().getTypesForFamilyId(m_strFamilyId, enmArch) 346 : gpGlobalSession->guestOSTypeManager().getTypesForSubtype(m_strDistribution, enmArch); 346 347 347 348 /* Save the most recently used item: */ … … 428 429 { 429 430 m_pLabelPath->setBuddy(m_pSelectorPath->focusProxy()); 430 QString strDefaultMachineFolder = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();431 QString strDefaultMachineFolder = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder(); 431 432 m_pSelectorPath->setPath(strDefaultMachineFolder); 432 433 m_pSelectorPath->setDefaultPath(strDefaultMachineFolder); … … 617 618 /* Acquire family IDs: */ 618 619 const UIGuestOSTypeManager::UIGuestOSFamilyInfo families 619 = uiCommon().guestOSTypeManager().getFamilies(false, enmArch);620 = gpGlobalSession->guestOSTypeManager().getFamilies(false, enmArch); 620 621 621 622 /* Block signals initially and clear the combo: */ … … 653 654 /* Acquire a list of suitable sub-types: */ 654 655 const UIGuestOSTypeManager::UIGuestOSSubtypeInfo distributions 655 = uiCommon().guestOSTypeManager().getSubtypesForFamilyId(m_strFamilyId, false, enmArch);656 = gpGlobalSession->guestOSTypeManager().getSubtypesForFamilyId(m_strFamilyId, false, enmArch); 656 657 m_pLabelDistribution->setEnabled(!distributions.isEmpty()); 657 658 m_pComboDistribution->setEnabled(!distributions.isEmpty()); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.cpp
r101717 r103771 33 33 34 34 /* GUI includes: */ 35 #include "UICommon.h"36 35 #include "UIConverter.h" 37 36 #include "UIExtraDataManager.h" 37 #include "UIGlobalSession.h" 38 38 #include "UINetworkAttachmentEditor.h" 39 39 … … 133 133 { 134 134 QStringList bridgedAdapterList; 135 foreach (const CHostNetworkInterface &comInterface, uiCommon().host().GetNetworkInterfaces())135 foreach (const CHostNetworkInterface &comInterface, gpGlobalSession->host().GetNetworkInterfaces()) 136 136 { 137 137 if ( comInterface.GetInterfaceType() == KHostNetworkInterfaceType_Bridged … … 145 145 QStringList UINetworkAttachmentEditor::internalNetworks() 146 146 { 147 return QList<QString>::fromVector( uiCommon().virtualBox().GetInternalNetworks());147 return QList<QString>::fromVector(gpGlobalSession->virtualBox().GetInternalNetworks()); 148 148 } 149 149 … … 152 152 { 153 153 QStringList hostInterfaceList; 154 foreach (const CHostNetworkInterface &comInterface, uiCommon().host().GetNetworkInterfaces())154 foreach (const CHostNetworkInterface &comInterface, gpGlobalSession->host().GetNetworkInterfaces()) 155 155 { 156 156 if ( comInterface.GetInterfaceType() == KHostNetworkInterfaceType_HostOnly … … 164 164 QStringList UINetworkAttachmentEditor::genericDrivers() 165 165 { 166 return QList<QString>::fromVector( uiCommon().virtualBox().GetGenericNetworkDrivers());166 return QList<QString>::fromVector(gpGlobalSession->virtualBox().GetGenericNetworkDrivers()); 167 167 } 168 168 … … 171 171 { 172 172 QStringList natNetworkList; 173 foreach (const CNATNetwork &comNetwork, uiCommon().virtualBox().GetNATNetworks())173 foreach (const CNATNetwork &comNetwork, gpGlobalSession->virtualBox().GetNATNetworks()) 174 174 natNetworkList << comNetwork.GetNetworkName(); 175 175 return natNetworkList; … … 181 181 { 182 182 QStringList cloudNetworkList; 183 foreach (const CCloudNetwork &comNetwork, uiCommon().virtualBox().GetCloudNetworks())183 foreach (const CCloudNetwork &comNetwork, gpGlobalSession->virtualBox().GetCloudNetworks()) 184 184 cloudNetworkList << comNetwork.GetNetworkName(); 185 185 return cloudNetworkList; … … 192 192 { 193 193 QStringList hostOnlyNetworkList; 194 foreach (const CHostOnlyNetwork &comNetwork, uiCommon().virtualBox().GetHostOnlyNetworks())194 foreach (const CHostOnlyNetwork &comNetwork, gpGlobalSession->virtualBox().GetHostOnlyNetworks()) 195 195 hostOnlyNetworkList << comNetwork.GetNetworkName(); 196 196 return hostOnlyNetworkList; … … 363 363 364 364 /* Load currently supported network attachment types (system-properties getter): */ 365 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();365 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 366 366 QVector<KNetworkAttachmentType> supportedTypes = comProperties.GetSupportedNetworkAttachmentTypes(); 367 367 /* Filter out types unrelated to current experience mode: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkFeaturesEditor.cpp
r101979 r103771 38 38 #include "QILineEdit.h" 39 39 #include "QIToolButton.h" 40 #include "UICommon.h"41 40 #include "UIConverter.h" 41 #include "UIGlobalSession.h" 42 42 #include "UIIconPool.h" 43 43 #include "UINetworkFeaturesEditor.h" … … 209 209 void UINetworkFeaturesEditor::generateMac() 210 210 { 211 setMACAddress( uiCommon().host().GenerateMACAddress());211 setMACAddress(gpGlobalSession->host().GenerateMACAddress()); 212 212 } 213 213 … … 398 398 ? optionalFlags().value("arch").value<KPlatformArchitecture>() 399 399 : KPlatformArchitecture_x86; 400 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);400 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 401 401 QVector<KNetworkAdapterType> supportedTypes = comProperties.GetSupportedNetworkAdapterTypes(); 402 402 … … 431 431 ? optionalFlags().value("arch").value<KPlatformArchitecture>() 432 432 : KPlatformArchitecture_x86; 433 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);433 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 434 434 QVector<KNetworkAdapterPromiscModePolicy> supportedTypes = comProperties.GetSupportedNetAdpPromiscModePols(); 435 435 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIParavirtProviderEditor.cpp
r101867 r103771 33 33 34 34 /* GUI includes: */ 35 #include "UICommon.h"36 35 #include "UIConverter.h" 36 #include "UIGlobalSession.h" 37 37 #include "UIParavirtProviderEditor.h" 38 38 … … 155 155 ? optionalFlags().value("arch").value<KPlatformArchitecture>() 156 156 : KPlatformArchitecture_x86; 157 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);157 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 158 158 m_supportedValues = comProperties.GetSupportedParavirtProviders(); 159 159 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIPointingHIDEditor.cpp
r101563 r103771 33 33 34 34 /* GUI includes: */ 35 #include "UICommon.h"36 35 #include "UIConverter.h" 36 #include "UIGlobalSession.h" 37 37 #include "UIPointingHIDEditor.h" 38 38 … … 149 149 150 150 /* Load currently supported values: */ 151 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();151 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 152 152 m_supportedValues = comProperties.GetSupportedPointingHIDTypes(); 153 153 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UISerialSettingsEditor.cpp
r101563 r103771 36 36 /* GUI includes: */ 37 37 #include "QIWidgetValidator.h" 38 #include "UICommon.h"39 38 #include "UIConverter.h" 39 #include "UIGlobalSession.h" 40 40 #include "UISerialSettingsEditor.h" 41 41 … … 461 461 462 462 /* Load currently supported port moded: */ 463 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();463 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 464 464 QVector<KPortMode> supportedModes = comProperties.GetSupportedPortModes(); 465 465 /* Take currently requested mode into account if it's sane: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UISharedClipboardEditor.cpp
r101498 r103771 33 33 34 34 /* GUI includes: */ 35 #include "UICommon.h"36 35 #include "UIConverter.h" 36 #include "UIGlobalSession.h" 37 37 #include "UISharedClipboardEditor.h" 38 38 … … 147 147 148 148 /* Load currently supported audio driver types: */ 149 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();149 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 150 150 m_supportedValues = comProperties.GetSupportedClipboardModes(); 151 151 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIStorageSettingsEditor.cpp
r103309 r103771 57 57 #include "UIConverter.h" 58 58 #include "UIExtraDataManager.h" 59 #include "UIGlobalSession.h" 59 60 #include "UIIconPool.h" 60 61 #include "UIMedium.h" … … 1174 1175 updatePixmaps(); 1175 1176 1176 m_fUseIoCache = uiCommon().virtualBox().GetSystemProperties().GetDefaultIoCacheSettingForStorageController(enmType);1177 m_fUseIoCache = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultIoCacheSettingForStorageController(enmType); 1177 1178 } 1178 1179 … … 1237 1238 { 1238 1239 /* Limit maximum port count: */ 1239 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1240 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1240 1241 m_uPortCount = qMin(uPortCount, (uint)comProperties.GetMaxPortCountForStorageBus(bus())); 1241 1242 } … … 1255 1256 uint ControllerItem::maxPortCount() 1256 1257 { 1257 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1258 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1258 1259 return (uint)comProperties.GetMaxPortCountForStorageBus(bus()); 1259 1260 } … … 1272 1273 { 1273 1274 SlotsList allSlots; 1274 CPlatformProperties comProps = uiCommon().virtualBox().GetPlatformProperties(arch());1275 CPlatformProperties comProps = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1275 1276 for (ULONG i = 0; i < comProps.GetMaxPortCountForStorageBus(bus()); ++ i) 1276 1277 for (ULONG j = 0; j < comProps.GetMaxDevicesPerPortForStorageBus(bus()); ++ j) … … 1289 1290 DeviceTypeList ControllerItem::deviceTypeList() const 1290 1291 { 1291 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1292 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1292 1293 return comProperties.GetDeviceTypesForStorageBus(m_enmBus).toList(); 1293 1294 } … … 1370 1371 1371 1372 /* Load currently supported storage buses: */ 1372 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1373 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1373 1374 const QVector<KStorageBus> supportedBuses = comProperties.GetSupportedStorageBuses(); 1374 1375 … … 1392 1393 1393 1394 /* Load currently supported storage buses & types: */ 1394 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1395 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1395 1396 const QVector<KStorageBus> supportedBuses = comProperties.GetSupportedStorageBuses(); 1396 1397 const QVector<KStorageControllerType> supportedTypes = comProperties.GetSupportedStorageControllerTypes(); … … 1892 1893 case R_IsMoreIDEControllersPossible: 1893 1894 { 1894 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1895 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1895 1896 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1896 1897 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_IDE) < … … 1899 1900 case R_IsMoreSATAControllersPossible: 1900 1901 { 1901 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1902 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1902 1903 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1903 1904 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_SATA) < … … 1906 1907 case R_IsMoreSCSIControllersPossible: 1907 1908 { 1908 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1909 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1909 1910 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1910 1911 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_SCSI) < … … 1913 1914 case R_IsMoreFloppyControllersPossible: 1914 1915 { 1915 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1916 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1916 1917 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1917 1918 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_Floppy) < … … 1920 1921 case R_IsMoreSASControllersPossible: 1921 1922 { 1922 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1923 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1923 1924 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1924 1925 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_SAS) < … … 1927 1928 case R_IsMoreUSBControllersPossible: 1928 1929 { 1929 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1930 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1930 1931 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1931 1932 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_USB) < … … 1934 1935 case R_IsMoreNVMeControllersPossible: 1935 1936 { 1936 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1937 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1937 1938 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1938 1939 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_PCIe) < … … 1941 1942 case R_IsMoreVirtioSCSIControllersPossible: 1942 1943 { 1943 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());1944 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1944 1945 return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) && 1945 1946 (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_VirtioSCSI) < … … 1955 1956 { 1956 1957 ControllerItem *pItemController = qobject_cast<ControllerItem*>(pItem); 1957 CPlatformProperties comProps = uiCommon().virtualBox().GetPlatformProperties(arch());1958 CPlatformProperties comProps = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 1958 1959 const bool fIsMoreAttachmentsPossible = (ULONG)rowCount(specifiedIndex) < 1959 1960 (comProps.GetMaxPortCountForStorageBus(pItemController->bus()) * … … 2302 2303 2303 2304 /* Lets make sure there is enough of place for all the remaining attachments: */ 2304 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());2305 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 2305 2306 const uint uMaxPortCount = 2306 2307 (uint)comProperties.GetMaxPortCountForStorageBus(enmNewCtrBusType); … … 2681 2682 { 2682 2683 QMap<KStorageBus, int> maximumMap; 2683 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());2684 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 2684 2685 for (int iStorageBusType = KStorageBus_IDE; iStorageBusType < KStorageBus_Max; ++iStorageBusType) 2685 2686 maximumMap.insert((KStorageBus)iStorageBusType, … … 3394 3395 { 3395 3396 /* Load currently supported storage buses and types: */ 3396 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());3397 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch()); 3397 3398 const QVector<KStorageBus> supportedBuses = comProperties.GetSupportedStorageBuses(); 3398 3399 const QVector<KStorageControllerType> supportedTypes = comProperties.GetSupportedStorageControllerTypes(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UITpmEditor.cpp
r101867 r103771 33 33 34 34 /* GUI includes: */ 35 #include "UICommon.h"36 35 #include "UIConverter.h" 36 #include "UIGlobalSession.h" 37 37 #include "UITpmEditor.h" 38 38 … … 156 156 ? optionalFlags().value("arch").value<KPlatformArchitecture>() 157 157 : KPlatformArchitecture_x86; 158 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);158 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 159 159 m_supportedValues = comProperties.GetSupportedTpmTypes(); 160 160 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIUSBControllerEditor.cpp
r101867 r103771 32 32 33 33 /* GUI includes: */ 34 #include "UI Common.h"34 #include "UIGlobalSession.h" 35 35 #include "UIUSBControllerEditor.h" 36 36 … … 156 156 ? optionalFlags().value("arch").value<KPlatformArchitecture>() 157 157 : KPlatformArchitecture_x86; 158 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);158 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 159 159 m_supportedValues = comProperties.GetSupportedUSBControllerTypes(); 160 160 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIUSBFiltersEditor.cpp
r103362 r103771 38 38 #include "QITreeWidget.h" 39 39 #include "UICommon.h" 40 #include "UIGlobalSession.h" 40 41 #include "UIIconPool.h" 41 42 #include "UIUSBFilterDetailsEditor.h" … … 176 177 177 178 /* Get host for further activities: */ 178 CHost comHost = uiCommon().host();179 CHost comHost = gpGlobalSession->host(); 179 180 180 181 /* Check whether we have host USB devices at all: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVRDEAuthLibraryEditor.cpp
r101011 r103771 31 31 32 32 /* GUI includes: */ 33 #include "UICommon.h"34 33 #include "UIFilePathSelector.h" 34 #include "UIGlobalSession.h" 35 35 #include "UIVRDEAuthLibraryEditor.h" 36 36 … … 105 105 if (m_pLabel) 106 106 m_pLabel->setBuddy(m_pSelector); 107 m_pSelector->setInitialPath( uiCommon().homeFolder());107 m_pSelector->setInitialPath(gpGlobalSession->homeFolder()); 108 108 m_pSelector->setMode(UIFilePathSelector::Mode_File_Open); 109 109 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVideoMemoryEditor.cpp
r101563 r103771 36 36 #include "QIAdvancedSlider.h" 37 37 #include "UICommon.h" 38 #include "UIGlobalSession.h" 38 39 #include "UIVideoMemoryEditor.h" 39 40 … … 224 225 { 225 226 /* Prepare common variables: */ 226 const CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();227 const CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 227 228 m_iMinVRAM = comProperties.GetMinGuestVRAM(); 228 229 m_iMaxVRAM = comProperties.GetMaxGuestVRAM(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVirtualCPUEditor.cpp
r101563 r103771 35 35 /* GUI includes: */ 36 36 #include "QIAdvancedSlider.h" 37 #include "UI Common.h"37 #include "UIGlobalSession.h" 38 38 #include "UIVirtualCPUEditor.h" 39 39 … … 137 137 { 138 138 /* Prepare common variables: */ 139 const CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();140 const uint uHostCPUs = uiCommon().host().GetProcessorOnlineCoreCount();139 const CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 140 const uint uHostCPUs = gpGlobalSession->host().GetProcessorOnlineCoreCount(); 141 141 m_uMinVCPUCount = comProperties.GetMinGuestCPUCount(); 142 142 m_uMaxVCPUCount = qMin(2 * uHostCPUs, (uint)comProperties.GetMaxGuestCPUCount()); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r103315 r103771 36 36 #include "UIErrorString.h" 37 37 #include "UIExtraDataManager.h" 38 #include "UIGlobalSession.h" 38 39 #include "UIGraphicsControllerEditor.h" 39 40 #ifdef VBOX_WITH_3D_ACCELERATION … … 398 399 399 400 /* Check whether remote display server is valid: */ 400 CExtPackManager comExtPackManager = uiCommon().virtualBox().GetExtensionPackManager();401 CExtPackManager comExtPackManager = gpGlobalSession->virtualBox().GetExtensionPackManager(); 401 402 const bool fExtPackPresent = comExtPackManager.isNotNull() && comExtPackManager.IsExtPackUsable(GUI_ExtPackName); 402 403 CVRDEServer comVrdeServer = m_machine.GetVRDEServer(); … … 698 699 if (m_pEditorVRDESettings->isFeatureEnabled()) 699 700 { 700 CExtPackManager extPackManager = uiCommon().virtualBox().GetExtensionPackManager();701 CExtPackManager extPackManager = gpGlobalSession->virtualBox().GetExtensionPackManager(); 701 702 if (!extPackManager.isNull() && !extPackManager.IsExtPackUsable(GUI_ExtPackName)) 702 703 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r102085 r103771 33 33 #include "QITabWidget.h" 34 34 #include "UIAddDiskEncryptionPasswordDialog.h" 35 #include "UICommon.h"36 35 #include "UIConverter.h" 36 #include "UIDefs.h" 37 37 #include "UIDescriptionEditor.h" 38 38 #include "UIDiskEncryptionSettingsEditor.h" 39 39 #include "UIDragAndDropEditor.h" 40 40 #include "UIErrorString.h" 41 #include "UIGlobalSession.h" 41 42 #include "UIMachineSettingsGeneral.h" 42 43 #include "UIModalWindowManager.h" … … 396 397 { 397 398 /* Encryption Extension Pack presence test: */ 398 CExtPackManager extPackManager = uiCommon().virtualBox().GetExtensionPackManager();399 CExtPackManager extPackManager = gpGlobalSession->virtualBox().GetExtensionPackManager(); 399 400 if (!extPackManager.isNull() && !extPackManager.IsExtPackUsable(GUI_ExtPackName)) 400 401 { … … 783 784 const CPlatform comPlatform = m_machine.GetPlatform(); 784 785 CPlatformX86 comPlatformX86 = comPlatform.GetX86(); 785 const CGuestOSType comNewType = uiCommon().virtualBox().GetGuestOSType(newGeneralData.m_strGuestOsTypeId);786 const CGuestOSType comNewType = gpGlobalSession->virtualBox().GetGuestOSType(newGeneralData.m_strGuestOsTypeId); 786 787 comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_LongMode, comNewType.GetIs64Bit()); 787 788 fSuccess = comPlatformX86.isOk(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r101717 r103771 32 32 /* GUI includes: */ 33 33 #include "QITabWidget.h" 34 #include "UICommon.h"35 34 #include "UIErrorString.h" 35 #include "UIGlobalSession.h" 36 36 #include "UIMachineSettingsNetwork.h" 37 37 #include "UINetworkAttachmentEditor.h" … … 452 452 * is that the limitation to 4 isn't necessary any more, but this needs to be checked 453 453 * on all platforms to be certain that it's usable everywhere. */ 454 const ulong uCount = qMin((ULONG)4, uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxNetworkAdapters(KChipsetType_PIIX3));454 const ulong uCount = qMin((ULONG)4, gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxNetworkAdapters(KChipsetType_PIIX3)); 455 455 456 456 /* Create corresponding adapter tabs: */ … … 873 873 QString UIMachineSettingsNetwork::tabTitle(int iSlot) 874 874 { 875 return UICommon::tr("Adapter %1").arg(QString("&%1").arg(iSlot + 1));875 return QApplication::translate("UICommon", "Adapter %1").arg(QString("&%1").arg(iSlot + 1)); 876 876 } 877 877 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp
r101607 r103771 31 31 /* GUI includes: */ 32 32 #include "QITabWidget.h" 33 #include "UICommon.h"34 33 #include "UIErrorString.h" 34 #include "UIGlobalSession.h" 35 35 #include "UIMachineSettingsSerial.h" 36 36 #include "UISerialSettingsEditor.h" … … 310 310 { 311 311 /* How many ports to display: */ 312 const ulong uCount = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetSerialPortCount();312 const ulong uCount = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetSerialPortCount(); 313 313 314 314 /* Create corresponding port tabs: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r103287 r103771 35 35 #include "UIBootOrderEditor.h" 36 36 #include "UIChipsetEditor.h" 37 #include "UICommon.h"38 37 #include "UIErrorString.h" 39 38 #include "UIExecutionCapEditor.h" 39 #include "UIGlobalSession.h" 40 40 #include "UIMachineSettingsSystem.h" 41 41 #include "UIMotherboardFeaturesEditor.h" … … 281 281 282 282 /* Gather support flags: */ 283 oldSystemData.m_fSupportedPAE = uiCommon().host().GetProcessorFeature(KProcessorFeature_PAE);284 oldSystemData.m_fSupportedNestedHwVirtEx = uiCommon().host().GetProcessorFeature(KProcessorFeature_NestedHWVirt);285 oldSystemData.m_fSupportedHwVirtEx = uiCommon().host().GetProcessorFeature(KProcessorFeature_HWVirtEx);286 oldSystemData.m_fSupportedNestedPaging = uiCommon().host().GetProcessorFeature(KProcessorFeature_NestedPaging);283 oldSystemData.m_fSupportedPAE = gpGlobalSession->host().GetProcessorFeature(KProcessorFeature_PAE); 284 oldSystemData.m_fSupportedNestedHwVirtEx = gpGlobalSession->host().GetProcessorFeature(KProcessorFeature_NestedHWVirt); 285 oldSystemData.m_fSupportedHwVirtEx = gpGlobalSession->host().GetProcessorFeature(KProcessorFeature_HWVirtEx); 286 oldSystemData.m_fSupportedNestedPaging = gpGlobalSession->host().GetProcessorFeature(KProcessorFeature_NestedPaging); 287 287 288 288 /* Gather old 'Motherboard' data: */ … … 474 474 475 475 /* RAM amount test: */ 476 const ulong uFullSize = uiCommon().host().GetMemorySize();476 const ulong uFullSize = gpGlobalSession->host().GetMemorySize(); 477 477 if (m_pEditorBaseMemory->value() > (int)m_pEditorBaseMemory->maxRAMAlw()) 478 478 { … … 524 524 525 525 /* VCPU amount test: */ 526 const int cTotalCPUs = uiCommon().host().GetProcessorOnlineCoreCount();526 const int cTotalCPUs = gpGlobalSession->host().GetProcessorOnlineCoreCount(); 527 527 if (m_pEditorVCPU->value() > 2 * cTotalCPUs) 528 528 { -
trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp
r103481 r103771 52 52 #include "UIDesktopWidgetWatchdog.h" 53 53 #include "UIDetailsGenerator.h" 54 #include "UIGlobalSession.h" 55 #include "UIGuestOSType.h" 54 56 #include "UIIconPool.h" 55 #include "UIGuestOSType.h"56 57 #include "UISnapshotDetailsWidget.h" 57 58 #include "UIMessageCenter.h" … … 1290 1291 ++iRowCount; 1291 1292 strItem += QString(sSectionItemTpl2).arg(QApplication::translate("UIDetails", "Operating System", "details (general)"), 1292 empReport( uiCommon().guestOSTypeManager().getDescription(comMachine.GetOSTypeId()),1293 uiCommon().guestOSTypeManager().getDescription(comMachineOld.GetOSTypeId())));1293 empReport(gpGlobalSession->guestOSTypeManager().getDescription(comMachine.GetOSTypeId()), 1294 gpGlobalSession->guestOSTypeManager().getDescription(comMachineOld.GetOSTypeId()))); 1294 1295 1295 1296 /* Location of the settings file: */ … … 1715 1716 CPlatform comPlatform = comMachine.GetPlatform(); 1716 1717 const KPlatformArchitecture enmArch = comPlatform.GetArchitecture(); 1717 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);1718 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 1718 1719 for (ulong i = 1; i <= comProperties.GetMaxBootPosition(); ++i) 1719 1720 { … … 1770 1771 1771 1772 /* VT-x/AMD-V and Nested Paging? */ 1772 if ( uiCommon().host().GetProcessorFeature(KProcessorFeature_HWVirtEx))1773 if (gpGlobalSession->host().GetProcessorFeature(KProcessorFeature_HWVirtEx)) 1773 1774 { 1774 1775 /* VT-x/AMD-V? */ … … 1964 1965 const KPlatformArchitecture enmArch = comPlatform.GetArchitecture(); 1965 1966 const KChipsetType enmChipsetType = comPlatform.GetChipsetType(); 1966 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);1967 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 1967 1968 const ulong cMaxNetworkAdapters = comProperties.GetMaxNetworkAdapters(enmChipsetType); 1968 1969 for (ulong iSlot = 0; iSlot < cMaxNetworkAdapters; ++iSlot) … … 2025 2026 CPlatform comPlatform = comMachine.GetPlatform(); 2026 2027 const KPlatformArchitecture enmArch = comPlatform.GetArchitecture(); 2027 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);2028 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch); 2028 2029 const ulong cMaxSerialPorts = comProperties.GetSerialPortCount(); 2029 2030 for (ulong iSlot = 0; iSlot < cMaxSerialPorts; ++iSlot) -
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r103707 r103771 61 61 #include "UISoftKeyboard.h" 62 62 #include "UICommon.h" 63 #include "UIGlobalSession.h" 63 64 #ifdef VBOX_WS_MAC 64 65 # include "VBoxUtils-darwin.h" … … 2531 2532 return; 2532 2533 UISoftKeyboardLayout ¤tLayout = m_layouts[m_uCurrentLayoutId]; 2533 QString strHomeFolder = uiCommon().homeFolder();2534 QString strHomeFolder = gpGlobalSession->homeFolder(); 2534 2535 QDir dir(strHomeFolder); 2535 2536 if (!dir.exists(strSubDirectorName)) … … 3291 3292 void UISoftKeyboardWidget::lookAtDefaultLayoutFolder(QStringList &fileList) 3292 3293 { 3293 QString strFolder = QString("%1%2%3").arg( uiCommon().homeFolder()).arg(QDir::separator()).arg(strSubDirectorName);3294 QString strFolder = QString("%1%2%3").arg(gpGlobalSession->homeFolder()).arg(QDir::separator()).arg(strSubDirectorName); 3294 3295 QDir dir(strFolder); 3295 3296 if (!dir.exists()) -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp
r103362 r103771 40 40 /* GUI includes: */ 41 41 #include "QITreeView.h" 42 #include "UI Common.h"42 #include "UIGlobalSession.h" 43 43 #include "UIGuestOSType.h" 44 44 #include "UIGuestOSTypeSelectionButton.h" … … 539 539 value = strTmp; break; 540 540 } 541 case KVirtualSystemDescriptionType_OS: value = uiCommon().guestOSTypeManager().getDescription(m_strConfigValue); break;542 case KVirtualSystemDescriptionType_Memory: value = m_strConfigValue + " " + UICommon::tr("MB", "size suffix MBytes=1024 KBytes"); break;541 case KVirtualSystemDescriptionType_OS: value = gpGlobalSession->guestOSTypeManager().getDescription(m_strConfigValue); break; 542 case KVirtualSystemDescriptionType_Memory: value = m_strConfigValue + " " + QApplication::translate("UICommon", "MB", "size suffix MBytes=1024 KBytes"); break; 543 543 case KVirtualSystemDescriptionType_SoundCard: value = gpConverter->toString(static_cast<KAudioControllerType>(m_strConfigValue.toInt())); break; 544 544 case KVirtualSystemDescriptionType_NetworkAdapter: value = gpConverter->toString(static_cast<KNetworkAdapterType>(m_strConfigValue.toInt())); break; … … 826 826 QSpinBox *pSpinBox = new QSpinBox(pParent); 827 827 pSpinBox->setRange(UIApplianceEditorWidget::minGuestRAM(), UIApplianceEditorWidget::maxGuestRAM()); 828 pSpinBox->setSuffix(" " + UICommon::tr("MB", "size suffix MBytes=1024 KBytes"));828 pSpinBox->setSuffix(" " + QApplication::translate("UICommon", "MB", "size suffix MBytes=1024 KBytes")); 829 829 pEditor = pSpinBox; 830 830 break; … … 844 844 QComboBox *pComboBox = new QComboBox(pParent); 845 845 /* Load currently supported network adapter types: */ 846 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86);846 CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86); 847 847 QVector<KNetworkAdapterType> supportedTypes = comProperties.GetSupportedNetworkAdapterTypes(); 848 848 /* Take currently requested type into account if it's sane: */ … … 900 900 QComboBox *pComboBox = new QComboBox(pParent); 901 901 pComboBox->setEditable(true); 902 QVector<QString> groupsVector = uiCommon().virtualBox().GetMachineGroups();902 QVector<QString> groupsVector = gpGlobalSession->virtualBox().GetMachineGroups(); 903 903 904 904 for (int i = 0; i < groupsVector.size(); ++i) … … 922 922 QSpinBox *pSpinBox = new QSpinBox(pParent); 923 923 pSpinBox->setRange(value.minimum, value.maximum); 924 pSpinBox->setSuffix(QString(" %1").arg( UICommon::tr(value.unit.toUtf8().constData())));924 pSpinBox->setSuffix(QString(" %1").arg(QApplication::translate("UICommon", value.unit.toUtf8().constData()))); 925 925 pEditor = pSpinBox; 926 926 break; … … 1936 1936 /* We need some global defaults from the current VirtualBox 1937 1937 installation */ 1938 CSystemProperties sp = uiCommon().virtualBox().GetSystemProperties();1938 CSystemProperties sp = gpGlobalSession->virtualBox().GetSystemProperties(); 1939 1939 m_minGuestRAM = sp.GetMinGuestRAM(); 1940 1940 m_maxGuestRAM = sp.GetMaxGuestRAM(); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFormEditorWidget.cpp
r103549 r103771 45 45 #include "QITableView.h" 46 46 #include "QIWithRetranslateUI.h" 47 #include "UICommon.h"48 47 #include "UIFormEditorWidget.h" 48 #include "UIGlobalSession.h" 49 49 #include "UIIconPool.h" 50 50 #include "UINotificationCenter.h" … … 783 783 { 784 784 /* Acquire min/max amount of RAM guest in theory could have: */ 785 CSystemProperties comProps = uiCommon().virtualBox().GetSystemProperties();785 CSystemProperties comProps = gpGlobalSession->virtualBox().GetSystemProperties(); 786 786 if (comProps.isOk()) 787 787 { -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIGuestOSTypeSelectionButton.cpp
r103711 r103771 32 32 33 33 /* GUI includes */ 34 #include "UI Common.h"34 #include "UIGlobalSession.h" 35 35 #include "UIGuestOSType.h" 36 36 #include "UIGuestOSTypeSelectionButton.h" … … 81 81 #endif 82 82 83 setText( uiCommon().guestOSTypeManager().getDescription(m_strOSTypeId));83 setText(gpGlobalSession->guestOSTypeManager().getDescription(m_strOSTypeId)); 84 84 } 85 85 … … 107 107 108 108 const UIGuestOSTypeManager::UIGuestOSFamilyInfo families 109 = uiCommon().guestOSTypeManager().getFamilies(true);109 = gpGlobalSession->guestOSTypeManager().getFamilies(true); 110 110 111 111 for (int i = 0; i < families.size(); ++i) … … 114 114 QMenu *pSubMenu = m_pMainMenu->addMenu(fi.m_strDescription); 115 115 const UIGuestOSTypeManager::UIGuestOSSubtypeInfo distributions 116 = uiCommon().guestOSTypeManager().getSubtypesForFamilyId(fi.m_strId, true);116 = gpGlobalSession->guestOSTypeManager().getSubtypesForFamilyId(fi.m_strId, true); 117 117 118 118 if (distributions.isEmpty()) 119 createOSTypeMenu( uiCommon().guestOSTypeManager().getTypesForFamilyId(fi.m_strId), pSubMenu);119 createOSTypeMenu(gpGlobalSession->guestOSTypeManager().getTypesForFamilyId(fi.m_strId), pSubMenu); 120 120 else 121 121 { 122 122 foreach (const UISubtypeInfo &distribution, distributions) 123 createOSTypeMenu( uiCommon().guestOSTypeManager().getTypesForSubtype(distribution.m_strName),123 createOSTypeMenu(gpGlobalSession->guestOSTypeManager().getTypesForSubtype(distribution.m_strName), 124 124 pSubMenu->addMenu(distribution.m_strName)); 125 125 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMediaComboBox.cpp
r103546 r103771 33 33 /* GUI includes: */ 34 34 #include "UICommon.h" 35 #include "UIGlobalSession.h" 35 36 #include "UIMediaComboBox.h" 36 37 #include "UIMedium.h" … … 75 76 { 76 77 CMediumVector comMedia; 77 comMedia << uiCommon().host().GetDVDDrives();78 comMedia << uiCommon().virtualBox().GetDVDImages();78 comMedia << gpGlobalSession->host().GetDVDDrives(); 79 comMedia << gpGlobalSession->virtualBox().GetDVDImages(); 79 80 uiCommon().enumerateMedia(comMedia); 80 81 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMediumSizeEditor.cpp
r103320 r103771 34 34 /* GUI includes: */ 35 35 #include "QILineEdit.h" 36 #include "UICommon.h"37 36 #include "UIConverter.h" 37 #include "UIGlobalSession.h" 38 38 #include "UIMediumSizeEditor.h" 39 39 #include "UITranslator.h" … … 48 48 : QIWithRetranslateUI<QWidget>(pParent) 49 49 , m_uSizeMin(uMinimumSize) 50 , m_uSizeMax( uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize())50 , m_uSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize()) 51 51 , m_iSliderScale(calculateSliderScale(m_uSizeMax)) 52 52 , m_uSize(0) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.cpp
r99389 r103771 28 28 /* GUI includes: */ 29 29 #include "UICommon.h" 30 #include "UIGlobalSession.h" 30 31 #include "UIMedium.h" 31 32 #include "UINotificationCenter.h" … … 77 78 78 79 /* Get VBox object: */ 79 CVirtualBox comVBox = uiCommon().virtualBox();80 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 80 81 81 82 /* Create new virtual disk image: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.cpp
r101035 r103771 28 28 /* GUI includes: */ 29 29 #include "UICommon.h" 30 #include "UIGlobalSession.h" 30 31 #include "UINotificationCenter.h" 31 32 #include "UIWizardCloneVM.h" … … 188 189 189 190 /* Get VBox object: */ 190 CVirtualBox comVBox = uiCommon().virtualBox();191 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 191 192 /* Create a new machine object: */ 192 193 CMachine cloneMachine = comVBox.CreateMachine(m_strCloneFilePath, m_strCloneName, KPlatformArchitecture_x86, … … 244 245 void UIWizardCloneVM::populatePages() 245 246 { 246 QString strDefaultMachineFolder = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();247 QString strDefaultMachineFolder = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder(); 247 248 /* Create corresponding pages: */ 248 249 switch (mode()) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMNamePathPage.cpp
r98103 r103771 32 32 /* GUI includes: */ 33 33 #include "QIRichTextLabel.h" 34 #include "UIGlobalSession.h" 34 35 #include "UIWizardCloneVM.h" 35 36 #include "UIWizardCloneVMNamePathPage.h" 36 #include "UICommon.h"37 37 38 38 /* COM includes: */ … … 41 41 QString UIWizardCloneVMNamePathCommon::composeCloneFilePath(const QString &strCloneName, const QString &strGroup, const QString &strFolderPath) 42 42 { 43 CVirtualBox vbox = uiCommon().virtualBox();43 CVirtualBox vbox = gpGlobalSession->virtualBox(); 44 44 return QDir::toNativeSeparators(vbox.ComposeMachineFilename(strCloneName, strGroup, QString(), strFolderPath)); 45 45 } -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardCloneVMEditors.cpp
r101563 r103771 37 37 /* GUI includes: */ 38 38 #include "QILineEdit.h" 39 #include "UICommon.h"40 39 #include "UIFilePathSelector.h" 40 #include "UIGlobalSession.h" 41 41 #include "UIWizardCloneVM.h" 42 42 #include "UIWizardCloneVMEditors.h" … … 81 81 if (!fInvalidName) 82 82 { 83 CVirtualBox vbox = uiCommon().virtualBox();83 CVirtualBox vbox = gpGlobalSession->virtualBox(); 84 84 QString strCloneFilePath = 85 85 vbox.ComposeMachineFilename(m_pNameLineEdit->text(), strMachineGroup, QString(), m_pPathSelector->path()); … … 289 289 290 290 /* Load currently supported clone options: */ 291 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();291 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 292 292 const QVector<KCloneOptions> supportedOptions = comProperties.GetSupportedCloneOptions(); 293 293 /* Check whether we support additional clone options at all: */ … … 403 403 404 404 /* Load currently supported clone options: */ 405 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();405 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 406 406 const QVector<KCloneOptions> supportedOptions = comProperties.GetSupportedCloneOptions(); 407 407 … … 465 465 466 466 /* Load currently supported clone options: */ 467 CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();467 CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties(); 468 468 const QVector<KCloneOptions> supportedOptions = comProperties.GetSupportedCloneOptions(); 469 469 /* Check whether we support linked clone option at all: */ -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp
r101563 r103771 39 39 #include "QIToolButton.h" 40 40 #include "QIRichTextLabel.h" 41 #include "UICommon.h"42 41 #include "UIConverter.h" 43 42 #include "UIFilePathSelector.h" 43 #include "UIGlobalSession.h" 44 44 #include "UIHostnameDomainNameEditor.h" 45 45 #include "UIIconPool.h" … … 141 141 strChosenFilePath = QIFileDialog::getSaveFileName(folder.absoluteFilePath(strFileName), 142 142 strBackendsList, pParent, 143 UICommon::tr("Please choose a location for new virtual hard disk file"));143 QApplication::translate("UICommon", "Please choose a location for new virtual hard disk file")); 144 144 return strChosenFilePath; 145 145 } … … 481 481 void UIDiskFormatBase::populateFormats(){ 482 482 /* Enumerate medium formats in special order: */ 483 CSystemProperties properties = uiCommon().virtualBox().GetSystemProperties();483 CSystemProperties properties = gpGlobalSession->virtualBox().GetSystemProperties(); 484 484 const QVector<CMediumFormat> &formats = properties.GetMediumFormats(); 485 485 QMap<QString, CMediumFormat> vdi, preferred, others; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageFormat.cpp
r101563 r103771 45 45 #include "UIEmptyFilePathSelector.h" 46 46 #include "UIExtraDataManager.h" 47 #include "UIGlobalSession.h" 47 48 #include "UIIconPool.h" 48 49 #include "UINotificationCenter.h" … … 152 153 /* Load currently supported export options: */ 153 154 const QVector<KExportOptions> supportedOptions = 154 uiCommon().virtualBox().GetSystemProperties().GetSupportedExportOptions();155 gpGlobalSession->virtualBox().GetSystemProperties().GetSupportedExportOptions(); 155 156 /* Check which of supported options/policies are known: */ 156 157 QList<MACAddressExportPolicy> supportedPolicies; … … 342 343 343 344 /* Create appliance: */ 344 CVirtualBox comVBox = uiCommon().virtualBox();345 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 345 346 CAppliance comAppliance = comVBox.CreateAppliance(); 346 347 if (!comVBox.isOk()) … … 354 355 { 355 356 /* Get the machine with the uMachineId: */ 356 CVirtualBox comVBox = uiCommon().virtualBox();357 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 357 358 CMachine comMachine = comVBox.FindMachine(uMachineId.toString()); 358 359 if (!comVBox.isOk()) … … 536 537 537 538 /* Get the machine with the uMachineId: */ 538 CVirtualBox comVBox = uiCommon().virtualBox();539 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 539 540 CMachine comMachine = comVBox.FindMachine(uMachineId.toString()); 540 541 if (!comVBox.isOk()) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageVMs.cpp
r98103 r103771 33 33 #include "QIRichTextLabel.h" 34 34 #include "UICommon.h" 35 #include "UIGlobalSession.h" 35 36 #include "UIIconPool.h" 36 37 #include "UIMessageCenter.h" … … 86 87 { 87 88 /* Add all VM items into VM selector: */ 88 foreach (const CMachine &comMachine, uiCommon().virtualBox().GetMachines())89 foreach (const CMachine &comMachine, gpGlobalSession->virtualBox().GetMachines()) 89 90 { 90 91 QPixmap pixIcon; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp
r103549 r103771 40 40 #include "QIFileDialog.h" 41 41 #include "UICommon.h" 42 #include "UIGlobalSession.h" 42 43 #include "UINotificationCenter.h" 43 44 #include "UIWizardImportApp.h" … … 181 182 182 183 /* Create an appliance object: */ 183 CVirtualBox comVBox = uiCommon().virtualBox();184 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 184 185 CAppliance comAppliance = comVBox.CreateAppliance(); 185 186 if (!comVBox.isOk()) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp
r101563 r103771 46 46 #include "UIFilePathSelector.h" 47 47 #include "UIFormEditorWidget.h" 48 #include "UIGlobalSession.h" 48 49 #include "UIIconPool.h" 49 50 #include "UINotificationCenter.h" … … 245 246 { 246 247 m_pEditorImportFilePath->setResetEnabled(true); 247 m_pEditorImportFilePath->setDefaultPath( uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder());248 m_pEditorImportFilePath->setPath( uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder());248 m_pEditorImportFilePath->setDefaultPath(gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder()); 249 m_pEditorImportFilePath->setPath(gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder()); 249 250 m_pLabelImportFilePath->setBuddy(m_pEditorImportFilePath); 250 251 pLayoutAppliance->addWidget(m_pEditorImportFilePath, 1, 1, 1, 2); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSettings.cpp
r101563 r103771 37 37 #include "UIApplianceImportEditorWidget.h" 38 38 #include "UIApplianceUnverifiedCertificateViewer.h" 39 #include "UICommon.h"40 39 #include "UIFilePathSelector.h" 41 40 #include "UIFormEditorWidget.h" 41 #include "UIGlobalSession.h" 42 42 #include "UINotificationCenter.h" 43 43 #include "UIWizardImportApp.h" … … 121 121 /* Load currently supported import options: */ 122 122 const QVector<KImportOptions> supportedOptions = 123 uiCommon().virtualBox().GetSystemProperties().GetSupportedImportOptions();123 gpGlobalSession->virtualBox().GetSystemProperties().GetSupportedImportOptions(); 124 124 /* Check which of supported options/policies are known: */ 125 125 QList<MACAddressImportPolicy> supportedPolicies; … … 362 362 { 363 363 m_pEditorImportFilePath->setResetEnabled(true); 364 m_pEditorImportFilePath->setDefaultPath( uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder());365 m_pEditorImportFilePath->setPath( uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder());364 m_pEditorImportFilePath->setDefaultPath(gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder()); 365 m_pEditorImportFilePath->setPath(gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder()); 366 366 m_pLabelImportFilePath->setBuddy(m_pEditorImportFilePath); 367 367 pLayoutAppliance->addWidget(m_pEditorImportFilePath, 1, 1, 1, 2); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.cpp
r103549 r103771 41 41 #include "UIEmptyFilePathSelector.h" 42 42 #include "UIExtraDataManager.h" 43 #include "UIGlobalSession.h" 43 44 #include "UIIconPool.h" 44 45 #include "UINotificationCenter.h" … … 360 361 361 362 /* Create appliance: */ 362 CVirtualBox comVBox = uiCommon().virtualBox();363 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 363 364 CAppliance comAppliance = comVBox.CreateAppliance(); 364 365 if (!comVBox.isOk()) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp
r101383 r103771 28 28 /* GUI includes: */ 29 29 #include "UICommon.h" 30 #include "UIGlobalSession.h" 30 31 #include "UIModalWindowManager.h" 31 32 #include "UINotificationCenter.h" … … 135 136 136 137 /* Get VBox object: */ 137 CVirtualBox comVBox = uiCommon().virtualBox();138 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 138 139 139 140 /* Create new virtual disk image: */ … … 187 188 188 189 /* Default size: */ 189 const CGuestOSType comGuestOSType = uiCommon().virtualBox().GetGuestOSType( !strMachineGuestOSTypeId.isEmpty()190 const CGuestOSType comGuestOSType = gpGlobalSession->virtualBox().GetGuestOSType( !strMachineGuestOSTypeId.isEmpty() 190 191 ? strMachineGuestOSTypeId 191 192 : "Other"); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDExpertPage.cpp
r98103 r103771 34 34 #include "UIWizardNewVDExpertPage.h" 35 35 #include "UIWizardNewVD.h" 36 #include "UI Common.h"36 #include "UIGlobalSession.h" 37 37 #include "UINotificationCenter.h" 38 38 … … 50 50 , m_uDefaultSize(uDefaultSize) 51 51 , m_uMediumSizeMin(_4M) 52 , m_uMediumSizeMax( uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize())52 , m_uMediumSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize()) 53 53 { 54 54 prepare(); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDSizeLocationPage.cpp
r98103 r103771 33 33 #include "UIWizardNewVDSizeLocationPage.h" 34 34 #include "UIWizardNewVD.h" 35 #include "UI Common.h"35 #include "UIGlobalSession.h" 36 36 #include "UINotificationCenter.h" 37 37 #include "UIWizardDiskEditors.h" … … 44 44 : m_pMediumSizePathGroup(0) 45 45 , m_uMediumSizeMin(_4M) 46 , m_uMediumSizeMax( uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize())46 , m_uMediumSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize()) 47 47 , m_strDefaultName(strDefaultName.isEmpty() ? QString("NewVirtualDisk1") : strDefaultName) 48 48 , m_strDefaultPath(strDefaultPath) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r102535 r103771 32 32 /* GUI includes: */ 33 33 #include "UICommon.h" 34 #include "UIGlobalSession.h" 34 35 #include "UIGuestOSType.h" 35 36 #include "UIMedium.h" … … 96 97 97 98 /* Create installer: */ 98 m_comUnattended = uiCommon().virtualBox().CreateUnattendedInstaller();99 m_comUnattended = gpGlobalSession->virtualBox().CreateUnattendedInstaller(); 99 100 AssertMsg(!m_comUnattended.isNull(), ("Could not create unattended installer!\n")); 100 101 } … … 146 147 bool UIWizardNewVM::createVM() 147 148 { 148 CVirtualBox vbox = uiCommon().virtualBox();149 CVirtualBox vbox = gpGlobalSession->virtualBox(); 149 150 150 151 /* Create virtual machine: */ … … 222 223 223 224 /* Acquire VBox: */ 224 CVirtualBox comVBox = uiCommon().virtualBox();225 CVirtualBox comVBox = gpGlobalSession->virtualBox(); 225 226 226 227 /* Create new virtual hard-disk: */ … … 281 282 if (!m_virtualDisk.isNull()) 282 283 { 283 KStorageBus enmHDDBus = uiCommon().guestOSTypeManager().getRecommendedHDStorageBus(m_guestOSTypeId);284 KStorageBus enmHDDBus = gpGlobalSession->guestOSTypeManager().getRecommendedHDStorageBus(m_guestOSTypeId); 284 285 CStorageController comHDDController = m_machine.GetStorageControllerByInstance(enmHDDBus, 0); 285 286 if (!comHDDController.isNull()) … … 293 294 294 295 /* Attach optical drive: */ 295 KStorageBus enmDVDBus = uiCommon().guestOSTypeManager().getRecommendedDVDStorageBus(m_guestOSTypeId);296 KStorageBus enmDVDBus = gpGlobalSession->guestOSTypeManager().getRecommendedDVDStorageBus(m_guestOSTypeId); 296 297 CStorageController comDVDController = m_machine.GetStorageControllerByInstance(enmDVDBus, 0); 297 298 if (!comDVDController.isNull()) … … 301 302 if (!strISOFilePath.isEmpty() && !isUnattendedEnabled()) 302 303 { 303 CVirtualBox vbox = uiCommon().virtualBox();304 CVirtualBox vbox = gpGlobalSession->virtualBox(); 304 305 opticalDisk = 305 306 vbox.OpenMedium(strISOFilePath, KDeviceType_DVD, KAccessMode_ReadWrite, false); … … 314 315 315 316 /* Attach an empty floppy drive if recommended */ 316 if ( uiCommon().guestOSTypeManager().getRecommendedFloppy(m_guestOSTypeId))317 if (gpGlobalSession->guestOSTypeManager().getRecommendedFloppy(m_guestOSTypeId)) 317 318 { 318 319 CStorageController comFloppyController = m_machine.GetStorageControllerByInstance(KStorageBus_Floppy, 0); … … 791 792 QString UIWizardNewVM::getGuestOSTypeDescription() const 792 793 { 793 return uiCommon().guestOSTypeManager().getDescription(m_guestOSTypeId);794 return gpGlobalSession->guestOSTypeManager().getDescription(m_guestOSTypeId); 794 795 } 795 796 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPage.cpp
r101563 r103771 41 41 #include "UIMediumSelector.h" 42 42 #include "UIMediumSizeEditor.h" 43 #include "UI Common.h"43 #include "UIGlobalSession.h" 44 44 #include "UIWizardNewVMDiskPage.h" 45 45 #include "UIWizardDiskEditors.h" … … 84 84 , m_fVDIFormatFound(false) 85 85 , m_uMediumSizeMin(_4M) 86 , m_uMediumSizeMax( uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize())86 , m_uMediumSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize()) 87 87 , m_pActionPool(pActionPool) 88 88 { … … 268 268 if (!m_userModifiedParameters.contains("SelectedDiskSource")) 269 269 { 270 iRecommendedSize = uiCommon().guestOSTypeManager().getRecommendedHDD(pWizard->guestOSTypeId());270 iRecommendedSize = gpGlobalSession->guestOSTypeManager().getRecommendedHDD(pWizard->guestOSTypeId()); 271 271 if (iRecommendedSize != 0) 272 272 { … … 299 299 { 300 300 /* We do not have any UI elements for HDD format selection since we default to VDI in case of guided wizard mode: */ 301 CSystemProperties properties = uiCommon().virtualBox().GetSystemProperties();301 CSystemProperties properties = gpGlobalSession->virtualBox().GetSystemProperties(); 302 302 const QVector<CMediumFormat> &formats = properties.GetMediumFormats(); 303 303 foreach (const CMediumFormat &format, formats) -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp
r101563 r103771 33 33 34 34 /* GUI includes: */ 35 #include "QIToolButton.h" 35 36 #include "UICommon.h" 36 #include "QIToolButton.h"37 37 #include "UIIconPool.h" 38 #include "UIGlobalSession.h" 38 39 #include "UIMediaComboBox.h" 39 40 #include "UIMedium.h" … … 71 72 , m_fRecommendedNoDisk(false) 72 73 , m_uMediumSizeMin(_4M) 73 , m_uMediumSizeMax( uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize())74 , m_uMediumSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize()) 74 75 , m_pActionPool(pActionPool) 75 76 { … … 347 348 QString strTypeId = pWizard->guestOSTypeId(); 348 349 /* Get recommended 'ram' field value: */ 349 ULONG recommendedRam = uiCommon().guestOSTypeManager().getRecommendedRAM(strTypeId);350 ULONG recommendedRam = gpGlobalSession->guestOSTypeManager().getRecommendedRAM(strTypeId); 350 351 351 352 if (m_pHardwareWidgetContainer) … … 361 362 362 363 /* Set Firmware Type of the widget and the wizard: */ 363 KFirmwareType fwType = uiCommon().guestOSTypeManager().getRecommendedFirmware(strTypeId);364 KFirmwareType fwType = gpGlobalSession->guestOSTypeManager().getRecommendedFirmware(strTypeId); 364 365 if (!m_userModifiedParameters.contains("EFIEnabled")) 365 366 { … … 369 370 370 371 /* Initialize CPU count:*/ 371 int iCPUCount = uiCommon().guestOSTypeManager().getRecommendedCPUCount(strTypeId);372 int iCPUCount = gpGlobalSession->guestOSTypeManager().getRecommendedCPUCount(strTypeId); 372 373 if (!m_userModifiedParameters.contains("CPUCount")) 373 374 { … … 378 379 } 379 380 380 LONG64 iRecommendedDiskSize = uiCommon().guestOSTypeManager().getRecommendedHDD(strTypeId);381 LONG64 iRecommendedDiskSize = gpGlobalSession->guestOSTypeManager().getRecommendedHDD(strTypeId); 381 382 /* Prepare initial disk choice: */ 382 383 if (!m_userModifiedParameters.contains("SelectedDiskSource")) … … 902 903 strMediumPath = m_pNameAndSystemEditor->path(); 903 904 else 904 strMediumPath = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();905 strMediumPath = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder(); 905 906 } 906 907 QString strExtension = UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMHardwarePage.cpp
r101316 r103771 32 32 #include "QIRichTextLabel.h" 33 33 #include "UIBaseMemoryEditor.h" 34 #include "UI Common.h"34 #include "UIGlobalSession.h" 35 35 #include "UIGuestOSType.h" 36 36 #include "UIVirtualCPUEditor.h" … … 96 96 if (!m_userModifiedParameters.contains("MemorySize")) 97 97 { 98 ULONG recommendedRam = uiCommon().guestOSTypeManager().getRecommendedRAM(strTypeId);98 ULONG recommendedRam = gpGlobalSession->guestOSTypeManager().getRecommendedRAM(strTypeId); 99 99 m_pHardwareWidgetContainer->setMemorySize(recommendedRam); 100 100 pWizard->setMemorySize(recommendedRam); … … 102 102 if (!m_userModifiedParameters.contains("CPUCount")) 103 103 { 104 ULONG recommendedCPUs = uiCommon().guestOSTypeManager().getRecommendedCPUCount(strTypeId);104 ULONG recommendedCPUs = gpGlobalSession->guestOSTypeManager().getRecommendedCPUCount(strTypeId); 105 105 m_pHardwareWidgetContainer->setCPUCount(recommendedCPUs); 106 106 pWizard->setCPUCount(recommendedCPUs); … … 108 108 if (!m_userModifiedParameters.contains("EFIEnabled")) 109 109 { 110 KFirmwareType fwType = uiCommon().guestOSTypeManager().getRecommendedFirmware(strTypeId);110 KFirmwareType fwType = gpGlobalSession->guestOSTypeManager().getRecommendedFirmware(strTypeId); 111 111 m_pHardwareWidgetContainer->setEFIEnabled(fwType != KFirmwareType_BIOS); 112 112 pWizard->setEFIEnabled(fwType != KFirmwareType_BIOS); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp
r103121 r103771 37 37 #include "UICommon.h" 38 38 #include "UIDesktopWidgetWatchdog.h" 39 #include "UIGlobalSession.h" 39 40 #include "UIIconPool.h" 40 41 #include "UINameAndSystemEditor.h" … … 329 330 return; 330 331 /* Get VBox: */ 331 CVirtualBox vbox = uiCommon().virtualBox();332 CVirtualBox vbox = gpGlobalSession->virtualBox(); 332 333 333 334 /* Compose machine filename: */ … … 554 555 else if (!pWizard->detectedOSTypeId().isEmpty()) 555 556 { 556 QString strType = uiCommon().guestOSTypeManager().getDescription(pWizard->detectedOSTypeId());557 QString strType = gpGlobalSession->guestOSTypeManager().getDescription(pWizard->detectedOSTypeId()); 557 558 if (!pWizard->isUnattendedInstallSupported()) 558 559 strMessage = UIWizardNewVM::tr("Detected OS type: %1. %2") -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMSummaryPage.cpp
r103650 r103771 35 35 #include "QIRichTextLabel.h" 36 36 #include "QITreeView.h" 37 #include "UICommon.h" 37 #include "UIGlobalSession.h" 38 #include "UIGuestOSType.h" 38 39 #include "UIIconPool.h" 39 #include "UIGuestOSType.h"40 40 #include "UIMessageCenter.h" 41 41 #include "UINotificationCenter.h" … … 356 356 pNameRoot->addChild(UIWizardNewVM::tr("Machine Folder"), pWizard->machineFolder()); 357 357 pNameRoot->addChild(UIWizardNewVM::tr("ISO Image"), pWizard->ISOFilePath()); 358 pNameRoot->addChild(UIWizardNewVM::tr("Guest OS Type"), uiCommon().guestOSTypeManager().getDescription(pWizard->guestOSTypeId()));358 pNameRoot->addChild(UIWizardNewVM::tr("Guest OS Type"), gpGlobalSession->guestOSTypeManager().getDescription(pWizard->guestOSTypeId())); 359 359 360 360 const QString &ISOPath = pWizard->ISOFilePath();
Note:
See TracChangeset
for help on using the changeset viewer.