Fix compiling against Qt 5.14

This commit is contained in:
Phillip Stephens 2021-02-26 15:57:15 -08:00
parent 92fe1a9577
commit 3b9da77bd2
1 changed files with 8 additions and 0 deletions

View File

@ -58,7 +58,11 @@ void DownloadManager::fetchIndex() {
m_indexInProgress = m_netManager.get(QNetworkRequest(url));
connect(m_indexInProgress, &QNetworkReply::finished, this, &DownloadManager::indexFinished);
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
connect(m_indexInProgress, &QNetworkReply::errorOccurred, this, &DownloadManager::indexError);
#else
connect(m_indexInProgress, &QNetworkReply::error, this, &DownloadManager::indexError);
#endif
connect(m_indexInProgress, &QNetworkReply::encrypted, this, &DownloadManager::indexValidateCert);
}
@ -74,7 +78,11 @@ void DownloadManager::fetchBinary(const QString& str, const QString& outPath) {
const auto url = QUrl(QStringLiteral("%1%2/%3/%4").arg(Domain, track, CurPlatformString, str));
m_binaryInProgress = m_netManager.get(QNetworkRequest(url));
connect(m_binaryInProgress, &QNetworkReply::finished, this, &DownloadManager::binaryFinished);
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
connect(m_binaryInProgress, &QNetworkReply::errorOccurred, this, &DownloadManager::binaryError);
#else
connect(m_binaryInProgress, &QNetworkReply::error, this, &DownloadManager::binaryError);
#endif
connect(m_binaryInProgress, &QNetworkReply::encrypted, this, &DownloadManager::binaryValidateCert);
connect(m_binaryInProgress, &QNetworkReply::downloadProgress, this, &DownloadManager::binaryDownloadProgress);