Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Avoid string to int conversion
  • Loading branch information
nyalldawson committed Jan 28, 2019
1 parent f453a76 commit 838214b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/qgsnetworkaccessmanager.cpp
Expand Up @@ -242,7 +242,7 @@ QNetworkReply *QgsNetworkAccessManager::createRequest( QNetworkAccessManager::Op
timer->setObjectName( QStringLiteral( "timeoutTimer" ) );
connect( timer, &QTimer::timeout, this, &QgsNetworkAccessManager::abortRequest );
timer->setSingleShot( true );
const int timeout = s.value( QStringLiteral( "/qgis/networkAndProxy/networkTimeout" ), QStringLiteral( "60000" ) ).toInt();
const int timeout = s.value( QStringLiteral( "/qgis/networkAndProxy/networkTimeout" ), 60000 ).toInt();
timer->start( timeout );

connect( reply, &QNetworkReply::downloadProgress, timer, [timer] { timer->start(); } );
Expand Down Expand Up @@ -336,7 +336,7 @@ void QgsNetworkAccessManager::afterSslErrorHandled( QNetworkReply *reply )
Q_ASSERT( !timer->isActive() );
QgsDebugMsg( QStringLiteral( "Restarting network reply timeout" ) );
timer->setSingleShot( true );
timer->start( QgsSettings().value( QStringLiteral( "/qgis/networkAndProxy/networkTimeout" ), QStringLiteral( "60000" ) ).toInt() );
timer->start( QgsSettings().value( QStringLiteral( "/qgis/networkAndProxy/networkTimeout" ), 60000 ).toInt() );
}
}
else if ( this == sMainNAM )
Expand Down

0 comments on commit 838214b

Please sign in to comment.