VirtualBox

Changeset 103771 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Mar 11, 2024 3:16:04 PM (9 months ago)
Author:
vboxsync
Message:

FE/Qt: UICommon: Switching dependency from UICommon to UIGlobalSession whenever is possible.

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  
    5050#include "UIExtraDataDefs.h"
    5151#include "UIExtraDataManager.h"
     52#include "UIGlobalSession.h"
    5253#include "UIIconPool.h"
    5354#include "UIMessageCenter.h"
     
    15131514void UIActivityOverviewModel::initializeItems()
    15141515{
    1515     foreach (const CMachine &comMachine, uiCommon().virtualBox().GetMachines())
     1516    foreach (const CMachine &comMachine, gpGlobalSession->virtualBox().GetMachines())
    15161517    {
    15171518        if (!comMachine.isNull())
     
    15401541    if (fRegistered)
    15411542    {
    1542         CMachine comMachine = uiCommon().virtualBox().FindMachine(uId.toString());
     1543        CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(uId.toString());
    15431544        if (!comMachine.isNull())
    15441545            addItem(uId, comMachine.GetName(), comMachine.GetState());
     
    15511552void UIActivityOverviewModel::getHostRAMStats()
    15521553{
    1553     CHost comHost = uiCommon().host();
     1554    CHost comHost = gpGlobalSession->host();
    15541555    m_hostStats.m_iRAMTotal = _1M * (quint64)comHost.GetMemorySize();
    15551556    m_hostStats.m_iRAMFree = _1M * (quint64)comHost.GetMemoryAvailable();
     
    15911592    const int iMetricSetupCount = 1;
    15921593    if (m_performanceCollector.isNull())
    1593         m_performanceCollector = uiCommon().virtualBox().GetPerformanceCollector();
     1594        m_performanceCollector = gpGlobalSession->virtualBox().GetPerformanceCollector();
    15941595    for (int i = 0; i < m_itemList.size(); ++i)
    15951596        m_nameList << "Guest/RAM/Usage*";
  • trunk/src/VBox/Frontends/VirtualBox/src/activity/overview/UIVMActivityToolWidget.cpp

    r102264 r103771  
    3232/* GUI includes: */
    3333#include "UIActionPoolManager.h"
    34 #include "UICommon.h"
     34#include "UIGlobalSession.h"
    3535#include "UIVMActivityMonitor.h"
    3636#include "UIVMActivityToolWidget.h"
     
    228228    if (pActivityMonitor)
    229229    {
    230         CMachine comMachine = uiCommon().virtualBox().FindMachine(pActivityMonitor->machineId().toString());
     230        CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(pActivityMonitor->machineId().toString());
    231231        if (!comMachine.isNull())
    232232        {
  • trunk/src/VBox/Frontends/VirtualBox/src/activity/vmactivity/UIVMActivityMonitor.cpp

    r103711 r103771  
    4343#include "UICommon.h"
    4444#include "UIConverter.h"
     45#include "UIGlobalSession.h"
    4546#include "UIIconPool.h"
    4647#include "UITranslator.h"
     
    14671468void UIVMActivityMonitorLocal::prepareMetrics()
    14681469{
    1469     m_performanceCollector = uiCommon().virtualBox().GetPerformanceCollector();
     1470    m_performanceCollector = gpGlobalSession->virtualBox().GetPerformanceCollector();
    14701471    if (m_performanceCollector.isNull())
    14711472        return;
     
    20002001    if (RT_SUCCESS(rc))
    20012002        return QString(szPath);
    2002     return uiCommon().virtualBox().GetHomeFolder();
     2003    return gpGlobalSession->virtualBox().GetHomeFolder();
    20032004}
    20042005
  • trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp

    r103362 r103771  
    3232
    3333/* GUI includes: */
    34 #include "UICommon.h"
    3534#include "UIConverter.h"
     35#include "UIDefs.h"
    3636#include "UIExtraDataDefs.h"
     37#include "UIGlobalSession.h"
    3738#include "UIIconPool.h"
     39#include "UIMediumDefs.h"
    3840#include "UISettingsDefs.h"
    3941#include "UITranslator.h"
     
    149151        case KStorageBus_IDE:
    150152        {
    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);
    153155            if (storageSlot.port < 0 || storageSlot.port > iMaxPort)
    154156            {
     
    173175        case KStorageBus_SATA:
    174176        {
    175             int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);
     177            int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);
    176178            if (storageSlot.port < 0 || storageSlot.port > iMaxPort)
    177179            {
     
    189191        case KStorageBus_SCSI:
    190192        {
    191             int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);
     193            int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);
    192194            if (storageSlot.port < 0 || storageSlot.port > iMaxPort)
    193195            {
     
    205207        case KStorageBus_SAS:
    206208        {
    207             int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);
     209            int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);
    208210            if (storageSlot.port < 0 || storageSlot.port > iMaxPort)
    209211            {
     
    221223        case KStorageBus_Floppy:
    222224        {
    223             int iMaxDevice = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxDevicesPerPortForStorageBus(storageSlot.bus);
     225            int iMaxDevice = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxDevicesPerPortForStorageBus(storageSlot.bus);
    224226            if (storageSlot.port != 0)
    225227            {
     
    237239        case KStorageBus_USB:
    238240        {
    239             int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);
     241            int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);
    240242            if (storageSlot.port < 0 || storageSlot.port > iMaxPort)
    241243            {
     
    253255        case KStorageBus_PCIe:
    254256        {
    255             int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);
     257            int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);
    256258            if (storageSlot.port < 0 || storageSlot.port > iMaxPort)
    257259            {
     
    269271        case KStorageBus_VirtioSCSI:
    270272        {
    271             int iMaxPort = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);
     273            int iMaxPort = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86).GetMaxPortCountForStorageBus(storageSlot.bus);
    272274            if (storageSlot.port < 0 || storageSlot.port > iMaxPort)
    273275            {
     
    354356            if (result.bus == KStorageBus_Null)
    355357                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);
    358360            const LONG iPort = iIndex / iMaxPort;
    359361            const LONG iDevice = iIndex % iMaxPort;
     
    382384            if (result.bus == KStorageBus_Null)
    383385                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);
    385387            const LONG iPort = mt.captured(1).toInt();
    386388            const LONG iDevice = 0;
  • trunk/src/VBox/Frontends/VirtualBox/src/extensionpackmanager/UIExtensionPackManager.cpp

    r103578 r103771  
    4242#include "UIExtensionPackManager.h"
    4343#include "UIExtraDataManager.h"
     44#include "UIGlobalSession.h"
    4445#include "UIIconPool.h"
    4546#include "UIMessageCenter.h"
     
    250251        {
    251252            /* Get VirtualBox for further activities: */
    252             const CVirtualBox comVBox = uiCommon().virtualBox();
     253            const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    253254            /* Get Extension Pack Manager for further activities: */
    254255            CExtPackManager comEPManager = comVBox.GetExtensionPackManager();
     
    345346
    346347    /* [Re]insert it into the tree: */
    347     CExtPackManager comManager = uiCommon().virtualBox().GetExtensionPackManager();
     348    CExtPackManager comManager = gpGlobalSession->virtualBox().GetExtensionPackManager();
    348349    const CExtPack comExtensionPack = comManager.Find(strName);
    349350    if (comExtensionPack.isOk())
     
    499500
    500501    /* Get VirtualBox for further activities: */
    501     const CVirtualBox comVBox = uiCommon().virtualBox();
     502    const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    502503    /* Get Extension Pack Manager for further activities: */
    503504    const CExtPackManager comEPManager = comVBox.GetExtensionPackManager();
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r103551 r103771  
    5757#include "UIDesktopWidgetWatchdog.h"
    5858#include "UIExtraDataManager.h"
     59#include "UIGlobalSession.h"
    5960#include "UIHostComboEditor.h"
    6061#include "UILoggingDefs.h"
     
    176177
    177178    /* Get VirtualBox: */
    178     const CVirtualBox comVBox = uiCommon().virtualBox();
     179    const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    179180    /* Get VirtualBox event source: */
    180181    CEventSource comEventSourceVBox = comVBox.GetEventSource();
     
    217218
    218219    /* Make sure VBoxSVC is available: */
    219     if (!uiCommon().isVBoxSVCAvailable())
     220    if (!gpGlobalSession->isVBoxSVCAvailable())
    220221        return;
    221222
    222223    /* Get VirtualBox: */
    223     const CVirtualBox comVBox = uiCommon().virtualBox();
     224    const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    224225    /* Get VirtualBox event source: */
    225226    CEventSource comEventSourceVBox = comVBox.GetEventSource();
     
    762763
    763764        /* Get machine items: */
    764         const CMachineVector machines = uiCommon().virtualBox().GetMachines();
     765        const CMachineVector machines = gpGlobalSession->virtualBox().GetMachines();
    765766        /* Look for the proper place to insert new machine item: */
    766767        QUuid uPositionID = UIExtraDataManager::GlobalID;
     
    11831184
    11841185    /* 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()));
    11861187    /* Open file-save dialog to choose file to save extra-data into: */
    11871188    const QString strFileName = QIFileDialog::getSaveFileName(strInitialFileName, "XML files (*.xml)", this,
     
    12701271
    12711272    /* 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()));
    12731274    /* Open file-open dialog to choose file to open extra-data into: */
    12741275    const QString strFileName = QIFileDialog::getOpenFileName(strInitialFileName, "XML files (*.xml)", this,
     
    15941595                    addChooserItemByID(UIExtraDataManager::GlobalID);
    15951596                    /* Add machine chooser items into source-model: */
    1596                     CMachineVector machines = uiCommon().virtualBox().GetMachines();
     1597                    CMachineVector machines = gpGlobalSession->virtualBox().GetMachines();
    15971598                    foreach (const CMachine &machine, machines)
    15981599                        addChooserItemByMachine(machine);
     
    18251826
    18261827    /* Search for the corresponding machine by ID: */
    1827     CVirtualBox vbox = uiCommon().virtualBox();
     1828    CVirtualBox vbox = gpGlobalSession->virtualBox();
    18281829    const CMachine machine = vbox.FindMachine(uID.toString());
    18291830    /* Make sure VM is accessible: */
     
    20632064
    20642065    /* Search for corresponding machine: */
    2065     CVirtualBox vbox = uiCommon().virtualBox();
     2066    CVirtualBox vbox = gpGlobalSession->virtualBox();
    20662067    CMachine machine = vbox.FindMachine(uID.toString());
    20672068    if (machine.isNull())
     
    21082109{
    21092110    /* Make sure VBoxSVC is available: */
    2110     if (!uiCommon().isVBoxSVCAvailable())
     2111    if (!gpGlobalSession->isVBoxSVCAvailable())
    21112112        return;
    21122113
     
    21252126    {
    21262127        /* Get global object: */
    2127         CVirtualBox comVBox = uiCommon().virtualBox();
     2128        CVirtualBox comVBox = gpGlobalSession->virtualBox();
    21282129        /* Update global extra-data: */
    21292130        comVBox.SetExtraData(strKey, strValue);
     
    21452146    {
    21462147        /* Search for corresponding machine: */
    2147         CVirtualBox comVBox = uiCommon().virtualBox();
     2148        CVirtualBox comVBox = gpGlobalSession->virtualBox();
    21482149        const CMachine comMachine = comVBox.FindMachine(uID.toString());
    21492150        AssertReturnVoid(comVBox.isOk() && !comMachine.isNull());
     
    22092210{
    22102211    /* Make sure VBoxSVC is available: */
    2211     if (!uiCommon().isVBoxSVCAvailable())
     2212    if (!gpGlobalSession->isVBoxSVCAvailable())
    22122213        return;
    22132214
     
    22262227    {
    22272228        /* Get global object: */
    2228         CVirtualBox comVBox = uiCommon().virtualBox();
     2229        CVirtualBox comVBox = gpGlobalSession->virtualBox();
    22292230        /* Update global extra-data: */
    22302231        comVBox.SetExtraDataStringList(strKey, value);
     
    22462247    {
    22472248        /* Search for corresponding machine: */
    2248         CVirtualBox comVBox = uiCommon().virtualBox();
     2249        CVirtualBox comVBox = gpGlobalSession->virtualBox();
    22492250        const CMachine comMachine = comVBox.FindMachine(uID.toString());
    22502251        AssertReturnVoid(comVBox.isOk() && !comMachine.isNull());
     
    49614962{
    49624963    /* Get CVirtualBox: */
    4963     CVirtualBox vbox = uiCommon().virtualBox();
     4964    CVirtualBox vbox = gpGlobalSession->virtualBox();
    49644965
    49654966    /* Make sure at least empty map is created: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPoolRuntime.cpp

    r103552 r103771  
    3535#include "UIDesktopWidgetWatchdog.h"
    3636#include "UIExtraDataManager.h"
     37#include "UIGlobalSession.h"
    3738#include "UIIconPool.h"
    3839#include "UIShortcutPool.h"
     
    35023503
    35033504    /* Recache extension-pack related action restrictions: */
    3504     CExtPackManager extPackManager = uiCommon().virtualBox().GetExtensionPackManager();
     3505    CExtPackManager extPackManager = gpGlobalSession->virtualBox().GetExtensionPackManager();
    35053506    if (extPackManager.isNull() || !extPackManager.IsExtPackUsable(GUI_ExtPackName))
    35063507    {
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICloudNetworkingStuff.cpp

    r100861 r103771  
    2828/* GUI includes: */
    2929#include "UICloudNetworkingStuff.h"
    30 #include "UICommon.h"
    3130#include "UIErrorString.h"
     31#include "UIGlobalSession.h"
    3232#include "UIMessageCenter.h"
    3333
     
    4545{
    4646    /* Acquire VBox: */
    47     const CVirtualBox comVBox = uiCommon().virtualBox();
     47    const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    4848    if (comVBox.isNotNull())
    4949    {
     
    6262{
    6363    /* Acquire VBox: */
    64     const CVirtualBox comVBox = uiCommon().virtualBox();
     64    const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    6565    if (comVBox.isNotNull())
    6666    {
     
    203203{
    204204    /* Acquire VBox: */
    205     CVirtualBox comVBox = uiCommon().virtualBox();
     205    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    206206    if (comVBox.isNotNull())
    207207    {
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp

    r103765 r103771  
    12021202            {
    12031203                /* So that we could run existing VMs: */
    1204                 CVirtualBox comVBox = virtualBox();
     1204                CVirtualBox comVBox = gpGlobalSession->virtualBox();
    12051205                CMachine comMachine = comVBox.FindMachine(strFile);
    12061206                if (!comMachine.isNull())
     
    12961296
    12971297#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() const
    1310 {
    1311     return gpGlobalSession->virtualBoxClient();
    1312 }
    1313 
    1314 CVirtualBox UICommon::virtualBox() const
    1315 {
    1316     return gpGlobalSession->virtualBox();
    1317 }
    1318 
    1319 CHost UICommon::host() const
    1320 {
    1321     return gpGlobalSession->host();
    1322 }
    1323 
    1324 QString UICommon::homeFolder() const
    1325 {
    1326     return gpGlobalSession->homeFolder();
    1327 }
    1328 
    1329 bool UICommon::isVBoxSVCAvailable() const
    1330 {
    1331     return gpGlobalSession->isVBoxSVCAvailable();
    1332 }
    13331298
    13341299/* static */
     
    16031568}
    16041569
    1605 const UIGuestOSTypeManager &UICommon::guestOSTypeManager() const
    1606 {
    1607     return gpGlobalSession->guestOSTypeManager();
    1608 }
    1609 
    16101570void UICommon::enumerateMedia(const CMediumVector &comMedia /* = CMediumVector() */)
    16111571{
     
    17141674
    17151675    /* Initialize variables: */
    1716     CVirtualBox comVBox = virtualBox();
     1676    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    17171677
    17181678    /* Open corresponding medium: */
     
    17621722        case UIMediumDeviceType_HardDisk:
    17631723        {
    1764             filters = HDDBackends(virtualBox());
     1724            filters = HDDBackends(gpGlobalSession->virtualBox());
    17651725            strTitle = tr("Please choose a virtual hard disk file");
    17661726            allType = tr("All virtual hard disk files (%1)");
     
    17691729        case UIMediumDeviceType_DVD:
    17701730        {
    1771             filters = DVDBackends(virtualBox());
     1731            filters = DVDBackends(gpGlobalSession->virtualBox());
    17721732            strTitle = tr("Please choose a virtual optical disk file");
    17731733            allType = tr("All virtual optical disk files (%1)");
     
    17761736        case UIMediumDeviceType_Floppy:
    17771737        {
    1778             filters = FloppyBackends(virtualBox());
     1738            filters = FloppyBackends(gpGlobalSession->virtualBox());
    17791739            strTitle = tr("Please choose a virtual floppy disk file");
    17801740            allType = tr("All virtual floppy disk files (%1)");
     
    17851745    }
    17861746    QString strHomeFolder = fUseLastFolder && !strLastFolder.isEmpty() ? strLastFolder :
    1787                             strDefaultFolder.isEmpty() ? homeFolder() : strDefaultFolder;
     1747                            strDefaultFolder.isEmpty() ? gpGlobalSession->homeFolder() : strDefaultFolder;
    17881748
    17891749    /* Prepare filters and backends: */
     
    18901850    switch (enmMediumType)
    18911851    {
    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;
    18941854        default: break;
    18951855    }
     
    22962256
    22972257    if (strLastFolder.isEmpty())
    2298         return virtualBox().GetSystemProperties().GetDefaultMachineFolder();
     2258        return gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder();
    22992259
    23002260    return strLastFolder;
     
    25232483{
    25242484    int iSupportedFlag = 0;
    2525     CSystemProperties comProperties = virtualBox().GetSystemProperties();
     2485    CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    25262486    foreach (const KRecordingFeature &enmFeature, comProperties.GetSupportedRecordingFeatures())
    25272487        iSupportedFlag |= enmFeature;
     
    27222682KGraphicsControllerType UICommon::getRecommendedGraphicsController(const QString &strGuestOSTypeId) const
    27232683{
    2724     return guestOSTypeManager().getRecommendedGraphicsController(strGuestOSTypeId);
     2684    return gpGlobalSession->guestOSTypeManager().getRecommendedGraphicsController(strGuestOSTypeId);
    27252685}
    27262686
     
    27422702bool UICommon::isExtentionPackInstalled() const
    27432703{
    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())
    27472708        return false;
    27482709
     
    28812842{
    28822843    /* Register created machine. */
    2883     CVirtualBox comVBox = virtualBox();
     2844    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    28842845    comVBox.RegisterMachine(comMachine);
    28852846    if (!comVBox.isOk())
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.h

    r103765 r103771  
    4545
    4646/* COM includes: */
    47 #include "CHost.h"
    4847#include "CMedium.h"
    4948#include "CSession.h"
    50 #include "CVirtualBox.h"
    51 #include "CVirtualBoxClient.h"
    5249
    5350/* Forward declarations: */
     
    6057class CUSBDevice;
    6158class UIActionPool;
    62 class UIGuestOSTypeManager;
    6359class UIMedium;
    6460class UIMediumEnumerator;
     
    7874        /** Asks #UIStarter listener to close UI. */
    7975        void sigAskToCloseUI();
    80 
    81         /** Notifies listeners about the VBoxSVC availability change. */
    82         void sigVBoxSVCAvailabilityChange();
    8376
    8477        /** Asks listeners to commit data. */
     
    313306    /** @} */
    314307
    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 
    335308    /** @name COM: Virtual Machine stuff.
    336309     * @{ */
     
    368341                                          const QString &strProfileName,
    369342                                          const CCloudMachine &comMachine);
    370     /** @} */
    371 
    372     /** @name COM: Guest OS type stuff.
    373      * @{ */
    374         const UIGuestOSTypeManager &guestOSTypeManager() const;
    375343    /** @} */
    376344
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp

    r103481 r103771  
    3737#include "UIDetailsGenerator.h"
    3838#include "UIErrorString.h"
     39#include "UIGlobalSession.h"
    3940#include "UIGuestOSType.h"
    4041#include "UIMedium.h"
     
    124125                                     .arg(strAnchorType,
    125126                                          strOsTypeId,
    126                                           uiCommon().guestOSTypeManager().getDescription(strOsTypeId)));
     127                                          gpGlobalSession->guestOSTypeManager().getDescription(strOsTypeId)));
    127128    }
    128129
     
    392393                CPlatformX86 comPlatformX86 = comPlatform.GetX86();
    393394                QStringList acceleration;
    394                 if (uiCommon().virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx))
     395                if (gpGlobalSession->virtualBox().GetHost().GetProcessorFeature(KProcessorFeature_HWVirtEx))
    395396                {
    396397                    /* Nested Paging: */
     
    735736    const KPlatformArchitecture enmArch = comPlatform.GetArchitecture();
    736737    const KChipsetType enmChipsetType = comPlatform.GetChipsetType();
    737     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     738    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    738739    const ulong cMaxNetworkAdapters = comProperties.GetMaxNetworkAdapters(enmChipsetType);
    739740    for (ulong uSlot = 0; uSlot < cMaxNetworkAdapters; ++uSlot)
     
    903904    CPlatform comPlatform = comMachine.GetPlatform();
    904905    const KPlatformArchitecture enmArch = comPlatform.GetArchitecture();
    905     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     906    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    906907    const ulong cMaxSerialPorts = comProperties.GetSerialPortCount();
    907908    for (ulong uSlot = 0; uSlot < cMaxSerialPorts; ++uSlot)
     
    13181319    const KPlatformArchitecture enmArch = comPlatform.GetArchitecture();
    13191320    const KChipsetType enmChipsetType = comPlatform.GetChipsetType();
    1320     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     1321    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    13211322    const ulong cMaxNetworkAdapters = comProperties.GetMaxNetworkAdapters(enmChipsetType);
    13221323
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIExtension.cpp

    r99841 r103771  
    2929#include "UICommon.h"
    3030#include "UIExtension.h"
     31#include "UIGlobalSession.h"
    3132#include "UINotificationCenter.h"
    3233#include "UIMessageCenter.h"
     
    4344{
    4445    /* 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();
    4647    if (comExtPackManager.isNull())
    4748        return;
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIGuestOSType.cpp

    r103703 r103771  
    2828/* GUI includes: */
    2929#include "UICommon.h"
     30#include "UIGlobalSession.h"
    3031#include "UIGuestOSType.h"
    3132
     
    3940{
    4041    /* Acquire CVirtualBox: */
    41     CVirtualBox comVBox = uiCommon().virtualBox();
     42    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    4243
    4344    /* Acquire a total list of guest OS types, supported or not: */
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIIconPool.cpp

    r102102 r103771  
    3535
    3636/* GUI includes: */
    37 #include "UICommon.h"
    3837#include "UIIconPool.h"
    3938#include "UIExtraDataManager.h"
     39#include "UIGlobalSession.h"
    4040#include "UIGuestOSType.h"
    4141#include "UIModalWindowManager.h"
     
    785785QString UIIconPoolGeneral::determineOSArchString(const QString &strOSTypeId)
    786786{
    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);
    789789
    790790    if (enmPlatformArchitecture == KPlatformArchitecture_ARM)
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp

    r103538 r103771  
    3131
    3232/* GUI includes: */
    33 #include "UICommon.h"
     33#include "UIGlobalSession.h"
    3434#include "UILoggingDefs.h"
    3535#include "UIMainEventListener.h"
     
    276276{
    277277    /* Try to acquire COM cleanup protection token first: */
    278     if (!uiCommon().comTokenTryLockForRead())
     278    if (!gpGlobalSession->comTokenTryLockForRead())
    279279        return S_OK;
    280280
     
    645645
    646646    /* Unlock COM cleanup protection token: */
    647     uiCommon().comTokenUnlock();
     647    gpGlobalSession->comTokenUnlock();
    648648
    649649    return S_OK;
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp

    r103551 r103771  
    4444#include "UIErrorString.h"
    4545#include "UIExtraDataManager.h"
     46#include "UIGlobalSession.h"
    4647#include "UIHelpBrowserDialog.h"
    4748#include "UIHostComboEditor.h"
     
    12591260    /* Prepare the usage: */
    12601261    QStringList usage;
    1261     CVirtualBox vbox = uiCommon().virtualBox();
     1262    CVirtualBox vbox = gpGlobalSession->virtualBox();
    12621263    foreach (const QUuid &uMachineID, medium.curStateMachineIds())
    12631264    {
     
    20922093void UIMessageCenter::sltShowHelpAboutDialog()
    20932094{
    2094     CVirtualBox vbox = uiCommon().virtualBox();
     2095    CVirtualBox vbox = gpGlobalSession->virtualBox();
    20952096    const QString strFullVersion = uiCommon().brandingIsActive()
    20962097                                 ? QString("%1 r%2 - %3").arg(vbox.GetVersion())
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIProgressEventHandler.cpp

    r103537 r103771  
    2828/* GUI includes: */
    2929#include "UIExtraDataManager.h"
     30#include "UIGlobalSession.h"
    3031#include "UIMainEventListener.h"
    3132#include "UIProgressEventHandler.h"
    32 #include "UICommon.h"
    3333#ifdef VBOX_WS_MAC
    3434# include "VBoxUtils-darwin.h"
     
    108108
    109109    /* Make sure VBoxSVC is available: */
    110     if (!uiCommon().isVBoxSVCAvailable())
     110    if (!gpGlobalSession->isVBoxSVCAvailable())
    111111        return;
    112112
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIShortcutPool.cpp

    r103579 r103771  
    2727
    2828/* GUI includes: */
    29 #include "UICommon.h"
    3029#include "UIActionPool.h"
    3130#include "UIExtraDataManager.h"
     31#include "UIGlobalSession.h"
    3232#include "UIShortcutPool.h"
    3333
     
    446446    }
    447447    /* Save overrides into the extra-data: */
    448     uiCommon().virtualBox().SetExtraDataStringList(strPoolExtraDataID, overrides);
     448    gpGlobalSession->virtualBox().SetExtraDataStringList(strPoolExtraDataID, overrides);
    449449}
    450450
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIStarter.cpp

    r98926 r103771  
    3232#include "UICommon.h"
    3333#include "UIExtraDataManager.h"
     34#include "UIGlobalSession.h"
    3435#include "UIMessageCenter.h"
    3536#include "UINotificationCenter.h"
     
    8485#  ifndef DEBUG
    8586    /* Show BETA warning if necessary: */
    86     const QString vboxVersion(uiCommon().virtualBox().GetVersion());
     87    const QString vboxVersion(gpGlobalSession->virtualBox().GetVersion());
    8788    if (   vboxVersion.contains("BETA")
    8889        && gEDataManager->preventBetaBuildWarningForVersion() != vboxVersion)
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxClientEventHandler.cpp

    r103537 r103771  
    2727
    2828/* GUI includes: */
    29 #include "UICommon.h"
    3029#include "UIExtraDataManager.h"
     30#include "UIGlobalSession.h"
    3131#include "UIMainEventListener.h"
    3232#include "UIVirtualBoxClientEventHandler.h"
     
    118118
    119119    /* Get VirtualBoxClient: */
    120     const CVirtualBoxClient comVBoxClient = uiCommon().virtualBoxClient();
     120    const CVirtualBoxClient comVBoxClient = gpGlobalSession->virtualBoxClient();
    121121    /* Get VirtualBoxClient event source: */
    122122    m_comEventSource = comVBoxClient.GetEventSource();
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIVirtualBoxEventHandler.cpp

    r103537 r103771  
    2727
    2828/* GUI includes: */
    29 #include "UICommon.h"
    3029#include "UIExtraDataManager.h"
     30#include "UIGlobalSession.h"
    3131#include "UIMainEventListener.h"
    3232#include "UIVirtualBoxEventHandler.h"
     
    167167
    168168    /* Get VirtualBox: */
    169     const CVirtualBox comVBox = uiCommon().virtualBox();
     169    const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    170170    /* Get VirtualBox event source: */
    171171    m_comEventSource = comVBox.GetEventSource();
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp

    r101020 r103771  
    4040#include "UIErrorString.h"
    4141#include "UIExtraDataManager.h"
     42#include "UIGlobalSession.h"
    4243#include "UIIconPool.h"
    4344#include "UIFileManager.h"
     
    851852    foreach (const QUuid &id, machineIdsToAdd)
    852853    {
    853         CMachine comMachine = uiCommon().virtualBox().FindMachine(id.toString());
     854        CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(id.toString());
    854855        if (comMachine.isNull())
    855856            continue;
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.cpp

    r103578 r103771  
    3131
    3232/* GUI includes: */
    33 #include "UICommon.h"
    3433#include "UIDesktopWidgetWatchdog.h"
    3534#include "UIExtraDataManager.h"
     35#include "UIGlobalSession.h"
    3636#include "UIIconPool.h"
    3737#include "UIFileManager.h"
     
    126126{
    127127    CMachine comMachine;
    128     CVirtualBox vbox = uiCommon().virtualBox();
     128    CVirtualBox vbox = gpGlobalSession->virtualBox();
    129129    if (!vbox.isNull() && !m_uMachineId.isNull())
    130130        comMachine = vbox.FindMachine(m_uMachineId.toString());
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp

    r103711 r103771  
    3838#include "UIConverter.h"
    3939#include "UICommon.h"
     40#include "UIErrorString.h"
    4041#include "UIFileSystemModel.h"
    41 #include "UIErrorString.h"
    4242#include "UIFileManager.h"
    4343#include "UIFileManagerHostTable.h"
    4444#include "UIFileManagerGuestTable.h"
    4545#include "UIFileTableNavigationWidget.h"
     46#include "UIGlobalSession.h"
    4647#include "UIIconPool.h"
    4748#include "UIMessageCenter.h"
     
    13761377    QtListener.setNull();
    13771378    /* Make sure VBoxSVC is available: */
    1378     if (!uiCommon().isVBoxSVCAvailable())
     1379    if (!gpGlobalSession->isVBoxSVCAvailable())
    13791380        return;
    13801381
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestControlTreeItem.cpp

    r98875 r103771  
    2929#include "UIConverter.h"
    3030#include "UIExtraDataManager.h"
     31#include "UIGlobalSession.h"
    3132#include "UIGuestControlTreeItem.h"
    3233#include "UIGuestProcessControlWidget.h"
    33 #include "UICommon.h"
    3434
    3535/* COM includes: */
     
    9191
    9292    /* Make sure VBoxSVC is available: */
    93     if (!uiCommon().isVBoxSVCAvailable())
     93    if (!gpGlobalSession->isVBoxSVCAvailable())
    9494        return;
    9595
  • trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIGuestProcessControlWidget.cpp

    r103537 r103771  
    3535#include "QIDialogButtonBox.h"
    3636#include "QIToolBar.h"
    37 #include "UICommon.h"
     37#include "UIGlobalSession.h"
    3838#include "UIGuestControlConsole.h"
    3939#include "UIGuestControlTreeItem.h"
     
    547547
    548548    /* Make sure VBoxSVC is available: */
    549     if (!uiCommon().isVBoxSVCAvailable())
     549    if (!gpGlobalSession->isVBoxSVCAvailable())
    550550        return;
    551551
  • trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpBrowserDialog.cpp

    r103549 r103771  
    3838#include "UIDesktopWidgetWatchdog.h"
    3939#include "UIExtraDataManager.h"
     40#include "UIGlobalSession.h"
    4041#include "UIIconPool.h"
    4142#include "UIHelpBrowserDialog.h"
     
    189190    QString strUserManualFileName1 = uiCommon().helpFile();
    190191    QString strShortFileName = QFileInfo(strUserManualFileName1).fileName();
    191     QString strUserManualFileName2 = QDir(uiCommon().homeFolder()).absoluteFilePath(strShortFileName);
     192    QString strUserManualFileName2 = QDir(gpGlobalSession->homeFolder()).absoluteFilePath(strShortFileName);
    192193    /* Show if user manual already present: */
    193194    if (QFile::exists(strUserManualFileName1))
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp

    r103551 r103771  
    5454#include "UICommon.h"
    5555#include "UIExtraDataManager.h"
     56#include "UIGlobalSession.h"
    5657#include "UIIconPool.h"
    5758#include "UIMessageCenter.h"
     
    368369        return;
    369370
    370     CMachine comMachine = uiCommon().virtualBox().FindMachine(pCurrentPage->machineId().toString());
     371    CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(pCurrentPage->machineId().toString());
    371372    if (comMachine.isNull())
    372373        return;
     
    985986    m_pTabWidget->blockSignals(true);
    986987
    987     const CSystemProperties &sys = uiCommon().virtualBox().GetSystemProperties();
     988    const CSystemProperties &sys = gpGlobalSession->virtualBox().GetSystemProperties();
    988989    unsigned cMaxLogs = sys.GetLogHistoryCount() + 1 /*VBox.log*/ + 1 /*VBoxHardening.log*/; /** @todo Add api for getting total possible log count! */
    989990    foreach (const QUuid &machineId, machineList)
    990991    {
    991         CMachine comMachine = uiCommon().virtualBox().FindMachine(machineId.toString());
     992        CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(machineId.toString());
    992993        if (comMachine.isNull())
    993994            continue;
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIToolPaneMachine.cpp

    r103550 r103771  
    3939#include "UIErrorPane.h"
    4040#include "UIFileManager.h"
     41#include "UIGlobalSession.h"
    4142#include "UIIconPool.h"
    4243#include "UISnapshotPane.h"
     
    231232                if (!m_items.isEmpty())
    232233                    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()),
    234235                                                           0, false /* fShowToolbar */);
    235236                else
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManager.cpp

    r103552 r103771  
    6262#include "UIExtensionPackManager.h"
    6363#include "UIExtraDataManager.h"
     64#include "UIGlobalSession.h"
    6465#include "UIHelpBrowserDialog.h"
    6566#include "UIIconPool.h"
     
    254255void UIAcquirePublicKeyDialog::sltHandleOpenButtonClick()
    255256{
    256     CVirtualBox comVBox = uiCommon().virtualBox();
     257    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    257258    const QString strFileName = QIFileDialog::getOpenFileName(comVBox.GetHomeFolder(), QString(),
    258259                                                              this, tr("Choose a public key file"));
     
    829830            {
    830831                /* Handle VBox config file: */
    831                 CVirtualBox comVBox = uiCommon().virtualBox();
     832                CVirtualBox comVBox = gpGlobalSession->virtualBox();
    832833                CMachine comMachine = comVBox.FindMachine(strFile);
    833834                if (comVBox.isOk() && comMachine.isNotNull())
     
    867868void UIVirtualBoxManager::sltCheckUSBAccesibility()
    868869{
    869     CHost comHost = uiCommon().host();
     870    CHost comHost = gpGlobalSession->host();
    870871    if (!comHost.isOk())
    871872        return;
     
    12611262                const QString strFolder = uiCommon().defaultFolderPathForType(UIMediumDeviceType_HardDisk);
    12621263                const QString strDiskName = uiCommon().findUniqueFileName(strFolder, "NewVirtualDisk");
    1263                 const CGuestOSType comGuestOSType = uiCommon().virtualBox().GetGuestOSType("Other");
     1264                const CGuestOSType comGuestOSType = gpGlobalSession->virtualBox().GetGuestOSType("Other");
    12641265                const qulonglong uDiskSize = comGuestOSType.GetRecommendedHDD();
    12651266                m_wizards[enmType] = new UIWizardNewVD(this,
     
    14951496
    14961497    /* 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();
    14981499    const QString strTitle = tr("Select a destination folder to move the selected virtual machine");
    14991500    const QString strDestinationFolder = QIFileDialog::getExistingDirectory(strBaseFolder, this, strTitle);
     
    17521753    {
    17531754        /* 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());
    17551756        const QString strAbsoluteCommandName = uiHomeFolder.absoluteFilePath("last.command");
    17561757        QFile file(strAbsoluteCommandName);
     
    28412842    QString strTmpFile = strFileName;
    28422843#endif
    2843     CVirtualBox comVBox = uiCommon().virtualBox();
     2844    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    28442845
    28452846    /* No file specified: */
     
    29682969                                                 bool fStartHeadless, const QString &strMachineId)
    29692970{
    2970     CVirtualBox comVBox = uiCommon().virtualBox();
     2971    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    29712972    CMachine comMachine = comVBox.FindMachine(strMachineId);
    29722973    if (comMachine.isNull())
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp

    r103549 r103771  
    4141#include "UIChooser.h"
    4242#include "UICommon.h"
     43#include "UIGlobalSession.h"
    4344#include "UILoggingDefs.h"
    4445#include "UIMessageCenter.h"
     
    365366    // In certain intermediate states VM info can be NULL which
    366367    // causing annoying assertions, such updates can be ignored?
    367     CVirtualBox comVBox = uiCommon().virtualBox();
     368    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    368369    CMachine comMachine = comVBox.FindMachine(uId.toString());
    369370    if (comVBox.isOk() && comMachine.isNotNull())
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserAbstractModel.cpp

    r103538 r103771  
    4040#include "UICloudNetworkingStuff.h"
    4141#include "UIExtraDataManager.h"
     42#include "UIGlobalSession.h"
    4243#include "UILoggingDefs.h"
    4344#include "UIMessageCenter.h"
     
    767768        {
    768769            /* Add new machine-item: */
    769             const CMachine comMachine = uiCommon().virtualBox().FindMachine(uMachineId.toString());
     770            const CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(uMachineId.toString());
    770771            if (comMachine.isNotNull())
    771772                addLocalMachineIntoTheTree(comMachine, true /* make it visible */);
     
    787788
    788789    /* Search for existing registered machine: */
    789     const CMachine comMachine = uiCommon().virtualBox().FindMachine(uMachineId.toString());
     790    const CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(uMachineId.toString());
    790791    if (comMachine.isNull())
    791792        return;
     
    838839    {
    839840        /* Add new machine-item: */
    840         const CMachine comMachine = uiCommon().virtualBox().FindMachine(uMachineId.toString());
     841        const CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(uMachineId.toString());
    841842        addLocalMachineIntoTheTree(comMachine, true /* make it visible */);
    842843    }
     
    11451146
    11461147    /* Acquire VBox: */
    1147     const CVirtualBox comVBox = uiCommon().virtualBox();
     1148    const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    11481149
    11491150    /* Acquire existing local machines: */
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIFDCreationDialog.cpp

    r103708 r103771  
    3838#include "UIFDCreationDialog.h"
    3939#include "UIFilePathSelector.h"
     40#include "UIGlobalSession.h"
    4041#include "UIIconPool.h"
    4142#include "UIMedium.h"
     
    109110
    110111    /* Get VBox for further activities: */
    111     CVirtualBox comVBox = uiCommon().virtualBox();
     112    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    112113
    113114    /* Create medium: */
     
    291292    /* Make sure it's not empty if possible: */
    292293    if (strDefaultFilePath.isEmpty())
    293         strDefaultFilePath = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();
     294        strDefaultFilePath = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder();
    294295    if (strDefaultFilePath.isEmpty())
    295296        return strDefaultFilePath;
     
    315316QVector<CMediumFormat> UIFDCreationDialog::getFormatsForDeviceType(KDeviceType enmDeviceType)
    316317{
    317     CSystemProperties comSystemProperties = uiCommon().virtualBox().GetSystemProperties();
     318    CSystemProperties comSystemProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    318319    QVector<CMediumFormat> mediumFormats = comSystemProperties.GetMediumFormats();
    319320    QVector<CMediumFormat> formatList;
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMedium.cpp

    r103705 r103771  
    3535#include "UIErrorString.h"
    3636#include "UIExtraDataManager.h"
     37#include "UIGlobalSession.h"
    3738#include "UIIconPool.h"
    3839#include "UIMedium.h"
     
    328329        {
    329330            /* Get CVirtualBox object: */
    330             CVirtualBox vbox = uiCommon().virtualBox();
     331            CVirtualBox vbox = gpGlobalSession->virtualBox();
    331332
    332333            /* By default we assuming that this medium is attached
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumDefs.cpp

    r103338 r103771  
    2727
    2828/* GUI includes: */
     29#include "UIGlobalSession.h"
    2930#include "UIMediumDefs.h"
    30 #include "UICommon.h"
    3131
    3232/* COM includes: */
     
    116116QString UIMediumDefs::getPreferredExtensionForMedium(KDeviceType enmDeviceType)
    117117{
    118     CSystemProperties comSystemProperties = uiCommon().virtualBox().GetSystemProperties();
     118    CSystemProperties comSystemProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    119119    QVector<CMediumFormat> mediumFormats = comSystemProperties.GetMediumFormats();
    120120    for (int i = 0; i < mediumFormats.size(); ++i)
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumEnumerator.cpp

    r103538 r103771  
    3232#include "UICommon.h"
    3333#include "UIErrorString.h"
     34#include "UIGlobalSession.h"
    3435#include "UILoggingDefs.h"
    3536#include "UIMediumEnumerator.h"
     
    188189    {
    189190        /* 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);
    195196    }
    196197    else
     
    344345        {
    345346            /* Get VBox for temporary usage, it will cache the error info: */
    346             CVirtualBox comVBox = uiCommon().virtualBox();
     347            CVirtualBox comVBox = gpGlobalSession->virtualBox();
    347348            /* Open existing medium, this API can be used to open known medium as well, using ID as location for that: */
    348349            CMedium comMedium = comVBox.OpenMedium(uMediumId.toString(), enmMediumType, KAccessMode_ReadWrite, false);
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumItem.cpp

    r101330 r103771  
    3535#include "UICommon.h"
    3636#include "UIExtraDataManager.h"
     37#include "UIGlobalSession.h"
    3738#include "UIIconPool.h"
    3839#include "UIMediumItem.h"
     
    153154    foreach (const QUuid &uMachineId, medium().curStateMachineIds())
    154155    {
    155         CMachine comMachine = uiCommon().virtualBox().FindMachine(uMachineId.toString());
     156        CMachine comMachine = gpGlobalSession->virtualBox().FindMachine(uMachineId.toString());
    156157        if (comMachine.isNull())
    157158            continue;
     
    177178    foreach (const QUuid &uMachineId, medium().curStateMachineIds())
    178179    {
    179         const CMachine &comMachine = uiCommon().virtualBox().FindMachine(uMachineId.toString());
     180        const CMachine &comMachine = gpGlobalSession->virtualBox().FindMachine(uMachineId.toString());
    180181        if (comMachine.isNull())
    181182            continue;
  • trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp

    r103578 r103771  
    4444#include "UICommon.h"
    4545#include "UIExtraDataManager.h"
     46#include "UIGlobalSession.h"
    4647#include "UIIconPool.h"
    4748#include "UILoggingDefs.h"
     
    456457void UIMediumManagerWidget::sltAddMedium()
    457458{
    458     QString strDefaultMachineFolder = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();
     459    QString strDefaultMachineFolder = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder();
    459460    uiCommon().openMediumWithFileOpenDialog(currentMediumType(), this,
    460461                                              strDefaultMachineFolder, true /* use most recent medium folder */);
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderExtensionPack.cpp

    r98103 r103771  
    3636#include "UICommon.h"
    3737#include "UIDownloaderExtensionPack.h"
     38#include "UIGlobalSession.h"
    3839#include "UIMessageCenter.h"
    3940#include "UIModalWindowManager.h"
     
    5758    const QString strSource = strSourcePath + strSourceName;
    5859    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);
    6061
    6162    /* Set source/target: */
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderGuestAdditions.cpp

    r98103 r103771  
    3636#include "UICommon.h"
    3737#include "UIDownloaderGuestAdditions.h"
     38#include "UIGlobalSession.h"
    3839#include "UIMessageCenter.h"
    3940#include "UIModalWindowManager.h"
     
    5657    const QString strSource = strSourcePath + strSourceName;
    5758    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));
    5960
    6061    /* Set source/target: */
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderUserManual.cpp

    r98103 r103771  
    3535#include "UICommon.h"
    3636#include "UIDownloaderUserManual.h"
     37#include "UIGlobalSession.h"
    3738#include "UIMessageCenter.h"
    3839#include "UIModalWindowManager.h"
     
    5859
    5960    /* Set target: */
    60     QString strUserManualDestination = QDir(uiCommon().homeFolder()).absoluteFilePath(strUserManualShortFileName);
     61    QString strUserManualDestination = QDir(gpGlobalSession->homeFolder()).absoluteFilePath(strUserManualShortFileName);
    6162    setTarget(strUserManualDestination);
    6263}
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UINetworkReply.cpp

    r103538 r103771  
    3939#include "UIExtraDataManager.h"
    4040#ifndef VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS
    41 # include "UICommon.h"
     41# include "UIGlobalSession.h"
    4242# include "VBoxUtils.h"
    4343# include "CSystemProperties.h"
     
    340340    /* If the specific proxy settings are enabled, we'll use them
    341341     * unless user disabled that functionality manually. */
    342     const CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     342    const CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    343343    const KProxyMode enmProxyMode = comProperties.GetProxyMode();
    344344    AssertReturn(comProperties.isOk(), VERR_INTERNAL_ERROR_3);
     
    611611{
    612612#ifndef VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS
    613     const QDir homeDir(QDir::toNativeSeparators(uiCommon().homeFolder()));
     613    const QDir homeDir(QDir::toNativeSeparators(gpGlobalSession->homeFolder()));
    614614    return QDir::toNativeSeparators(homeDir.absoluteFilePath(s_strCertificateFileName));
    615615#else /* VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS */
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UINewVersionChecker.cpp

    r98103 r103771  
    3333#include "UICommon.h"
    3434#include "UIExtraDataManager.h"
     35#include "UIGlobalSession.h"
    3536#include "UINetworkReply.h"
    3637#include "UINewVersionChecker.h"
     
    5859    /* Compose query: */
    5960    QUrlQuery url;
    60     url.addQueryItem("platform", uiCommon().virtualBox().GetPackageType());
     61    url.addQueryItem("platform", gpGlobalSession->virtualBox().GetPackageType());
    6162    /* Check if branding is active: */
    6263    if (uiCommon().brandingIsActive())
     
    6465        /* Branding: Check whether we have a local branding file which tells us our version suffix "FOO"
    6566                     (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())
    6869                                                       .arg(uiCommon().brandingGetKey("VerSuffix")));
    6970    }
     
    7172    {
    7273        /* 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()));
    7576    }
    7677    url.addQueryItem("count", QString::number(gEDataManager->applicationUpdateCheckCounter()));
    7778    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()));
    7980
    8081    /* Send GET request: */
  • trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateManager.cpp

    r103551 r103771  
    3535#include "UIExtension.h"
    3636#include "UIExtraDataManager.h"
     37#include "UIGlobalSession.h"
    3738#include "UIMessageCenter.h"
    3839#include "UIModalWindowManager.h"
     
    140141
    141142    /* Get extension pack manager: */
    142     CExtPackManager extPackManager = uiCommon().virtualBox().GetExtensionPackManager();
     143    CExtPackManager extPackManager = gpGlobalSession->virtualBox().GetExtensionPackManager();
    143144    /* Return if extension pack manager is NOT available: */
    144145    if (extPackManager.isNull())
     
    232233        QFile::remove(QDir::toNativeSeparators(strTarget));
    233234        /* 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"),
    235236                                                                                    QDir::Files);
    236237        /* Propose to delete old extension pack files if there are any: */
     
    242243                {
    243244                    /* 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)));
    245246                }
    246247            }
     
    328329    /* Load/decode curent update data: */
    329330    VBoxUpdateData currentData;
    330     CHost comHost = uiCommon().host();
     331    CHost comHost = gpGlobalSession->host();
    331332    currentData.load(comHost);
    332333
     
    352353    /* Load/decode curent update data: */
    353354    VBoxUpdateData currentData;
    354     CHost comHost = uiCommon().host();
     355    CHost comHost = gpGlobalSession->host();
    355356    currentData.load(comHost);
    356357    /* Encode/save new update data: */
  • trunk/src/VBox/Frontends/VirtualBox/src/networkmanager/UINetworkManager.cpp

    r103711 r103771  
    4545#include "UIDetailsWidgetNATNetwork.h"
    4646#include "UIExtraDataManager.h"
     47#include "UIGlobalSession.h"
    4748#include "UIIconPool.h"
    4849#include "UIMessageCenter.h"
     
    547548
    548549    /* Get VirtualBox for further activities: */
    549     CVirtualBox comVBox = uiCommon().virtualBox();
     550    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    550551
    551552    /* Create network: */
     
    578579
    579580    /* Get host for further activities: */
    580     CHost comHost = uiCommon().host();
     581    CHost comHost = gpGlobalSession->host();
    581582    CHostNetworkInterface comInterface;
    582583
     
    602603    {
    603604        /* Get VBox for further activities: */
    604         CVirtualBox comVBox = uiCommon().virtualBox();
     605        CVirtualBox comVBox = gpGlobalSession->virtualBox();
    605606
    606607        /* Find corresponding DHCP server (create if necessary): */
     
    647648
    648649    /* Get VirtualBox for further activities: */
    649     CVirtualBox comVBox = uiCommon().virtualBox();
     650    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    650651
    651652    /* Find corresponding network: */
     
    691692
    692693    /* Get host for further activities: */
    693     CHost comHost = uiCommon().host();
     694    CHost comHost = gpGlobalSession->host();
    694695
    695696    /* Find corresponding interface: */
     
    716717        {
    717718            /* Get VBox for further activities: */
    718             CVirtualBox comVBox = uiCommon().virtualBox();
     719            CVirtualBox comVBox = gpGlobalSession->virtualBox();
    719720
    720721            /* Find corresponding DHCP server: */
     
    810811
    811812    /* Get VirtualBox for further activities: */
    812     CVirtualBox comVBox = uiCommon().virtualBox();
     813    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    813814
    814815    /* Create network: */
     
    875876
    876877    /* Get VirtualBox for further activities: */
    877     CVirtualBox comVBox = uiCommon().virtualBox();
     878    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    878879
    879880    /* Find corresponding network: */
     
    947948
    948949    /* Get VirtualBox for further activities: */
    949     CVirtualBox comVBox = uiCommon().virtualBox();
     950    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    950951
    951952    /* Create network: */
     
    10001001
    10011002    /* Get VirtualBox for further activities: */
    1002     CVirtualBox comVBox = uiCommon().virtualBox();
     1003    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    10031004
    10041005    /* Find corresponding network: */
     
    12741275#ifdef VBOX_WS_MAC
    12751276        /* Get VirtualBox for further activities: */
    1276         CVirtualBox comVBox = uiCommon().virtualBox();
     1277        CVirtualBox comVBox = gpGlobalSession->virtualBox();
    12771278
    12781279        /* Find corresponding network: */
     
    13171318
    13181319        /* Get host for further activities: */
    1319         CHost comHost = uiCommon().host();
     1320        CHost comHost = gpGlobalSession->host();
    13201321
    13211322        /* Find corresponding interface: */
     
    13661367                {
    13671368                    /* Get VBox for further activities: */
    1368                     CVirtualBox comVBox = uiCommon().virtualBox();
     1369                    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    13691370
    13701371                    /* Find corresponding DHCP server (create if necessary): */
     
    15031504
    15041505        /* Get VirtualBox for further activities: */
    1505         CVirtualBox comVBox = uiCommon().virtualBox();
     1506        CVirtualBox comVBox = gpGlobalSession->virtualBox();
    15061507
    15071508        /* Find corresponding network: */
     
    16661667
    16671668        /* Get VirtualBox for further activities: */
    1668         CVirtualBox comVBox = uiCommon().virtualBox();
     1669        CVirtualBox comVBox = gpGlobalSession->virtualBox();
    16691670
    16701671        /* Find corresponding network: */
     
    20412042#ifdef VBOX_WS_MAC
    20422043    /* Get VirtualBox for further activities: */
    2043     const CVirtualBox comVBox = uiCommon().virtualBox();
     2044    const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    20442045
    20452046    /* Get networks for further activities: */
     
    20702071
    20712072    /* Get host for further activities: */
    2072     const CHost comHost = uiCommon().host();
     2073    const CHost comHost = gpGlobalSession->host();
    20732074
    20742075    /* Get interfaces for further activities: */
     
    21512152
    21522153    /* Get VBox for further activities: */
    2153     CVirtualBox comVBox = uiCommon().virtualBox();
     2154    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    21542155
    21552156    /* Find corresponding DHCP server (create if necessary): */
     
    21922193
    21932194    /* Get VirtualBox for further activities: */
    2194     const CVirtualBox comVBox = uiCommon().virtualBox();
     2195    const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    21952196
    21962197    /* Get interfaces for further activities: */
     
    23042305
    23052306    /* Get VirtualBox for further activities: */
    2306     const CVirtualBox comVBox = uiCommon().virtualBox();
     2307    const CVirtualBox comVBox = gpGlobalSession->virtualBox();
    23072308
    23082309    /* Get interfaces for further activities: */
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp

    r103551 r103771  
    3535#include "UIErrorString.h"
    3636#include "UIExtraDataManager.h"
     37#include "UIGlobalSession.h"
    3738#include "UIHostComboEditor.h"
    3839#include "UINotificationCenter.h"
     
    38303831        /* Acquire VM: */
    38313832        AssertReturn(!m_uMachineId.isNull(), CProgress());
    3832         CVirtualBox comVBox = uiCommon().virtualBox();
     3833        CVirtualBox comVBox = gpGlobalSession->virtualBox();
    38333834        m_comMachine = comVBox.FindMachine(m_uMachineId.toString());
    38343835        if (!comVBox.isOk())
     
    46344635
    46354636#ifdef VBOX_WITH_UPDATE_AGENT
    4636     CHost comHost = uiCommon().host();
     4637    CHost comHost = gpGlobalSession->host();
    46374638    if (!comHost.isNull())
    46384639       m_comUpdateHost = comHost.GetUpdateHost();
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp

    r103552 r103771  
    3939#include "UIDesktopWidgetWatchdog.h"
    4040#include "UIExtraDataManager.h"
     41#include "UIGlobalSession.h"
    4142#include "UIIconPool.h"
    4243#include "UIMachine.h"
     
    153154    {
    154155        /* Get corresponding machine: */
    155         CMachine machine = uiCommon().virtualBox().FindMachine(uiCommon().managedVMUuid().toString());
     156        CMachine machine = gpGlobalSession->virtualBox().FindMachine(uiCommon().managedVMUuid().toString());
    156157        AssertMsgReturn(!machine.isNull(), ("UICommon::managedVMUuid() should have filter that case before!\n"), false);
    157158
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r103711 r103771  
    5151#include "UIFileManagerDialog.h"
    5252#include "UIFrameBuffer.h"
     53#include "UIGlobalSession.h"
    5354#include "UIGuestProcessControlDialog.h"
    5455#include "UIHelpBrowserDialog.h"
     
    347348{
    348349    /* Do nothing if VBoxSVC still availabile: */
    349     if (uiCommon().isVBoxSVCAvailable())
     350    if (gpGlobalSession->isVBoxSVCAvailable())
    350351        return;
    351352
     
    857858{
    858859    /* We should watch for VBoxSVC availability changes: */
    859     connect(&uiCommon(), &UICommon::sigVBoxSVCAvailabilityChange,
     860    connect(gpGlobalSession, &UIGlobalSession::sigVBoxSVCAvailabilityChange,
    860861            this, &UIMachineLogic::sltHandleVBoxSVCAvailabilityChange);
    861862
     
    14171418{
    14181419    /* We should stop watching for VBoxSVC availability changes: */
    1419     disconnect(&uiCommon(), &UICommon::sigVBoxSVCAvailabilityChange,
     1420    disconnect(gpGlobalSession, &UIGlobalSession::sigVBoxSVCAvailabilityChange,
    14201421               this, &UIMachineLogic::sltHandleVBoxSVCAvailabilityChange);
    14211422
     
    22902291
    22912292    /* Try to acquire default additions ISO: */
    2292     CSystemProperties comSystemProperties = uiCommon().virtualBox().GetSystemProperties();
     2293    CSystemProperties comSystemProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    22932294    const QString strAdditions = comSystemProperties.GetDefaultAdditionsISO();
    22942295    if (comSystemProperties.isOk() && !strAdditions.isEmpty())
     
    23012302
    23022303    /* Check whether we have already registered image: */
    2303     CVirtualBox comVBox = uiCommon().virtualBox();
     2304    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    23042305    CMediumVector comMedia = comVBox.GetDVDImages();
    23052306    if (!comVBox.isOk())
     
    26582659    KChipsetType enmChipsetType = KChipsetType_Null;
    26592660    uimachine()->acquireChipsetType(enmChipsetType);
    2660     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArchType);
     2661    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArchType);
    26612662    const ulong uCount = qMin((ulong)4, (ulong)comProperties.GetMaxNetworkAdapters(enmChipsetType));
    26622663
     
    27792780        m_pSharedClipboardActions = new QActionGroup(this);
    27802781        /* Load currently supported Clipboard modes: */
    2781         CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     2782        CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    27822783        QVector<KClipboardMode> clipboardModes = comProperties.GetSupportedClipboardModes();
    27832784        /* Take current clipboard mode into account: */
     
    28292830        m_pDragAndDropActions = new QActionGroup(this);
    28302831        /* Load currently supported DnD modes: */
    2831         CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     2832        CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    28322833        QVector<KDnDMode> dndModes = comProperties.GetSupportedDnDModes();
    28332834        /* Take current DnD mode into account: */
     
    29922993        return;
    29932994
    2994     QVector<CMachine> machines = uiCommon().virtualBox().GetMachines();
     2995    QVector<CMachine> machines = gpGlobalSession->virtualBox().GetMachines();
    29952996    bool fAnother = false;
    29962997    for (int i = 0; i < machines.size(); ++i)
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r103538 r103771  
    3939#include "UIExtraDataManager.h"
    4040#include "UIFrameBuffer.h"
     41#include "UIGlobalSession.h"
    4142#include "UIIconPool.h"
    4243#include "UIGuestOSType.h"
     
    892893
    893894    /* Get recommended controller bus & type: */
    894     CVirtualBox comVBox = uiCommon().virtualBox();
     895    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    895896
    896897    if (!comVBox.isOk())
     
    900901    }
    901902
    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());
    904905
    905906    /* Search for an attachment of required bus & type: */
     
    10561057
    10571058    /* Check whether video input devices are available: */
    1058     CHost comHost = uiCommon().host();
     1059    CHost comHost = gpGlobalSession->host();
    10591060    CHostVideoInputDeviceVector comVideoInputDevices = comHost.GetVideoInputDevices();
    10601061    if (!comHost.isOk() || comVideoInputDevices.isEmpty())
     
    10731074bool UISession::usbDevices(QList<USBDeviceInfo> &guiUSBDevices)
    10741075{
    1075     const CHost comHost = uiCommon().host();
     1076    const CHost comHost = gpGlobalSession->host();
    10761077    const CHostUSBDeviceVector comHostUSBDevices = comHost.GetUSBDevices();
    10771078    bool fSuccess = comHost.isOk();
     
    11351136    if (!fSuccess)
    11361137    {
    1137         CHost comHost = uiCommon().host();
     1138        CHost comHost = gpGlobalSession->host();
    11381139        /* Nothing to check for errors here because error is valid case as well. */
    11391140        CHostUSBDevice comHostUSBDevice = comHost.FindUSBDeviceById(uId);
     
    11631164bool UISession::webcamDevices(QList<WebcamDeviceInfo> &guiWebcamDevices)
    11641165{
    1165     const CHost comHost = uiCommon().host();
     1166    const CHost comHost = gpGlobalSession->host();
    11661167    const CHostVideoInputDeviceVector comHostVideoInputDevices = comHost.GetVideoInputDevices();
    11671168    bool fSuccess = comHost.isOk();
     
    12781279    {
    12791280        /* Acquire system properties: */
    1280         CVirtualBox comVBox = uiCommon().virtualBox();
     1281        CVirtualBox comVBox = gpGlobalSession->virtualBox();
    12811282        AssertReturn(comVBox.isNotNull(), false);
    12821283        CPlatformProperties comProperties = comVBox.GetPlatformProperties(enmArchType);
     
    13591360
    13601361    /* 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());
    13631364
    13641365    if (!fIsWindowOrLinux)
     
    27042705
    27052706    /* Close session: */
    2706     if (!m_comSession.isNull() && uiCommon().isVBoxSVCAvailable())
     2707    if (!m_comSession.isNull() && gpGlobalSession->isVBoxSVCAvailable())
    27072708    {
    27082709        m_comSession.UnlockMachine();
     
    27422743
    27432744        /* Create host network interface names list: */
    2744         foreach (const CHostNetworkInterface &comNetIface, uiCommon().host().GetNetworkInterfaces())
     2745        foreach (const CHostNetworkInterface &comNetIface, gpGlobalSession->host().GetNetworkInterfaces())
    27452746        {
    27462747            availableInterfaceNames << comNetIface.GetName();
     
    27502751        /* Enumerate all the virtual network adapters: */
    27512752        CPlatform comPlatform             = machine().GetPlatform();
    2752         CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(comPlatform.GetArchitecture());
     2753        CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(comPlatform.GetArchitecture());
    27532754        const ulong cCount = comProperties.GetMaxNetworkAdapters(comPlatform.GetChipsetType());
    27542755        for (ulong uAdapterIndex = 0; uAdapterIndex < cCount; ++uAdapterIndex)
     
    27982799
    27992800    /* 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();
    28012802    if (comHost.GetUSBDevices().isEmpty() && comHost.isWarning())
    28022803    {
     
    28172818{
    28182819    /* Get VBox: */
    2819     CVirtualBox comVBox = uiCommon().virtualBox();
     2820    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    28202821
    28212822    /* Prepare medium to mount: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp

    r103085 r103771  
    3737
    3838/* GUI includes: */
    39 #include "UICommon.h"
    4039#include "UIConverter.h"
     40#include "UIGlobalSession.h"
    4141#include "UIIconPool.h"
    4242#include "UIInformationRuntime.h"
     
    352352    else
    353353    {
    354         strOSType = uiCommon().guestOSTypeManager().getDescription(strOSType);
     354        strOSType = gpGlobalSession->guestOSTypeManager().getDescription(strOSType);
    355355    }
    356356   updateInfoRow(InfoRow_GuestOSType, QString("%1").arg(m_strGuestOSTypeLabel), strOSType);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UIAdvancedSettingsDialogSpecific.cpp

    r103169 r103771  
    3333#include "UICommon.h"
    3434#include "UIExtraDataManager.h"
     35#include "UIGlobalSession.h"
    3536#include "UIIconPool.h"
    3637#include "UIMessageCenter.h"
     
    129130{
    130131    /* 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();
    133134    /* Prepare global data: */
    134135    qRegisterMetaType<UISettingsDataGlobal>();
     
    146147{
    147148    /* 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();
    150151    /* Prepare global data: */
    151152    qRegisterMetaType<UISettingsDataGlobal>();
     
    318319
    319320    /* 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());
    321322    AssertReturnVoid(!m_machine.isNull());
    322323    m_enmSessionState = m_machine.GetSessionState();
     
    492493    QString strDialogTitle;
    493494    /* 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());
    495496    if (!machine.isNull())
    496497        strDialogTitle = tr("%1 - %2").arg(machine.GetName()).arg(titleExtension());
     
    633634
    634635    /* 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());
    636637    AssertMsg(!m_machine.isNull(), ("Can't find corresponding machine!\n"));
    637638    m_enmSessionState = m_machine.GetSessionState();
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioControllerEditor.cpp

    r101867 r103771  
    3333
    3434/* GUI includes: */
    35 #include "UICommon.h"
     35#include "UIAudioControllerEditor.h"
    3636#include "UIConverter.h"
    37 #include "UIAudioControllerEditor.h"
     37#include "UIGlobalSession.h"
    3838
    3939/* COM includes: */
     
    155155                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    156156                                            : KPlatformArchitecture_x86;
    157         CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     157        CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    158158        m_supportedValues = comProperties.GetSupportedAudioControllerTypes();
    159159
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIAudioHostDriverEditor.cpp

    r101011 r103771  
    3333
    3434/* GUI includes: */
    35 #include "UICommon.h"
     35#include "UIAudioHostDriverEditor.h"
    3636#include "UIConverter.h"
    37 #include "UIAudioHostDriverEditor.h"
     37#include "UIGlobalSession.h"
    3838
    3939/* COM includes: */
     
    147147
    148148        /* Load currently supported audio driver types: */
    149         CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     149        CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    150150        m_supportedValues = comProperties.GetSupportedAudioDriverTypes();
    151151
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBaseMemoryEditor.cpp

    r101563 r103771  
    3636#include "QIAdvancedSlider.h"
    3737#include "UIBaseMemoryEditor.h"
    38 #include "UICommon.h"
     38#include "UIGlobalSession.h"
    3939
    4040/* COM includes: */
     
    128128void UIBaseMemorySlider::prepare()
    129129{
    130     ulong uFullSize = uiCommon().host().GetMemorySize();
    131     CSystemProperties sys = uiCommon().virtualBox().GetSystemProperties();
     130    ulong uFullSize = gpGlobalSession->host().GetMemorySize();
     131    CSystemProperties sys = gpGlobalSession->virtualBox().GetSystemProperties();
    132132    m_uMinRAM = sys.GetMinGuestRAM();
    133133    m_uMaxRAM = RT_MIN(RT_ALIGN(uFullSize, _1G / _1M), sys.GetMaxGuestRAM());
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIBootOrderEditor.cpp

    r103178 r103771  
    3535/* GUI includes: */
    3636#include "UIBootOrderEditor.h"
    37 #include "UICommon.h"
    3837#include "UIConverter.h"
     38#include "UIGlobalSession.h"
    3939#include "UIIconPool.h"
    4040#include "QIToolBar.h"
     
    352352    CPlatform comPlatform = comMachine.GetPlatform();
    353353    const KPlatformArchitecture comArch = comPlatform.GetArchitecture();
    354     const CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(comArch);
     354    const CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(comArch);
    355355    QVector<KDeviceType> possibleBootItems = comProperties.GetSupportedBootDevices();
    356356    /* Limit the list to maximum boot position: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIChipsetEditor.cpp

    r101867 r103771  
    3333
    3434/* GUI includes: */
    35 #include "UICommon.h"
    3635#include "UIConverter.h"
    3736#include "UIChipsetEditor.h"
     37#include "UIGlobalSession.h"
    3838
    3939/* COM includes: */
     
    158158                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    159159                                            : KPlatformArchitecture_x86;
    160         CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     160        CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    161161        m_supportedValues = comProperties.GetSupportedChipsetTypes();
    162162
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIDefaultMachineFolderEditor.cpp

    r103610 r103771  
    3131
    3232/* GUI includes: */
    33 #include "UICommon.h"
    3433#include "UIDefaultMachineFolderEditor.h"
    3534#include "UIFilePathSelector.h"
     35#include "UIGlobalSession.h"
    3636
    3737
     
    106106            if (m_pLabel)
    107107                m_pLabel->setBuddy(m_pSelector);
    108             m_pSelector->setInitialPath(uiCommon().homeFolder());
     108            m_pSelector->setInitialPath(gpGlobalSession->homeFolder());
    109109            connect(m_pSelector, &UIFilePathSelector::pathChanged,
    110110                    this, &UIDefaultMachineFolderEditor::sigPathChanged);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIDragAndDropEditor.cpp

    r101498 r103771  
    3333
    3434/* GUI includes: */
    35 #include "UICommon.h"
    3635#include "UIConverter.h"
    3736#include "UIDragAndDropEditor.h"
     37#include "UIGlobalSession.h"
    3838
    3939/* COM includes: */
     
    147147
    148148        /* Load currently supported audio driver types: */
    149         CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     149        CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    150150        m_supportedValues = comProperties.GetSupportedDnDModes();
    151151
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIGraphicsControllerEditor.cpp

    r101867 r103771  
    3333
    3434/* GUI includes: */
    35 #include "UICommon.h"
    3635#include "UIConverter.h"
     36#include "UIGlobalSession.h"
    3737#include "UIGraphicsControllerEditor.h"
    3838
     
    163163                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    164164                                            : KPlatformArchitecture_x86;
    165         CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     165        CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    166166        m_supportedValues = comProperties.GetSupportedGraphicsControllerTypes();
    167167
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIMonitorCountEditor.cpp

    r101563 r103771  
    3333/* GUI includes: */
    3434#include "QIAdvancedSlider.h"
    35 #include "UICommon.h"
    3635#include "UIDesktopWidgetWatchdog.h"
     36#include "UIGlobalSession.h"
    3737#include "UIMonitorCountEditor.h"
    3838
     
    130130{
    131131    /* Prepare common variables: */
    132     const CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     132    const CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    133133
    134134    /* Prepare main layout: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINameAndSystemEditor.cpp

    r103703 r103771  
    3535#include "QILineEdit.h"
    3636#include "UICommon.h"
     37#include "UIGlobalSession.h"
    3738#include "UIIconPool.h"
    3839#include "UIFilePathSelector.h"
     
    162163{
    163164    if (!m_pSelectorPath)
    164         return uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();
     165        return gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder();
    165166    return m_pSelectorPath->path();
    166167}
     
    190191    {
    191192        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))
    193194            iFamilyComboIndex = i;
    194195    }
     
    200201
    201202    /* 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);
    203204    if (!strDistribution.isEmpty())
    204205    {
     
    342343    const UIGuestOSTypeManager::UIGuestOSTypeInfo types
    343344         = 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);
    346347
    347348    /* Save the most recently used item: */
     
    428429            {
    429430                m_pLabelPath->setBuddy(m_pSelectorPath->focusProxy());
    430                 QString strDefaultMachineFolder = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();
     431                QString strDefaultMachineFolder = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder();
    431432                m_pSelectorPath->setPath(strDefaultMachineFolder);
    432433                m_pSelectorPath->setDefaultPath(strDefaultMachineFolder);
     
    617618    /* Acquire family IDs: */
    618619    const UIGuestOSTypeManager::UIGuestOSFamilyInfo families
    619         = uiCommon().guestOSTypeManager().getFamilies(false, enmArch);
     620        = gpGlobalSession->guestOSTypeManager().getFamilies(false, enmArch);
    620621
    621622    /* Block signals initially and clear the combo: */
     
    653654    /* Acquire a list of suitable sub-types: */
    654655    const UIGuestOSTypeManager::UIGuestOSSubtypeInfo distributions
    655         = uiCommon().guestOSTypeManager().getSubtypesForFamilyId(m_strFamilyId, false, enmArch);
     656        = gpGlobalSession->guestOSTypeManager().getSubtypesForFamilyId(m_strFamilyId, false, enmArch);
    656657    m_pLabelDistribution->setEnabled(!distributions.isEmpty());
    657658    m_pComboDistribution->setEnabled(!distributions.isEmpty());
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkAttachmentEditor.cpp

    r101717 r103771  
    3333
    3434/* GUI includes: */
    35 #include "UICommon.h"
    3635#include "UIConverter.h"
    3736#include "UIExtraDataManager.h"
     37#include "UIGlobalSession.h"
    3838#include "UINetworkAttachmentEditor.h"
    3939
     
    133133{
    134134    QStringList bridgedAdapterList;
    135     foreach (const CHostNetworkInterface &comInterface, uiCommon().host().GetNetworkInterfaces())
     135    foreach (const CHostNetworkInterface &comInterface, gpGlobalSession->host().GetNetworkInterfaces())
    136136    {
    137137        if (   comInterface.GetInterfaceType() == KHostNetworkInterfaceType_Bridged
     
    145145QStringList UINetworkAttachmentEditor::internalNetworks()
    146146{
    147     return QList<QString>::fromVector(uiCommon().virtualBox().GetInternalNetworks());
     147    return QList<QString>::fromVector(gpGlobalSession->virtualBox().GetInternalNetworks());
    148148}
    149149
     
    152152{
    153153    QStringList hostInterfaceList;
    154     foreach (const CHostNetworkInterface &comInterface, uiCommon().host().GetNetworkInterfaces())
     154    foreach (const CHostNetworkInterface &comInterface, gpGlobalSession->host().GetNetworkInterfaces())
    155155    {
    156156        if (   comInterface.GetInterfaceType() == KHostNetworkInterfaceType_HostOnly
     
    164164QStringList UINetworkAttachmentEditor::genericDrivers()
    165165{
    166     return QList<QString>::fromVector(uiCommon().virtualBox().GetGenericNetworkDrivers());
     166    return QList<QString>::fromVector(gpGlobalSession->virtualBox().GetGenericNetworkDrivers());
    167167}
    168168
     
    171171{
    172172    QStringList natNetworkList;
    173     foreach (const CNATNetwork &comNetwork, uiCommon().virtualBox().GetNATNetworks())
     173    foreach (const CNATNetwork &comNetwork, gpGlobalSession->virtualBox().GetNATNetworks())
    174174        natNetworkList << comNetwork.GetNetworkName();
    175175    return natNetworkList;
     
    181181{
    182182    QStringList cloudNetworkList;
    183     foreach (const CCloudNetwork &comNetwork, uiCommon().virtualBox().GetCloudNetworks())
     183    foreach (const CCloudNetwork &comNetwork, gpGlobalSession->virtualBox().GetCloudNetworks())
    184184        cloudNetworkList << comNetwork.GetNetworkName();
    185185    return cloudNetworkList;
     
    192192{
    193193    QStringList hostOnlyNetworkList;
    194     foreach (const CHostOnlyNetwork &comNetwork, uiCommon().virtualBox().GetHostOnlyNetworks())
     194    foreach (const CHostOnlyNetwork &comNetwork, gpGlobalSession->virtualBox().GetHostOnlyNetworks())
    195195        hostOnlyNetworkList << comNetwork.GetNetworkName();
    196196    return hostOnlyNetworkList;
     
    363363
    364364    /* Load currently supported network attachment types (system-properties getter): */
    365     CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     365    CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    366366    QVector<KNetworkAttachmentType> supportedTypes = comProperties.GetSupportedNetworkAttachmentTypes();
    367367    /* Filter out types unrelated to current experience mode: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UINetworkFeaturesEditor.cpp

    r101979 r103771  
    3838#include "QILineEdit.h"
    3939#include "QIToolButton.h"
    40 #include "UICommon.h"
    4140#include "UIConverter.h"
     41#include "UIGlobalSession.h"
    4242#include "UIIconPool.h"
    4343#include "UINetworkFeaturesEditor.h"
     
    209209void UINetworkFeaturesEditor::generateMac()
    210210{
    211     setMACAddress(uiCommon().host().GenerateMACAddress());
     211    setMACAddress(gpGlobalSession->host().GenerateMACAddress());
    212212}
    213213
     
    398398                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    399399                                            : KPlatformArchitecture_x86;
    400         CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     400        CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    401401        QVector<KNetworkAdapterType> supportedTypes = comProperties.GetSupportedNetworkAdapterTypes();
    402402
     
    431431                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    432432                                            : KPlatformArchitecture_x86;
    433         CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     433        CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    434434        QVector<KNetworkAdapterPromiscModePolicy> supportedTypes = comProperties.GetSupportedNetAdpPromiscModePols();
    435435
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIParavirtProviderEditor.cpp

    r101867 r103771  
    3333
    3434/* GUI includes: */
    35 #include "UICommon.h"
    3635#include "UIConverter.h"
     36#include "UIGlobalSession.h"
    3737#include "UIParavirtProviderEditor.h"
    3838
     
    155155                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    156156                                            : KPlatformArchitecture_x86;
    157         CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     157        CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    158158        m_supportedValues = comProperties.GetSupportedParavirtProviders();
    159159
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIPointingHIDEditor.cpp

    r101563 r103771  
    3333
    3434/* GUI includes: */
    35 #include "UICommon.h"
    3635#include "UIConverter.h"
     36#include "UIGlobalSession.h"
    3737#include "UIPointingHIDEditor.h"
    3838
     
    149149
    150150        /* Load currently supported values: */
    151         CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     151        CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    152152        m_supportedValues = comProperties.GetSupportedPointingHIDTypes();
    153153
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UISerialSettingsEditor.cpp

    r101563 r103771  
    3636/* GUI includes: */
    3737#include "QIWidgetValidator.h"
    38 #include "UICommon.h"
    3938#include "UIConverter.h"
     39#include "UIGlobalSession.h"
    4040#include "UISerialSettingsEditor.h"
    4141
     
    461461
    462462        /* Load currently supported port moded: */
    463         CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     463        CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    464464        QVector<KPortMode> supportedModes = comProperties.GetSupportedPortModes();
    465465        /* Take currently requested mode into account if it's sane: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UISharedClipboardEditor.cpp

    r101498 r103771  
    3333
    3434/* GUI includes: */
    35 #include "UICommon.h"
    3635#include "UIConverter.h"
     36#include "UIGlobalSession.h"
    3737#include "UISharedClipboardEditor.h"
    3838
     
    147147
    148148        /* Load currently supported audio driver types: */
    149         CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     149        CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    150150        m_supportedValues = comProperties.GetSupportedClipboardModes();
    151151
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIStorageSettingsEditor.cpp

    r103309 r103771  
    5757#include "UIConverter.h"
    5858#include "UIExtraDataManager.h"
     59#include "UIGlobalSession.h"
    5960#include "UIIconPool.h"
    6061#include "UIMedium.h"
     
    11741175    updatePixmaps();
    11751176
    1176     m_fUseIoCache = uiCommon().virtualBox().GetSystemProperties().GetDefaultIoCacheSettingForStorageController(enmType);
     1177    m_fUseIoCache = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultIoCacheSettingForStorageController(enmType);
    11771178}
    11781179
     
    12371238{
    12381239    /* Limit maximum port count: */
    1239     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1240    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    12401241    m_uPortCount = qMin(uPortCount, (uint)comProperties.GetMaxPortCountForStorageBus(bus()));
    12411242}
     
    12551256uint ControllerItem::maxPortCount()
    12561257{
    1257     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1258    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    12581259    return (uint)comProperties.GetMaxPortCountForStorageBus(bus());
    12591260}
     
    12721273{
    12731274    SlotsList allSlots;
    1274     CPlatformProperties comProps = uiCommon().virtualBox().GetPlatformProperties(arch());
     1275    CPlatformProperties comProps = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    12751276    for (ULONG i = 0; i < comProps.GetMaxPortCountForStorageBus(bus()); ++ i)
    12761277        for (ULONG j = 0; j < comProps.GetMaxDevicesPerPortForStorageBus(bus()); ++ j)
     
    12891290DeviceTypeList ControllerItem::deviceTypeList() const
    12901291{
    1291     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1292    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    12921293    return comProperties.GetDeviceTypesForStorageBus(m_enmBus).toList();
    12931294}
     
    13701371
    13711372    /* Load currently supported storage buses: */
    1372     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1373    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    13731374    const QVector<KStorageBus> supportedBuses = comProperties.GetSupportedStorageBuses();
    13741375
     
    13921393
    13931394    /* Load currently supported storage buses & types: */
    1394     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1395    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    13951396    const QVector<KStorageBus> supportedBuses = comProperties.GetSupportedStorageBuses();
    13961397    const QVector<KStorageControllerType> supportedTypes = comProperties.GetSupportedStorageControllerTypes();
     
    18921893        case R_IsMoreIDEControllersPossible:
    18931894        {
    1894             CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1895            CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    18951896            return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) &&
    18961897                   (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_IDE) <
     
    18991900        case R_IsMoreSATAControllersPossible:
    19001901        {
    1901             CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1902            CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    19021903            return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) &&
    19031904                   (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_SATA) <
     
    19061907        case R_IsMoreSCSIControllersPossible:
    19071908        {
    1908             CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1909            CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    19091910            return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) &&
    19101911                   (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_SCSI) <
     
    19131914        case R_IsMoreFloppyControllersPossible:
    19141915        {
    1915             CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1916            CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    19161917            return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) &&
    19171918                   (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_Floppy) <
     
    19201921        case R_IsMoreSASControllersPossible:
    19211922        {
    1922             CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1923            CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    19231924            return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) &&
    19241925                   (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_SAS) <
     
    19271928        case R_IsMoreUSBControllersPossible:
    19281929        {
    1929             CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1930            CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    19301931            return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) &&
    19311932                   (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_USB) <
     
    19341935        case R_IsMoreNVMeControllersPossible:
    19351936        {
    1936             CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1937            CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    19371938            return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) &&
    19381939                   (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_PCIe) <
     
    19411942        case R_IsMoreVirtioSCSIControllersPossible:
    19421943        {
    1943             CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     1944            CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    19441945            return (m_enmConfigurationAccessLevel == ConfigurationAccessLevel_Full) &&
    19451946                   (qobject_cast<RootItem*>(m_pRootItem)->childCount(KStorageBus_VirtioSCSI) <
     
    19551956                {
    19561957                    ControllerItem *pItemController = qobject_cast<ControllerItem*>(pItem);
    1957                     CPlatformProperties comProps = uiCommon().virtualBox().GetPlatformProperties(arch());
     1958                    CPlatformProperties comProps = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    19581959                    const bool fIsMoreAttachmentsPossible = (ULONG)rowCount(specifiedIndex) <
    19591960                                                            (comProps.GetMaxPortCountForStorageBus(pItemController->bus()) *
     
    23022303
    23032304                    /* 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());
    23052306                    const uint uMaxPortCount =
    23062307                        (uint)comProperties.GetMaxPortCountForStorageBus(enmNewCtrBusType);
     
    26812682{
    26822683    QMap<KStorageBus, int> maximumMap;
    2683     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     2684    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    26842685    for (int iStorageBusType = KStorageBus_IDE; iStorageBusType < KStorageBus_Max; ++iStorageBusType)
    26852686        maximumMap.insert((KStorageBus)iStorageBusType,
     
    33943395{
    33953396    /* Load currently supported storage buses and types: */
    3396     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(arch());
     3397    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(arch());
    33973398    const QVector<KStorageBus> supportedBuses = comProperties.GetSupportedStorageBuses();
    33983399    const QVector<KStorageControllerType> supportedTypes = comProperties.GetSupportedStorageControllerTypes();
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UITpmEditor.cpp

    r101867 r103771  
    3333
    3434/* GUI includes: */
    35 #include "UICommon.h"
    3635#include "UIConverter.h"
     36#include "UIGlobalSession.h"
    3737#include "UITpmEditor.h"
    3838
     
    156156                                            ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    157157                                            : KPlatformArchitecture_x86;
    158         CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     158        CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    159159        m_supportedValues = comProperties.GetSupportedTpmTypes();
    160160
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIUSBControllerEditor.cpp

    r101867 r103771  
    3232
    3333/* GUI includes: */
    34 #include "UICommon.h"
     34#include "UIGlobalSession.h"
    3535#include "UIUSBControllerEditor.h"
    3636
     
    156156                                        ? optionalFlags().value("arch").value<KPlatformArchitecture>()
    157157                                        : KPlatformArchitecture_x86;
    158     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     158    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    159159    m_supportedValues = comProperties.GetSupportedUSBControllerTypes();
    160160
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIUSBFiltersEditor.cpp

    r103362 r103771  
    3838#include "QITreeWidget.h"
    3939#include "UICommon.h"
     40#include "UIGlobalSession.h"
    4041#include "UIIconPool.h"
    4142#include "UIUSBFilterDetailsEditor.h"
     
    176177
    177178    /* Get host for further activities: */
    178     CHost comHost = uiCommon().host();
     179    CHost comHost = gpGlobalSession->host();
    179180
    180181    /* Check whether we have host USB devices at all: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVRDEAuthLibraryEditor.cpp

    r101011 r103771  
    3131
    3232/* GUI includes: */
    33 #include "UICommon.h"
    3433#include "UIFilePathSelector.h"
     34#include "UIGlobalSession.h"
    3535#include "UIVRDEAuthLibraryEditor.h"
    3636
     
    105105            if (m_pLabel)
    106106                m_pLabel->setBuddy(m_pSelector);
    107             m_pSelector->setInitialPath(uiCommon().homeFolder());
     107            m_pSelector->setInitialPath(gpGlobalSession->homeFolder());
    108108            m_pSelector->setMode(UIFilePathSelector::Mode_File_Open);
    109109
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVideoMemoryEditor.cpp

    r101563 r103771  
    3636#include "QIAdvancedSlider.h"
    3737#include "UICommon.h"
     38#include "UIGlobalSession.h"
    3839#include "UIVideoMemoryEditor.h"
    3940
     
    224225{
    225226    /* Prepare common variables: */
    226     const CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     227    const CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    227228    m_iMinVRAM = comProperties.GetMinGuestVRAM();
    228229    m_iMaxVRAM = comProperties.GetMaxGuestVRAM();
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/editors/UIVirtualCPUEditor.cpp

    r101563 r103771  
    3535/* GUI includes: */
    3636#include "QIAdvancedSlider.h"
    37 #include "UICommon.h"
     37#include "UIGlobalSession.h"
    3838#include "UIVirtualCPUEditor.h"
    3939
     
    137137{
    138138    /* 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();
    141141    m_uMinVCPUCount = comProperties.GetMinGuestCPUCount();
    142142    m_uMaxVCPUCount = qMin(2 * uHostCPUs, (uint)comProperties.GetMaxGuestCPUCount());
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r103315 r103771  
    3636#include "UIErrorString.h"
    3737#include "UIExtraDataManager.h"
     38#include "UIGlobalSession.h"
    3839#include "UIGraphicsControllerEditor.h"
    3940#ifdef VBOX_WITH_3D_ACCELERATION
     
    398399
    399400    /* Check whether remote display server is valid: */
    400     CExtPackManager comExtPackManager = uiCommon().virtualBox().GetExtensionPackManager();
     401    CExtPackManager comExtPackManager = gpGlobalSession->virtualBox().GetExtensionPackManager();
    401402    const bool fExtPackPresent = comExtPackManager.isNotNull() && comExtPackManager.IsExtPackUsable(GUI_ExtPackName);
    402403    CVRDEServer comVrdeServer = m_machine.GetVRDEServer();
     
    698699        if (m_pEditorVRDESettings->isFeatureEnabled())
    699700        {
    700             CExtPackManager extPackManager = uiCommon().virtualBox().GetExtensionPackManager();
     701            CExtPackManager extPackManager = gpGlobalSession->virtualBox().GetExtensionPackManager();
    701702            if (!extPackManager.isNull() && !extPackManager.IsExtPackUsable(GUI_ExtPackName))
    702703            {
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp

    r102085 r103771  
    3333#include "QITabWidget.h"
    3434#include "UIAddDiskEncryptionPasswordDialog.h"
    35 #include "UICommon.h"
    3635#include "UIConverter.h"
     36#include "UIDefs.h"
    3737#include "UIDescriptionEditor.h"
    3838#include "UIDiskEncryptionSettingsEditor.h"
    3939#include "UIDragAndDropEditor.h"
    4040#include "UIErrorString.h"
     41#include "UIGlobalSession.h"
    4142#include "UIMachineSettingsGeneral.h"
    4243#include "UIModalWindowManager.h"
     
    396397    {
    397398        /* Encryption Extension Pack presence test: */
    398         CExtPackManager extPackManager = uiCommon().virtualBox().GetExtensionPackManager();
     399        CExtPackManager extPackManager = gpGlobalSession->virtualBox().GetExtensionPackManager();
    399400        if (!extPackManager.isNull() && !extPackManager.IsExtPackUsable(GUI_ExtPackName))
    400401        {
     
    783784                        const CPlatform comPlatform = m_machine.GetPlatform();
    784785                        CPlatformX86 comPlatformX86 = comPlatform.GetX86();
    785                         const CGuestOSType comNewType = uiCommon().virtualBox().GetGuestOSType(newGeneralData.m_strGuestOsTypeId);
     786                        const CGuestOSType comNewType = gpGlobalSession->virtualBox().GetGuestOSType(newGeneralData.m_strGuestOsTypeId);
    786787                        comPlatformX86.SetCPUProperty(KCPUPropertyTypeX86_LongMode, comNewType.GetIs64Bit());
    787788                        fSuccess = comPlatformX86.isOk();
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp

    r101717 r103771  
    3232/* GUI includes: */
    3333#include "QITabWidget.h"
    34 #include "UICommon.h"
    3534#include "UIErrorString.h"
     35#include "UIGlobalSession.h"
    3636#include "UIMachineSettingsNetwork.h"
    3737#include "UINetworkAttachmentEditor.h"
     
    452452              * is that the limitation to 4 isn't necessary any more, but this needs to be checked
    453453              * 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));
    455455
    456456            /* Create corresponding adapter tabs: */
     
    873873QString UIMachineSettingsNetwork::tabTitle(int iSlot)
    874874{
    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));
    876876}
    877877
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp

    r101607 r103771  
    3131/* GUI includes: */
    3232#include "QITabWidget.h"
    33 #include "UICommon.h"
    3433#include "UIErrorString.h"
     34#include "UIGlobalSession.h"
    3535#include "UIMachineSettingsSerial.h"
    3636#include "UISerialSettingsEditor.h"
     
    310310        {
    311311            /* 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();
    313313
    314314            /* Create corresponding port tabs: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp

    r103287 r103771  
    3535#include "UIBootOrderEditor.h"
    3636#include "UIChipsetEditor.h"
    37 #include "UICommon.h"
    3837#include "UIErrorString.h"
    3938#include "UIExecutionCapEditor.h"
     39#include "UIGlobalSession.h"
    4040#include "UIMachineSettingsSystem.h"
    4141#include "UIMotherboardFeaturesEditor.h"
     
    281281
    282282    /* 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);
    287287
    288288    /* Gather old 'Motherboard' data: */
     
    474474
    475475        /* RAM amount test: */
    476         const ulong uFullSize = uiCommon().host().GetMemorySize();
     476        const ulong uFullSize = gpGlobalSession->host().GetMemorySize();
    477477        if (m_pEditorBaseMemory->value() > (int)m_pEditorBaseMemory->maxRAMAlw())
    478478        {
     
    524524
    525525        /* VCPU amount test: */
    526         const int cTotalCPUs = uiCommon().host().GetProcessorOnlineCoreCount();
     526        const int cTotalCPUs = gpGlobalSession->host().GetProcessorOnlineCoreCount();
    527527        if (m_pEditorVCPU->value() > 2 * cTotalCPUs)
    528528        {
  • trunk/src/VBox/Frontends/VirtualBox/src/snapshots/UISnapshotDetailsWidget.cpp

    r103481 r103771  
    5252#include "UIDesktopWidgetWatchdog.h"
    5353#include "UIDetailsGenerator.h"
     54#include "UIGlobalSession.h"
     55#include "UIGuestOSType.h"
    5456#include "UIIconPool.h"
    55 #include "UIGuestOSType.h"
    5657#include "UISnapshotDetailsWidget.h"
    5758#include "UIMessageCenter.h"
     
    12901291            ++iRowCount;
    12911292            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())));
    12941295
    12951296            /* Location of the settings file: */
     
    17151716    CPlatform comPlatform = comMachine.GetPlatform();
    17161717    const KPlatformArchitecture enmArch = comPlatform.GetArchitecture();
    1717     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     1718    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    17181719    for (ulong i = 1; i <= comProperties.GetMaxBootPosition(); ++i)
    17191720    {
     
    17701771
    17711772            /* VT-x/AMD-V and Nested Paging? */
    1772             if (uiCommon().host().GetProcessorFeature(KProcessorFeature_HWVirtEx))
     1773            if (gpGlobalSession->host().GetProcessorFeature(KProcessorFeature_HWVirtEx))
    17731774            {
    17741775                /* VT-x/AMD-V? */
     
    19641965    const KPlatformArchitecture enmArch = comPlatform.GetArchitecture();
    19651966    const KChipsetType enmChipsetType = comPlatform.GetChipsetType();
    1966     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     1967    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    19671968    const ulong cMaxNetworkAdapters = comProperties.GetMaxNetworkAdapters(enmChipsetType);
    19681969    for (ulong iSlot = 0; iSlot < cMaxNetworkAdapters; ++iSlot)
     
    20252026    CPlatform comPlatform = comMachine.GetPlatform();
    20262027    const KPlatformArchitecture enmArch = comPlatform.GetArchitecture();
    2027     CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(enmArch);
     2028    CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(enmArch);
    20282029    const ulong cMaxSerialPorts = comProperties.GetSerialPortCount();
    20292030    for (ulong iSlot = 0; iSlot < cMaxSerialPorts; ++iSlot)
  • trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp

    r103707 r103771  
    6161#include "UISoftKeyboard.h"
    6262#include "UICommon.h"
     63#include "UIGlobalSession.h"
    6364#ifdef VBOX_WS_MAC
    6465# include "VBoxUtils-darwin.h"
     
    25312532        return;
    25322533    UISoftKeyboardLayout &currentLayout = m_layouts[m_uCurrentLayoutId];
    2533     QString strHomeFolder = uiCommon().homeFolder();
     2534    QString strHomeFolder = gpGlobalSession->homeFolder();
    25342535    QDir dir(strHomeFolder);
    25352536    if (!dir.exists(strSubDirectorName))
     
    32913292void UISoftKeyboardWidget::lookAtDefaultLayoutFolder(QStringList &fileList)
    32923293{
    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);
    32943295    QDir dir(strFolder);
    32953296    if (!dir.exists())
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceEditorWidget.cpp

    r103362 r103771  
    4040/* GUI includes: */
    4141#include "QITreeView.h"
    42 #include "UICommon.h"
     42#include "UIGlobalSession.h"
    4343#include "UIGuestOSType.h"
    4444#include "UIGuestOSTypeSelectionButton.h"
     
    539539                        value = strTmp; break;
    540540                    }
    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;
    543543                    case KVirtualSystemDescriptionType_SoundCard:        value = gpConverter->toString(static_cast<KAudioControllerType>(m_strConfigValue.toInt())); break;
    544544                    case KVirtualSystemDescriptionType_NetworkAdapter:   value = gpConverter->toString(static_cast<KNetworkAdapterType>(m_strConfigValue.toInt())); break;
     
    826826                QSpinBox *pSpinBox = new QSpinBox(pParent);
    827827                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"));
    829829                pEditor = pSpinBox;
    830830                break;
     
    844844                QComboBox *pComboBox = new QComboBox(pParent);
    845845                /* Load currently supported network adapter types: */
    846                 CPlatformProperties comProperties = uiCommon().virtualBox().GetPlatformProperties(KPlatformArchitecture_x86);
     846                CPlatformProperties comProperties = gpGlobalSession->virtualBox().GetPlatformProperties(KPlatformArchitecture_x86);
    847847                QVector<KNetworkAdapterType> supportedTypes = comProperties.GetSupportedNetworkAdapterTypes();
    848848                /* Take currently requested type into account if it's sane: */
     
    900900                QComboBox *pComboBox = new QComboBox(pParent);
    901901                pComboBox->setEditable(true);
    902                 QVector<QString> groupsVector = uiCommon().virtualBox().GetMachineGroups();
     902                QVector<QString> groupsVector = gpGlobalSession->virtualBox().GetMachineGroups();
    903903
    904904                for (int i = 0; i < groupsVector.size(); ++i)
     
    922922                        QSpinBox *pSpinBox = new QSpinBox(pParent);
    923923                        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())));
    925925                        pEditor = pSpinBox;
    926926                        break;
     
    19361936        /* We need some global defaults from the current VirtualBox
    19371937           installation */
    1938         CSystemProperties sp = uiCommon().virtualBox().GetSystemProperties();
     1938        CSystemProperties sp = gpGlobalSession->virtualBox().GetSystemProperties();
    19391939        m_minGuestRAM        = sp.GetMinGuestRAM();
    19401940        m_maxGuestRAM        = sp.GetMaxGuestRAM();
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFormEditorWidget.cpp

    r103549 r103771  
    4545#include "QITableView.h"
    4646#include "QIWithRetranslateUI.h"
    47 #include "UICommon.h"
    4847#include "UIFormEditorWidget.h"
     48#include "UIGlobalSession.h"
    4949#include "UIIconPool.h"
    5050#include "UINotificationCenter.h"
     
    783783{
    784784    /* Acquire min/max amount of RAM guest in theory could have: */
    785     CSystemProperties comProps = uiCommon().virtualBox().GetSystemProperties();
     785    CSystemProperties comProps = gpGlobalSession->virtualBox().GetSystemProperties();
    786786    if (comProps.isOk())
    787787    {
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIGuestOSTypeSelectionButton.cpp

    r103711 r103771  
    3232
    3333/* GUI includes */
    34 #include "UICommon.h"
     34#include "UIGlobalSession.h"
    3535#include "UIGuestOSType.h"
    3636#include "UIGuestOSTypeSelectionButton.h"
     
    8181#endif
    8282
    83     setText(uiCommon().guestOSTypeManager().getDescription(m_strOSTypeId));
     83    setText(gpGlobalSession->guestOSTypeManager().getDescription(m_strOSTypeId));
    8484}
    8585
     
    107107
    108108    const UIGuestOSTypeManager::UIGuestOSFamilyInfo families
    109         = uiCommon().guestOSTypeManager().getFamilies(true);
     109        = gpGlobalSession->guestOSTypeManager().getFamilies(true);
    110110
    111111    for (int i = 0; i < families.size(); ++i)
     
    114114        QMenu *pSubMenu = m_pMainMenu->addMenu(fi.m_strDescription);
    115115        const UIGuestOSTypeManager::UIGuestOSSubtypeInfo distributions
    116             = uiCommon().guestOSTypeManager().getSubtypesForFamilyId(fi.m_strId, true);
     116            = gpGlobalSession->guestOSTypeManager().getSubtypesForFamilyId(fi.m_strId, true);
    117117
    118118        if (distributions.isEmpty())
    119             createOSTypeMenu(uiCommon().guestOSTypeManager().getTypesForFamilyId(fi.m_strId), pSubMenu);
     119            createOSTypeMenu(gpGlobalSession->guestOSTypeManager().getTypesForFamilyId(fi.m_strId), pSubMenu);
    120120        else
    121121        {
    122122            foreach (const UISubtypeInfo &distribution, distributions)
    123                 createOSTypeMenu(uiCommon().guestOSTypeManager().getTypesForSubtype(distribution.m_strName),
     123                createOSTypeMenu(gpGlobalSession->guestOSTypeManager().getTypesForSubtype(distribution.m_strName),
    124124                                 pSubMenu->addMenu(distribution.m_strName));
    125125        }
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMediaComboBox.cpp

    r103546 r103771  
    3333/* GUI includes: */
    3434#include "UICommon.h"
     35#include "UIGlobalSession.h"
    3536#include "UIMediaComboBox.h"
    3637#include "UIMedium.h"
     
    7576    {
    7677        CMediumVector comMedia;
    77         comMedia << uiCommon().host().GetDVDDrives();
    78         comMedia << uiCommon().virtualBox().GetDVDImages();
     78        comMedia << gpGlobalSession->host().GetDVDDrives();
     79        comMedia << gpGlobalSession->virtualBox().GetDVDImages();
    7980        uiCommon().enumerateMedia(comMedia);
    8081    }
  • trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIMediumSizeEditor.cpp

    r103320 r103771  
    3434/* GUI includes: */
    3535#include "QILineEdit.h"
    36 #include "UICommon.h"
    3736#include "UIConverter.h"
     37#include "UIGlobalSession.h"
    3838#include "UIMediumSizeEditor.h"
    3939#include "UITranslator.h"
     
    4848    : QIWithRetranslateUI<QWidget>(pParent)
    4949    , m_uSizeMin(uMinimumSize)
    50     , m_uSizeMax(uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize())
     50    , m_uSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize())
    5151    , m_iSliderScale(calculateSliderScale(m_uSizeMax))
    5252    , m_uSize(0)
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevd/UIWizardCloneVD.cpp

    r99389 r103771  
    2828/* GUI includes: */
    2929#include "UICommon.h"
     30#include "UIGlobalSession.h"
    3031#include "UIMedium.h"
    3132#include "UINotificationCenter.h"
     
    7778
    7879    /* Get VBox object: */
    79     CVirtualBox comVBox = uiCommon().virtualBox();
     80    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    8081
    8182    /* Create new virtual disk image: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVM.cpp

    r101035 r103771  
    2828/* GUI includes: */
    2929#include "UICommon.h"
     30#include "UIGlobalSession.h"
    3031#include "UINotificationCenter.h"
    3132#include "UIWizardCloneVM.h"
     
    188189
    189190    /* Get VBox object: */
    190     CVirtualBox comVBox = uiCommon().virtualBox();
     191    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    191192    /* Create a new machine object: */
    192193    CMachine cloneMachine = comVBox.CreateMachine(m_strCloneFilePath, m_strCloneName, KPlatformArchitecture_x86,
     
    244245void UIWizardCloneVM::populatePages()
    245246{
    246     QString strDefaultMachineFolder = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();
     247    QString strDefaultMachineFolder = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder();
    247248    /* Create corresponding pages: */
    248249    switch (mode())
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/clonevm/UIWizardCloneVMNamePathPage.cpp

    r98103 r103771  
    3232/* GUI includes: */
    3333#include "QIRichTextLabel.h"
     34#include "UIGlobalSession.h"
    3435#include "UIWizardCloneVM.h"
    3536#include "UIWizardCloneVMNamePathPage.h"
    36 #include "UICommon.h"
    3737
    3838/* COM includes: */
     
    4141QString UIWizardCloneVMNamePathCommon::composeCloneFilePath(const QString &strCloneName, const QString &strGroup, const QString &strFolderPath)
    4242{
    43     CVirtualBox vbox = uiCommon().virtualBox();
     43    CVirtualBox vbox = gpGlobalSession->virtualBox();
    4444    return QDir::toNativeSeparators(vbox.ComposeMachineFilename(strCloneName, strGroup, QString(), strFolderPath));
    4545}
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardCloneVMEditors.cpp

    r101563 r103771  
    3737/* GUI includes: */
    3838#include "QILineEdit.h"
    39 #include "UICommon.h"
    4039#include "UIFilePathSelector.h"
     40#include "UIGlobalSession.h"
    4141#include "UIWizardCloneVM.h"
    4242#include "UIWizardCloneVMEditors.h"
     
    8181    if (!fInvalidName)
    8282    {
    83         CVirtualBox vbox = uiCommon().virtualBox();
     83        CVirtualBox vbox = gpGlobalSession->virtualBox();
    8484        QString strCloneFilePath =
    8585            vbox.ComposeMachineFilename(m_pNameLineEdit->text(), strMachineGroup, QString(), m_pPathSelector->path());
     
    289289
    290290    /* Load currently supported clone options: */
    291     CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     291    CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    292292    const QVector<KCloneOptions> supportedOptions = comProperties.GetSupportedCloneOptions();
    293293    /* Check whether we support additional clone options at all: */
     
    403403
    404404    /* Load currently supported clone options: */
    405     CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     405    CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    406406    const QVector<KCloneOptions> supportedOptions = comProperties.GetSupportedCloneOptions();
    407407
     
    465465
    466466        /* Load currently supported clone options: */
    467         CSystemProperties comProperties = uiCommon().virtualBox().GetSystemProperties();
     467        CSystemProperties comProperties = gpGlobalSession->virtualBox().GetSystemProperties();
    468468        const QVector<KCloneOptions> supportedOptions = comProperties.GetSupportedCloneOptions();
    469469        /* Check whether we support linked clone option at all: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/editors/UIWizardDiskEditors.cpp

    r101563 r103771  
    3939#include "QIToolButton.h"
    4040#include "QIRichTextLabel.h"
    41 #include "UICommon.h"
    4241#include "UIConverter.h"
    4342#include "UIFilePathSelector.h"
     43#include "UIGlobalSession.h"
    4444#include "UIHostnameDomainNameEditor.h"
    4545#include "UIIconPool.h"
     
    141141    strChosenFilePath = QIFileDialog::getSaveFileName(folder.absoluteFilePath(strFileName),
    142142                                                              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"));
    144144    return strChosenFilePath;
    145145}
     
    481481void UIDiskFormatBase::populateFormats(){
    482482    /* Enumerate medium formats in special order: */
    483     CSystemProperties properties = uiCommon().virtualBox().GetSystemProperties();
     483    CSystemProperties properties = gpGlobalSession->virtualBox().GetSystemProperties();
    484484    const QVector<CMediumFormat> &formats = properties.GetMediumFormats();
    485485    QMap<QString, CMediumFormat> vdi, preferred, others;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageFormat.cpp

    r101563 r103771  
    4545#include "UIEmptyFilePathSelector.h"
    4646#include "UIExtraDataManager.h"
     47#include "UIGlobalSession.h"
    4748#include "UIIconPool.h"
    4849#include "UINotificationCenter.h"
     
    152153    /* Load currently supported export options: */
    153154    const QVector<KExportOptions> supportedOptions =
    154         uiCommon().virtualBox().GetSystemProperties().GetSupportedExportOptions();
     155        gpGlobalSession->virtualBox().GetSystemProperties().GetSupportedExportOptions();
    155156    /* Check which of supported options/policies are known: */
    156157    QList<MACAddressExportPolicy> supportedPolicies;
     
    342343
    343344    /* Create appliance: */
    344     CVirtualBox comVBox = uiCommon().virtualBox();
     345    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    345346    CAppliance comAppliance = comVBox.CreateAppliance();
    346347    if (!comVBox.isOk())
     
    354355    {
    355356        /* Get the machine with the uMachineId: */
    356         CVirtualBox comVBox = uiCommon().virtualBox();
     357        CVirtualBox comVBox = gpGlobalSession->virtualBox();
    357358        CMachine comMachine = comVBox.FindMachine(uMachineId.toString());
    358359        if (!comVBox.isOk())
     
    536537
    537538    /* Get the machine with the uMachineId: */
    538     CVirtualBox comVBox = uiCommon().virtualBox();
     539    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    539540    CMachine comMachine = comVBox.FindMachine(uMachineId.toString());
    540541    if (!comVBox.isOk())
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportAppPageVMs.cpp

    r98103 r103771  
    3333#include "QIRichTextLabel.h"
    3434#include "UICommon.h"
     35#include "UIGlobalSession.h"
    3536#include "UIIconPool.h"
    3637#include "UIMessageCenter.h"
     
    8687{
    8788    /* Add all VM items into VM selector: */
    88     foreach (const CMachine &comMachine, uiCommon().virtualBox().GetMachines())
     89    foreach (const CMachine &comMachine, gpGlobalSession->virtualBox().GetMachines())
    8990    {
    9091        QPixmap pixIcon;
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportApp.cpp

    r103549 r103771  
    4040#include "QIFileDialog.h"
    4141#include "UICommon.h"
     42#include "UIGlobalSession.h"
    4243#include "UINotificationCenter.h"
    4344#include "UIWizardImportApp.h"
     
    181182
    182183    /* Create an appliance object: */
    183     CVirtualBox comVBox = uiCommon().virtualBox();
     184    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    184185    CAppliance comAppliance = comVBox.CreateAppliance();
    185186    if (!comVBox.isOk())
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageExpert.cpp

    r101563 r103771  
    4646#include "UIFilePathSelector.h"
    4747#include "UIFormEditorWidget.h"
     48#include "UIGlobalSession.h"
    4849#include "UIIconPool.h"
    4950#include "UINotificationCenter.h"
     
    245246                        {
    246247                            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());
    249250                            m_pLabelImportFilePath->setBuddy(m_pEditorImportFilePath);
    250251                            pLayoutAppliance->addWidget(m_pEditorImportFilePath, 1, 1, 1, 2);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSettings.cpp

    r101563 r103771  
    3737#include "UIApplianceImportEditorWidget.h"
    3838#include "UIApplianceUnverifiedCertificateViewer.h"
    39 #include "UICommon.h"
    4039#include "UIFilePathSelector.h"
    4140#include "UIFormEditorWidget.h"
     41#include "UIGlobalSession.h"
    4242#include "UINotificationCenter.h"
    4343#include "UIWizardImportApp.h"
     
    121121        /* Load currently supported import options: */
    122122        const QVector<KImportOptions> supportedOptions =
    123             uiCommon().virtualBox().GetSystemProperties().GetSupportedImportOptions();
     123            gpGlobalSession->virtualBox().GetSystemProperties().GetSupportedImportOptions();
    124124        /* Check which of supported options/policies are known: */
    125125        QList<MACAddressImportPolicy> supportedPolicies;
     
    362362                    {
    363363                        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());
    366366                        m_pLabelImportFilePath->setBuddy(m_pEditorImportFilePath);
    367367                        pLayoutAppliance->addWidget(m_pEditorImportFilePath, 1, 1, 1, 2);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/importappliance/UIWizardImportAppPageSource.cpp

    r103549 r103771  
    4141#include "UIEmptyFilePathSelector.h"
    4242#include "UIExtraDataManager.h"
     43#include "UIGlobalSession.h"
    4344#include "UIIconPool.h"
    4445#include "UINotificationCenter.h"
     
    360361
    361362    /* Create appliance: */
    362     CVirtualBox comVBox = uiCommon().virtualBox();
     363    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    363364    CAppliance comAppliance = comVBox.CreateAppliance();
    364365    if (!comVBox.isOk())
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVD.cpp

    r101383 r103771  
    2828/* GUI includes: */
    2929#include "UICommon.h"
     30#include "UIGlobalSession.h"
    3031#include "UIModalWindowManager.h"
    3132#include "UINotificationCenter.h"
     
    135136
    136137    /* Get VBox object: */
    137     CVirtualBox comVBox = uiCommon().virtualBox();
     138    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    138139
    139140    /* Create new virtual disk image: */
     
    187188
    188189    /* Default size: */
    189     const CGuestOSType comGuestOSType = uiCommon().virtualBox().GetGuestOSType(  !strMachineGuestOSTypeId.isEmpty()
     190    const CGuestOSType comGuestOSType = gpGlobalSession->virtualBox().GetGuestOSType(  !strMachineGuestOSTypeId.isEmpty()
    190191                                                                               ? strMachineGuestOSTypeId
    191192                                                                               : "Other");
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDExpertPage.cpp

    r98103 r103771  
    3434#include "UIWizardNewVDExpertPage.h"
    3535#include "UIWizardNewVD.h"
    36 #include "UICommon.h"
     36#include "UIGlobalSession.h"
    3737#include "UINotificationCenter.h"
    3838
     
    5050    , m_uDefaultSize(uDefaultSize)
    5151    , m_uMediumSizeMin(_4M)
    52     , m_uMediumSizeMax(uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize())
     52    , m_uMediumSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize())
    5353{
    5454    prepare();
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvd/UIWizardNewVDSizeLocationPage.cpp

    r98103 r103771  
    3333#include "UIWizardNewVDSizeLocationPage.h"
    3434#include "UIWizardNewVD.h"
    35 #include "UICommon.h"
     35#include "UIGlobalSession.h"
    3636#include "UINotificationCenter.h"
    3737#include "UIWizardDiskEditors.h"
     
    4444    : m_pMediumSizePathGroup(0)
    4545    , m_uMediumSizeMin(_4M)
    46     , m_uMediumSizeMax(uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize())
     46    , m_uMediumSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize())
    4747    , m_strDefaultName(strDefaultName.isEmpty() ? QString("NewVirtualDisk1") : strDefaultName)
    4848    , m_strDefaultPath(strDefaultPath)
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp

    r102535 r103771  
    3232/* GUI includes: */
    3333#include "UICommon.h"
     34#include "UIGlobalSession.h"
    3435#include "UIGuestOSType.h"
    3536#include "UIMedium.h"
     
    9697
    9798    /* Create installer: */
    98     m_comUnattended = uiCommon().virtualBox().CreateUnattendedInstaller();
     99    m_comUnattended = gpGlobalSession->virtualBox().CreateUnattendedInstaller();
    99100    AssertMsg(!m_comUnattended.isNull(), ("Could not create unattended installer!\n"));
    100101}
     
    146147bool UIWizardNewVM::createVM()
    147148{
    148     CVirtualBox vbox = uiCommon().virtualBox();
     149    CVirtualBox vbox = gpGlobalSession->virtualBox();
    149150
    150151    /* Create virtual machine: */
     
    222223
    223224    /* Acquire VBox: */
    224     CVirtualBox comVBox = uiCommon().virtualBox();
     225    CVirtualBox comVBox = gpGlobalSession->virtualBox();
    225226
    226227    /* Create new virtual hard-disk: */
     
    281282        if (!m_virtualDisk.isNull())
    282283        {
    283             KStorageBus enmHDDBus = uiCommon().guestOSTypeManager().getRecommendedHDStorageBus(m_guestOSTypeId);
     284            KStorageBus enmHDDBus = gpGlobalSession->guestOSTypeManager().getRecommendedHDStorageBus(m_guestOSTypeId);
    284285            CStorageController comHDDController = m_machine.GetStorageControllerByInstance(enmHDDBus, 0);
    285286            if (!comHDDController.isNull())
     
    293294
    294295        /* Attach optical drive: */
    295         KStorageBus enmDVDBus = uiCommon().guestOSTypeManager().getRecommendedDVDStorageBus(m_guestOSTypeId);
     296        KStorageBus enmDVDBus = gpGlobalSession->guestOSTypeManager().getRecommendedDVDStorageBus(m_guestOSTypeId);
    296297        CStorageController comDVDController = m_machine.GetStorageControllerByInstance(enmDVDBus, 0);
    297298        if (!comDVDController.isNull())
     
    301302            if (!strISOFilePath.isEmpty() && !isUnattendedEnabled())
    302303            {
    303                 CVirtualBox vbox = uiCommon().virtualBox();
     304                CVirtualBox vbox = gpGlobalSession->virtualBox();
    304305                opticalDisk =
    305306                    vbox.OpenMedium(strISOFilePath, KDeviceType_DVD, KAccessMode_ReadWrite, false);
     
    314315
    315316        /* Attach an empty floppy drive if recommended */
    316         if (uiCommon().guestOSTypeManager().getRecommendedFloppy(m_guestOSTypeId))
     317        if (gpGlobalSession->guestOSTypeManager().getRecommendedFloppy(m_guestOSTypeId))
    317318        {
    318319            CStorageController comFloppyController = m_machine.GetStorageControllerByInstance(KStorageBus_Floppy, 0);
     
    791792QString UIWizardNewVM::getGuestOSTypeDescription() const
    792793{
    793     return uiCommon().guestOSTypeManager().getDescription(m_guestOSTypeId);
     794    return gpGlobalSession->guestOSTypeManager().getDescription(m_guestOSTypeId);
    794795}
    795796
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMDiskPage.cpp

    r101563 r103771  
    4141#include "UIMediumSelector.h"
    4242#include "UIMediumSizeEditor.h"
    43 #include "UICommon.h"
     43#include "UIGlobalSession.h"
    4444#include "UIWizardNewVMDiskPage.h"
    4545#include "UIWizardDiskEditors.h"
     
    8484    , m_fVDIFormatFound(false)
    8585    , m_uMediumSizeMin(_4M)
    86     , m_uMediumSizeMax(uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize())
     86    , m_uMediumSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize())
    8787    , m_pActionPool(pActionPool)
    8888{
     
    268268    if (!m_userModifiedParameters.contains("SelectedDiskSource"))
    269269    {
    270         iRecommendedSize = uiCommon().guestOSTypeManager().getRecommendedHDD(pWizard->guestOSTypeId());
     270        iRecommendedSize = gpGlobalSession->guestOSTypeManager().getRecommendedHDD(pWizard->guestOSTypeId());
    271271        if (iRecommendedSize != 0)
    272272        {
     
    299299    {
    300300        /* 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();
    302302        const QVector<CMediumFormat> &formats = properties.GetMediumFormats();
    303303        foreach (const CMediumFormat &format, formats)
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMExpertPage.cpp

    r101563 r103771  
    3333
    3434/* GUI includes: */
     35#include "QIToolButton.h"
    3536#include "UICommon.h"
    36 #include "QIToolButton.h"
    3737#include "UIIconPool.h"
     38#include "UIGlobalSession.h"
    3839#include "UIMediaComboBox.h"
    3940#include "UIMedium.h"
     
    7172    , m_fRecommendedNoDisk(false)
    7273    , m_uMediumSizeMin(_4M)
    73     , m_uMediumSizeMax(uiCommon().virtualBox().GetSystemProperties().GetInfoVDSize())
     74    , m_uMediumSizeMax(gpGlobalSession->virtualBox().GetSystemProperties().GetInfoVDSize())
    7475    , m_pActionPool(pActionPool)
    7576{
     
    347348    QString strTypeId = pWizard->guestOSTypeId();
    348349    /* Get recommended 'ram' field value: */
    349     ULONG recommendedRam = uiCommon().guestOSTypeManager().getRecommendedRAM(strTypeId);
     350    ULONG recommendedRam = gpGlobalSession->guestOSTypeManager().getRecommendedRAM(strTypeId);
    350351
    351352    if (m_pHardwareWidgetContainer)
     
    361362
    362363        /* Set Firmware Type of the widget and the wizard: */
    363         KFirmwareType fwType = uiCommon().guestOSTypeManager().getRecommendedFirmware(strTypeId);
     364        KFirmwareType fwType = gpGlobalSession->guestOSTypeManager().getRecommendedFirmware(strTypeId);
    364365        if (!m_userModifiedParameters.contains("EFIEnabled"))
    365366        {
     
    369370
    370371        /* Initialize CPU count:*/
    371         int iCPUCount = uiCommon().guestOSTypeManager().getRecommendedCPUCount(strTypeId);
     372        int iCPUCount = gpGlobalSession->guestOSTypeManager().getRecommendedCPUCount(strTypeId);
    372373        if (!m_userModifiedParameters.contains("CPUCount"))
    373374        {
     
    378379    }
    379380
    380     LONG64 iRecommendedDiskSize = uiCommon().guestOSTypeManager().getRecommendedHDD(strTypeId);
     381    LONG64 iRecommendedDiskSize = gpGlobalSession->guestOSTypeManager().getRecommendedHDD(strTypeId);
    381382    /* Prepare initial disk choice: */
    382383    if (!m_userModifiedParameters.contains("SelectedDiskSource"))
     
    902903            strMediumPath = m_pNameAndSystemEditor->path();
    903904        else
    904             strMediumPath = uiCommon().virtualBox().GetSystemProperties().GetDefaultMachineFolder();
     905            strMediumPath = gpGlobalSession->virtualBox().GetSystemProperties().GetDefaultMachineFolder();
    905906    }
    906907    QString strExtension = UIWizardDiskEditors::defaultExtension(pWizard->mediumFormat(), KDeviceType_HardDisk);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMHardwarePage.cpp

    r101316 r103771  
    3232#include "QIRichTextLabel.h"
    3333#include "UIBaseMemoryEditor.h"
    34 #include "UICommon.h"
     34#include "UIGlobalSession.h"
    3535#include "UIGuestOSType.h"
    3636#include "UIVirtualCPUEditor.h"
     
    9696        if (!m_userModifiedParameters.contains("MemorySize"))
    9797        {
    98             ULONG recommendedRam = uiCommon().guestOSTypeManager().getRecommendedRAM(strTypeId);
     98            ULONG recommendedRam = gpGlobalSession->guestOSTypeManager().getRecommendedRAM(strTypeId);
    9999            m_pHardwareWidgetContainer->setMemorySize(recommendedRam);
    100100            pWizard->setMemorySize(recommendedRam);
     
    102102        if (!m_userModifiedParameters.contains("CPUCount"))
    103103        {
    104             ULONG recommendedCPUs = uiCommon().guestOSTypeManager().getRecommendedCPUCount(strTypeId);
     104            ULONG recommendedCPUs = gpGlobalSession->guestOSTypeManager().getRecommendedCPUCount(strTypeId);
    105105            m_pHardwareWidgetContainer->setCPUCount(recommendedCPUs);
    106106            pWizard->setCPUCount(recommendedCPUs);
     
    108108        if (!m_userModifiedParameters.contains("EFIEnabled"))
    109109        {
    110             KFirmwareType fwType = uiCommon().guestOSTypeManager().getRecommendedFirmware(strTypeId);
     110            KFirmwareType fwType = gpGlobalSession->guestOSTypeManager().getRecommendedFirmware(strTypeId);
    111111            m_pHardwareWidgetContainer->setEFIEnabled(fwType != KFirmwareType_BIOS);
    112112            pWizard->setEFIEnabled(fwType != KFirmwareType_BIOS);
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMNameOSTypePage.cpp

    r103121 r103771  
    3737#include "UICommon.h"
    3838#include "UIDesktopWidgetWatchdog.h"
     39#include "UIGlobalSession.h"
    3940#include "UIIconPool.h"
    4041#include "UINameAndSystemEditor.h"
     
    329330        return;
    330331    /* Get VBox: */
    331     CVirtualBox vbox = uiCommon().virtualBox();
     332    CVirtualBox vbox = gpGlobalSession->virtualBox();
    332333
    333334    /* Compose machine filename: */
     
    554555    else if (!pWizard->detectedOSTypeId().isEmpty())
    555556    {
    556         QString strType = uiCommon().guestOSTypeManager().getDescription(pWizard->detectedOSTypeId());
     557        QString strType = gpGlobalSession->guestOSTypeManager().getDescription(pWizard->detectedOSTypeId());
    557558        if (!pWizard->isUnattendedInstallSupported())
    558559            strMessage = UIWizardNewVM::tr("Detected OS type: %1. %2")
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMSummaryPage.cpp

    r103650 r103771  
    3535#include "QIRichTextLabel.h"
    3636#include "QITreeView.h"
    37 #include "UICommon.h"
     37#include "UIGlobalSession.h"
     38#include "UIGuestOSType.h"
    3839#include "UIIconPool.h"
    39 #include "UIGuestOSType.h"
    4040#include "UIMessageCenter.h"
    4141#include "UINotificationCenter.h"
     
    356356    pNameRoot->addChild(UIWizardNewVM::tr("Machine Folder"), pWizard->machineFolder());
    357357    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()));
    359359
    360360    const QString &ISOPath = pWizard->ISOFilePath();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette