Skip to content
Permalink
Browse files

If a network request error occurs while reading the streamed GML, the…

…n return a failure status from the getFeatures method
  • Loading branch information
palmerj committed Jul 14, 2013
1 parent 738b7e3 commit 2db4f3515fbbb06d95388464523d45c0afee623e
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/core/qgsgml.cpp
@@ -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() )

0 comments on commit 2db4f35

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