1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Fix proxy set only after request sent.

This commit is contained in:
sudden6 2016-01-30 00:15:14 +01:00
parent 53330daab7
commit 25359d55b5

View File

@ -107,8 +107,8 @@ AutoUpdater::VersionInfo AutoUpdater::getUpdateVersion()
return versionInfo; return versionInfo;
QNetworkAccessManager *manager = new QNetworkAccessManager; QNetworkAccessManager *manager = new QNetworkAccessManager;
QNetworkReply* reply = manager->get(QNetworkRequest(QUrl(checkURI)));
manager->setProxy(Settings::getInstance().getProxy()); manager->setProxy(Settings::getInstance().getProxy());
QNetworkReply* reply = manager->get(QNetworkRequest(QUrl(checkURI)));
while (!reply->isFinished()) while (!reply->isFinished())
{ {
if (abortFlag) if (abortFlag)
@ -222,8 +222,8 @@ QByteArray AutoUpdater::getUpdateFlist()
QByteArray flist; QByteArray flist;
QNetworkAccessManager *manager = new QNetworkAccessManager; QNetworkAccessManager *manager = new QNetworkAccessManager;
QNetworkReply* reply = manager->get(QNetworkRequest(QUrl(flistURI)));
manager->setProxy(Settings::getInstance().getProxy()); manager->setProxy(Settings::getInstance().getProxy());
QNetworkReply* reply = manager->get(QNetworkRequest(QUrl(flistURI)));
while (!reply->isFinished()) while (!reply->isFinished())
{ {
if (abortFlag) if (abortFlag)