VirtualBox

Changeset 66590 in vbox


Ignore:
Timestamp:
Apr 17, 2017 2:17:24 PM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
114617
Message:

FE/Qt: Get rid of VBoxGlobalSettings: Moving VBox proxy settings handling into extra-data manager.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.cpp

    r66589 r66590  
    5151{
    5252    /* default settings */
    53     proxySettings = QString::null;
    5453    hostScreenSaverDisabled = false;
    5554}
     
    5756VBoxGlobalSettingsData::VBoxGlobalSettingsData (const VBoxGlobalSettingsData &that)
    5857{
    59     proxySettings = that.proxySettings;
    6058    hostScreenSaverDisabled = that.hostScreenSaverDisabled;
    6159}
     
    6866{
    6967    return this == &that ||
    70         (proxySettings == that.proxySettings &&
    71          hostScreenSaverDisabled == that.hostScreenSaverDisabled
     68        (hostScreenSaverDisabled == that.hostScreenSaverDisabled
    7269        );
    7370}
     
    8885gPropertyMap[] =
    8986{
    90     { "GUI/ProxySettings",                         "proxySettings",           "[\\s\\S]*", true },
    9187    { "GUI/HostScreenSaverDisabled",               "hostScreenSaverDisabled", "true|false", true }
    9288};
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxGlobalSettings.h

    r66589 r66590  
    3737private:
    3838
    39     QString proxySettings;
    4039    bool hostScreenSaverDisabled;
    4140
     
    4847{
    4948    Q_OBJECT
    50     Q_PROPERTY (QString proxySettings READ proxySettings WRITE setProxySettings)
    5149    Q_PROPERTY (bool hostScreenSaverDisabled READ hostScreenSaverDisabled WRITE setHostScreenSaverDisabled)
    5250
     
    6361
    6462    // Properties
    65 
    66     QString proxySettings() const { return data()->proxySettings; }
    67     void setProxySettings (const QString &aProxySettings)
    68     {
    69         mData()->proxySettings = aProxySettings;
    70     }
    7163
    7264    bool hostScreenSaverDisabled() const { return data()->hostScreenSaverDisabled; }
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp

    r66589 r66590  
    6161const char* UIExtraDataDefs::GUI_Input_AutoCapture = "GUI/Input/AutoCapture";
    6262const char* UIExtraDataDefs::GUI_RemapScancodes = "GUI/RemapScancodes";
     63
     64/* Settings: Proxy: */
     65const char* UIExtraDataDefs::GUI_ProxySettings = "GUI/ProxySettings";
    6366
    6467/* Settings: Storage: */
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h

    r66589 r66590  
    9696        /** Holds Runtime UI remapped scan codes. */
    9797        extern const char* GUI_RemapScancodes;
     98    /** @} */
     99
     100    /** @name Settings: Proxy
     101      * @{ */
     102        /** Holds VBox proxy settings. */
     103        extern const char* GUI_ProxySettings;
    98104    /** @} */
    99105
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r66589 r66590  
    24922492}
    24932493
     2494QString UIExtraDataManager::proxySettings()
     2495{
     2496    return extraDataString(GUI_ProxySettings);
     2497}
     2498
     2499void UIExtraDataManager::setProxySettings(const QString &strSettings)
     2500{
     2501    setExtraDataString(GUI_ProxySettings, strSettings);
     2502}
     2503
    24942504QString UIExtraDataManager::recentFolderForHardDrives()
    24952505{
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r66589 r66590  
    231231        /** Returns the Runtime UI remapped scan codes. */
    232232        QString remappedScanCodes();
     233    /** @} */
     234
     235    /** @name Settings: Proxy
     236      * @{ */
     237        /** Returns VBox proxy settings. */
     238        QString proxySettings();
     239        /** Defines VBox proxy @a strSettings. */
     240        void setProxySettings(const QString &strSettings);
    233241    /** @} */
    234242
  • trunk/src/VBox/Frontends/VirtualBox/src/net/UINetworkReply.cpp

    r62493 r66590  
    3131# include "UINetworkReply.h"
    3232# include "UINetworkManager.h"
     33# include "UIExtraDataManager.h"
    3334# ifndef VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS
    3435#  include "VBoxGlobal.h"
     
    387388#ifndef VBOX_GUI_IN_TST_SSL_CERT_DOWNLOADS
    388389    /* Get the proxy-manager: */
    389     UIProxyManager proxyManager(vboxGlobal().settings().proxySettings());
     390    UIProxyManager proxyManager(gEDataManager->proxySettings());
    390391
    391392    /* If the specific proxy settings are enabled, we'll use them
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp

    r66568 r66590  
    2626# include "QIWidgetValidator.h"
    2727# include "UIGlobalSettingsProxy.h"
     28# include "UIExtraDataManager.h"
    2829# include "VBoxUtils.h"
    2930
     
    9091
    9192    /* Gather old proxy data: */
    92     UIProxyManager proxyManager(m_settings.proxySettings());
     93    UIProxyManager proxyManager(gEDataManager->proxySettings());
    9394    oldProxyData.m_enmProxyState = proxyManager.proxyState();
    9495    oldProxyData.m_strProxyHost = proxyManager.proxyHost();
     
    151152        proxyManager.setProxyHost(m_pCache->data().m_strProxyHost);
    152153        proxyManager.setProxyPort(m_pCache->data().m_strProxyPort);
    153         m_settings.setProxySettings(proxyManager.toString());
     154        gEDataManager->setProxySettings(proxyManager.toString());
    154155    }
    155156
Note: See TracChangeset for help on using the changeset viewer.

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