Skip to content

Commit ec89f49

Browse files
author
jef
committedDec 16, 2010
don't overwrite wms error messages
git-svn-id: http://svn.osgeo.org/qgis/trunk@14928 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent b49a6c8 commit ec89f49

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
 

‎src/providers/wms/qgswmsprovider.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -849,6 +849,8 @@ bool QgsWmsProvider::retrieveServerCapabilities( bool forceRefresh )
849849
{
850850
QString url = mBaseUrl + "SERVICE=WMS&REQUEST=GetCapabilities";
851851

852+
mError = "";
853+
852854
QNetworkRequest request( url );
853855
request.setAttribute( QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferNetwork );
854856
request.setAttribute( QNetworkRequest::CacheSaveControlAttribute, true );
@@ -866,8 +868,11 @@ bool QgsWmsProvider::retrieveServerCapabilities( bool forceRefresh )
866868

867869
if ( httpcapabilitiesresponse.isEmpty() )
868870
{
869-
mErrorFormat = "text/plain";
870-
mError = tr( "empty capabilities document" );
871+
if ( mError.isEmpty() )
872+
{
873+
mErrorFormat = "text/plain";
874+
mError = tr( "empty capabilities document" );
875+
}
871876
return false;
872877
}
873878

0 commit comments

Comments
 (0)
Please sign in to comment.