use the platform-specific proxy settings

This commit is contained in:
Merouane Atig 2013-10-17 12:57:00 +02:00
parent 90c8221cc0
commit 6197235fec

View File

@ -19,6 +19,7 @@
#include <QSettings> #include <QSettings>
#include <QTimer> #include <QTimer>
#include <QWebSettings> #include <QWebSettings>
#include <QNetworkProxyFactory>
#include <QNetworkRequest> #include <QNetworkRequest>
#include <QNetworkReply> #include <QNetworkReply>
#include <QAbstractNetworkCache> #include <QAbstractNetworkCache>
@ -50,6 +51,9 @@ MainWindow::MainWindow(QWidget *parent) :
ui(new Ui::MainWindow), ui(new Ui::MainWindow),
settings("Zeal", "Zeal") settings("Zeal", "Zeal")
{ {
// Use the platform-specific proxy settings
QNetworkProxyFactory::setUseSystemConfiguration(true);
// server for detecting already running instances // server for detecting already running instances
localServer = new QLocalServer(this); localServer = new QLocalServer(this);
connect(localServer, &QLocalServer::newConnection, [&]() { connect(localServer, &QLocalServer::newConnection, [&]() {