mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-16 17:39:58 +00:00
Set Application Proxy from Operating System
Uses the QT proxy query and application wide proxy setting to allow users behind a corporate firewall to use network functions (maps, TP.com, ergDB etc). Fixes #27.
This commit is contained in:
@@ -134,6 +134,13 @@ MainWindow::MainWindow(const QDir &home) :
|
||||
|
||||
mainwindows.append(this); // add us to the list of open windows
|
||||
|
||||
// Network proxy
|
||||
QNetworkProxyQuery npq(QUrl("http://www.google.com"));
|
||||
QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::systemProxyForQuery(npq);
|
||||
if (listOfProxies.count() > 0) {
|
||||
QNetworkProxy::setApplicationProxy(listOfProxies.first());
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* Basic GUI setup
|
||||
*--------------------------------------------------------------------*/
|
||||
|
||||
Reference in New Issue
Block a user