diff --git a/src/libcalamares/network/Manager.cpp b/src/libcalamares/network/Manager.cpp index d089551bb..79db1a587 100644 --- a/src/libcalamares/network/Manager.cpp +++ b/src/libcalamares/network/Manager.cpp @@ -27,10 +27,16 @@ namespace Network void RequestOptions::applyToRequest( QNetworkRequest* request ) const { +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) + constexpr const auto RedirectPolicyAttribute = QNetworkRequest::FollowRedirectsAttribute; +#else + constexpr const auto RedirectPolicyAttribute = QNetworkRequest::RedirectPolicyAttribute; +#endif + if ( m_flags & Flag::FollowRedirect ) { // Follows all redirects except unsafe ones (https to http). - request->setAttribute( QNetworkRequest::FollowRedirectsAttribute, true ); + request->setAttribute( RedirectPolicyAttribute, true ); } if ( m_flags & Flag::FakeUserAgent )