Changeset 58310 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Oct 19, 2015 3:35:17 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 103508
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/globals
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r57954 r58310 52 52 /* GUI includes: */ 53 53 # include "VBoxGlobal.h" 54 # include "VBoxUtils.h"55 54 # include "UISelectorWindow.h" 56 55 # include "UIMessageCenter.h" … … 1555 1554 return session; 1556 1555 } 1557 1558 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER1559 void VBoxGlobal::reloadProxySettings()1560 {1561 UIProxyManager proxyManager(settings().proxySettings());1562 if (proxyManager.authEnabled())1563 {1564 proxyManager.setAuthEnabled(false);1565 proxyManager.setAuthLogin(QString());1566 proxyManager.setAuthPassword(QString());1567 VBoxGlobalSettings globalSettings = settings();1568 globalSettings.setProxySettings(proxyManager.toString());1569 vboxGlobal().setSettings(globalSettings);1570 }1571 if (proxyManager.proxyEnabled())1572 {1573 #if 01574 QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::HttpProxy,1575 proxyManager.proxyHost(),1576 proxyManager.proxyPort().toInt(),1577 proxyManager.authEnabled() ? proxyManager.authLogin() : QString(),1578 proxyManager.authEnabled() ? proxyManager.authPassword() : QString()));1579 #else1580 QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::HttpProxy,1581 proxyManager.proxyHost(),1582 proxyManager.proxyPort().toInt()));1583 #endif1584 }1585 else1586 {1587 QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::NoProxy));1588 }1589 }1590 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */1591 1556 1592 1557 void VBoxGlobal::createMedium(const UIMedium &medium) … … 3870 3835 } 3871 3836 3872 void VBoxGlobal::sltProcessGlobalSettingChange()3873 {3874 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER3875 /* Reload proxy settings: */3876 reloadProxySettings();3877 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */3878 }3879 3880 3837 // Protected members 3881 3838 //////////////////////////////////////////////////////////////////////////////// … … 4373 4330 startMediumEnumeration(); 4374 4331 4375 /* Prepare global settings change handler: */4376 connect(&settings(), SIGNAL(propertyChanged(const char*, const char*)),4377 this, SLOT(sltProcessGlobalSettingChange()));4378 /* Handle global settings change for the first time: */4379 sltProcessGlobalSettingChange();4380 4381 4332 /* Create shortcut pool: */ 4382 4333 UIShortcutPool::create(); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h
r57952 r58310 338 338 CSession openExistingSession(const QString &aId) { return openSession(aId, KLockType_Shared); } 339 339 340 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER341 void reloadProxySettings();342 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */343 344 340 /* API: Medium-processing stuff: */ 345 341 void createMedium(const UIMedium &medium); … … 494 490 495 491 void sltGUILanguageChange(QString strLang); 496 void sltProcessGlobalSettingChange();497 492 498 493 protected slots:
Note:
See TracChangeset
for help on using the changeset viewer.