mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 06:15:38 +00:00
Qt: Fix compiling auto updater with Qt 6
This commit is contained in:
parent
c4348beed4
commit
2285e219e1
|
@ -116,7 +116,9 @@ void AutoUpdaterDialog::queueUpdateCheck(bool display_message)
|
||||||
|
|
||||||
QUrl url(QUrl::fromEncoded(QByteArray(LATEST_TAG_URL)));
|
QUrl url(QUrl::fromEncoded(QByteArray(LATEST_TAG_URL)));
|
||||||
QNetworkRequest request(url);
|
QNetworkRequest request(url);
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
||||||
|
#endif
|
||||||
m_network_access_mgr->get(request);
|
m_network_access_mgr->get(request);
|
||||||
#else
|
#else
|
||||||
emit updateCheckCompleted();
|
emit updateCheckCompleted();
|
||||||
|
@ -133,7 +135,9 @@ void AutoUpdaterDialog::queueGetLatestRelease()
|
||||||
|
|
||||||
QUrl url(QUrl::fromEncoded(QByteArray(url_string)));
|
QUrl url(QUrl::fromEncoded(QByteArray(url_string)));
|
||||||
QNetworkRequest request(url);
|
QNetworkRequest request(url);
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
||||||
|
#endif
|
||||||
m_network_access_mgr->get(request);
|
m_network_access_mgr->get(request);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -266,7 +270,9 @@ void AutoUpdaterDialog::queueGetChanges()
|
||||||
StringUtil::StdStringFromFormat(CHANGES_URL, g_scm_hash_str, getCurrentUpdateTag().c_str()));
|
StringUtil::StdStringFromFormat(CHANGES_URL, g_scm_hash_str, getCurrentUpdateTag().c_str()));
|
||||||
QUrl url(QUrl::fromEncoded(QByteArray(url_string.c_str(), static_cast<int>(url_string.size()))));
|
QUrl url(QUrl::fromEncoded(QByteArray(url_string.c_str(), static_cast<int>(url_string.size()))));
|
||||||
QNetworkRequest request(url);
|
QNetworkRequest request(url);
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
|
||||||
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
request.setAttribute(QNetworkRequest::FollowRedirectsAttribute, true);
|
||||||
|
#endif
|
||||||
m_network_access_mgr->get(request);
|
m_network_access_mgr->get(request);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue