mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
If a network request error occurs while reading the streamed GML, then return a failure status from the getFeatures method
This commit is contained in:
parent
738b7e3cdb
commit
2db4f3515f
@ -128,9 +128,22 @@ int QgsGml::getFeatures( const QString& uri, QGis::WkbType* wkbType, QgsRectangl
|
||||
QCoreApplication::processEvents();
|
||||
}
|
||||
|
||||
QNetworkReply::NetworkError replyError = reply->error();
|
||||
QString replyErrorString = reply->errorString();
|
||||
|
||||
delete reply;
|
||||
delete progressDialog;
|
||||
|
||||
if ( replyError )
|
||||
{
|
||||
QgsMessageLog::logMessage(
|
||||
tr( "GML Getfeature network request failed with error: %1" ).arg( replyErrorString ),
|
||||
tr( "Network" ),
|
||||
QgsMessageLog::CRITICAL
|
||||
);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( *mWkbType != QGis::WKBNoGeometry )
|
||||
{
|
||||
if ( mExtent.isEmpty() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user