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:
Jeremy Palmer 2013-06-30 20:03:53 +12:00
parent 738b7e3cdb
commit 2db4f3515f

View File

@ -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() )