Skip to content

Commit 6cfe4a5

Browse files
committed
Follow up 24bbd48
1 parent 9621436 commit 6cfe4a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/qgsnetworkaccessmanager.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,11 @@ QNetworkReply *QgsNetworkAccessManager::createRequest( QNetworkAccessManager::Op
132132
emit requestCreated( reply );
133133

134134
// abort request, when network timeout happens
135+
QTimer *timer = new QTimer( reply );
136+
connect( timer, SIGNAL( timeout() ), this, SLOT( abortRequest() ) );
135137
QSettings s;
136-
QTimer::singleShot( s.value( "/qgis/networkAndProxy/networkTimeout", "20000" ).toInt(), this, SLOT( abortRequested() ) );
138+
timer->setSingleShot( true );
139+
timer->start( s.value( "/qgis/networkAndProxy/networkTimeout", "20000" ).toInt() );
137140

138141
return reply;
139142
}

0 commit comments

Comments
 (0)