Skip to content

Commit

Permalink
Fix build on Qt 5.9
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Dec 20, 2018
1 parent a457482 commit 18376c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/core/qgsnetworkreply.cpp
Expand Up @@ -22,7 +22,11 @@ QgsNetworkReplyContent::QgsNetworkReplyContent( QNetworkReply *reply )
, mErrorString( reply->errorString() )
, mRawHeaderPairs( reply->rawHeaderPairs() )
{
for ( int i = 0; i < QNetworkRequest::ResourceTypeAttribute; ++i )
int maxAttribute = static_cast< int >( QNetworkRequest::RedirectPolicyAttribute );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 11, 0 )
maxAttribute = static_cast< int >( QNetworkRequest::Http2DirectAttribute );
#endif
for ( int i = 0; i <= maxAttribute; ++i )
{
if ( reply->attribute( static_cast< QNetworkRequest::Attribute>( i ) ).isValid() )
mAttributes[ static_cast< QNetworkRequest::Attribute>( i ) ] = reply->attribute( static_cast< QNetworkRequest::Attribute>( i ) );
Expand Down

0 comments on commit 18376c4

Please sign in to comment.