Changeset 43678 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 18, 2012 11:59:24 AM (13 years ago)
- svn:sync-xref-src-repo-rev:
- 81485
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r43484 r43678 2048 2048 { 2049 2049 UIProxyManager proxyManager(settings().proxySettings()); 2050 if (proxyManager.authEnabled()) 2051 { 2052 proxyManager.setAuthEnabled(false); 2053 proxyManager.setAuthLogin(QString()); 2054 proxyManager.setAuthPassword(QString()); 2055 VBoxGlobalSettings globalSettings = settings(); 2056 globalSettings.setProxySettings(proxyManager.toString()); 2057 vboxGlobal().setSettings(globalSettings); 2058 } 2050 2059 if (proxyManager.proxyEnabled()) 2051 2060 { 2061 #if 0 2052 2062 QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::HttpProxy, 2053 2063 proxyManager.proxyHost(), … … 2055 2065 proxyManager.authEnabled() ? proxyManager.authLogin() : QString(), 2056 2066 proxyManager.authEnabled() ? proxyManager.authPassword() : QString())); 2067 #else 2068 QNetworkProxy::setApplicationProxy(QNetworkProxy(QNetworkProxy::HttpProxy, 2069 proxyManager.proxyHost(), 2070 proxyManager.proxyPort().toInt())); 2071 #endif 2057 2072 } 2058 2073 else -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp
r43459 r43678 7 7 8 8 /* 9 * Copyright (C) 2011 Oracle Corporation9 * Copyright (C) 2011-2012 Oracle Corporation 10 10 * 11 11 * This file is part of VirtualBox Open Source Edition (OSE), as … … 37 37 m_pHostEditor->setValidator(new QRegExpValidator(QRegExp("\\S+"), m_pHostEditor)); 38 38 m_pPortEditor->setValidator(new QRegExpValidator(QRegExp("\\d+"), m_pPortEditor)); 39 #if 0 39 40 m_pLoginEditor->setValidator(new QRegExpValidator(QRegExp("\\S+"), m_pLoginEditor)); 40 41 m_pPasswordEditor->setValidator(new QRegExpValidator(QRegExp("\\S+"), m_pPasswordEditor)); 42 #else 43 m_pLoginLabel->hide(); 44 m_pLoginEditor->hide(); 45 m_pPasswordLabel->hide(); 46 m_pPasswordEditor->hide(); 47 #endif 41 48 42 49 /* Setup connections: */ 43 50 connect(m_pProxyCheckbox, SIGNAL(stateChanged(int)), this, SLOT(sltProxyToggled())); 51 #if 0 44 52 connect(m_pAuthCheckbox, SIGNAL(stateChanged(int)), this, SLOT(sltAuthToggled())); 53 #else 54 m_pAuthCheckbox->hide(); 55 #endif 45 56 46 57 /* Apply language settings: */ … … 60 71 m_cache.m_strProxyHost = proxyManager.proxyHost(); 61 72 m_cache.m_strProxyPort = proxyManager.proxyPort(); 73 #if 0 62 74 m_cache.m_fAuthEnabled = proxyManager.authEnabled(); 63 75 m_cache.m_strAuthLogin = proxyManager.authLogin(); 64 76 m_cache.m_strAuthPassword = proxyManager.authPassword(); 77 #endif 65 78 66 79 /* Upload properties & settings to data: */ … … 76 89 m_pHostEditor->setText(m_cache.m_strProxyHost); 77 90 m_pPortEditor->setText(m_cache.m_strProxyPort); 91 #if 0 78 92 m_pAuthCheckbox->setChecked(m_cache.m_fAuthEnabled); 79 93 m_pLoginEditor->setText(m_cache.m_strAuthLogin); 80 94 m_pPasswordEditor->setText(m_cache.m_strAuthPassword); 95 #endif 81 96 sltProxyToggled(); 82 97 } … … 90 105 m_cache.m_strProxyHost = m_pHostEditor->text(); 91 106 m_cache.m_strProxyPort = m_pPortEditor->text(); 107 #if 0 92 108 m_cache.m_fAuthEnabled = m_pAuthCheckbox->isChecked(); 93 109 m_cache.m_strAuthLogin = m_pLoginEditor->text(); 94 110 m_cache.m_strAuthPassword = m_pPasswordEditor->text(); 111 #endif 95 112 } 96 113 … … 106 123 proxyManager.setProxyHost(m_cache.m_strProxyHost); 107 124 proxyManager.setProxyPort(m_cache.m_strProxyPort); 125 #if 0 108 126 proxyManager.setAuthEnabled(m_cache.m_fAuthEnabled); 109 127 proxyManager.setAuthLogin(m_cache.m_strAuthLogin); 110 128 proxyManager.setAuthPassword(m_cache.m_strAuthPassword); 129 #endif 111 130 m_settings.setProxySettings(proxyManager.toString()); 112 131 … … 127 146 setTabOrder(m_pProxyCheckbox, m_pHostEditor); 128 147 setTabOrder(m_pHostEditor, m_pPortEditor); 148 #if 0 129 149 setTabOrder(m_pPortEditor, m_pAuthCheckbox); 130 150 setTabOrder(m_pAuthCheckbox, m_pLoginEditor); 131 151 setTabOrder(m_pLoginEditor, m_pPasswordEditor); 152 #endif 132 153 } 133 154 … … 146 167 m_pPortLabel->setEnabled(m_pProxyCheckbox->isChecked()); 147 168 m_pPortEditor->setEnabled(m_pProxyCheckbox->isChecked()); 169 #if 0 148 170 m_pAuthCheckbox->setEnabled(m_pProxyCheckbox->isChecked()); 149 171 150 172 /* Update auth widgets also: */ 151 173 sltAuthToggled(); 174 #endif 152 175 } 153 176 177 #if 0 154 178 void UIGlobalSettingsProxy::sltAuthToggled() 155 179 { … … 164 188 m_pValidator->revalidate(); 165 189 } 190 #endif 166 191 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.h
r43459 r43678 6 6 7 7 /* 8 * Copyright (C) 2011 Oracle Corporation8 * Copyright (C) 2011-2012 Oracle Corporation 9 9 * 10 10 * This file is part of VirtualBox Open Source Edition (OSE), as … … 27 27 struct UISettingsCacheGlobalProxy 28 28 { 29 UISettingsCacheGlobalProxy() : m_fProxyEnabled(false), m_fAuthEnabled(false) {} 29 UISettingsCacheGlobalProxy() 30 : m_fProxyEnabled(false) 31 #if 0 32 , m_fAuthEnabled(false) 33 #endif 34 {} 30 35 bool m_fProxyEnabled; 31 36 QString m_strProxyHost; 32 37 QString m_strProxyPort; 38 #if 0 33 39 bool m_fAuthEnabled; 34 40 QString m_strAuthLogin; 35 41 QString m_strAuthPassword; 42 #endif 36 43 }; 37 44 … … 74 81 75 82 void sltProxyToggled(); 83 #if 0 76 84 void sltAuthToggled(); 85 #endif 77 86 78 87 private:
Note:
See TracChangeset
for help on using the changeset viewer.