Skip to content
Permalink
Browse files

Avoid string to int conversion

  • Loading branch information
nyalldawson committed Jan 28, 2019
1 parent f453a76 commit 838214bfc2aaefa05a36b5b56286a3243f90088a
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/core/qgsnetworkaccessmanager.cpp
@@ -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(); } );
@@ -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 )

0 comments on commit 838214b

Please sign in to comment.
You can’t perform that action at this time.