Allow to specify proxy option per request

This commit is contained in:
Vladimir Golovnev (Glassez)
2023-01-29 11:49:42 +03:00
parent 8993d87b32
commit 4745a40f0b
15 changed files with 208 additions and 181 deletions

View File

@@ -80,8 +80,8 @@ void DNSUpdater::checkPublicIP()
Q_ASSERT(m_state == OK);
DownloadManager::instance()->download(
DownloadRequest(u"http://checkip.dyndns.org"_qs).userAgent(QStringLiteral("qBittorrent/" QBT_VERSION_2))
, this, &DNSUpdater::ipRequestFinished);
DownloadRequest(u"http://checkip.dyndns.org"_qs).userAgent(QStringLiteral("qBittorrent/" QBT_VERSION_2))
, true, this, &DNSUpdater::ipRequestFinished);
m_lastIPCheckTime = QDateTime::currentDateTime();
}
@@ -128,8 +128,8 @@ void DNSUpdater::updateDNSService()
m_lastIPCheckTime = QDateTime::currentDateTime();
DownloadManager::instance()->download(
DownloadRequest(getUpdateUrl()).userAgent(QStringLiteral("qBittorrent/" QBT_VERSION_2))
, this, &DNSUpdater::ipUpdateFinished);
DownloadRequest(getUpdateUrl()).userAgent(QStringLiteral("qBittorrent/" QBT_VERSION_2))
, true, this, &DNSUpdater::ipUpdateFinished);
}
QString DNSUpdater::getUpdateUrl() const