mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 09:55:37 -04:00
[libcalamares] Avoid deprecation warning in network attributes
This commit is contained in:
parent
f0a25bd397
commit
6ee0da41c8
1 changed files with 7 additions and 1 deletions
|
@ -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 )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue