Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
don't overwrite wms error messages
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@14928 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 16, 2010
1 parent a7bae8c commit 0a099b5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/providers/wms/qgswmsprovider.cpp
Expand Up @@ -849,6 +849,8 @@ bool QgsWmsProvider::retrieveServerCapabilities( bool forceRefresh )
{
QString url = mBaseUrl + "SERVICE=WMS&REQUEST=GetCapabilities";

mError = "";

QNetworkRequest request( url );
request.setAttribute( QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferNetwork );
request.setAttribute( QNetworkRequest::CacheSaveControlAttribute, true );
Expand All @@ -866,8 +868,11 @@ bool QgsWmsProvider::retrieveServerCapabilities( bool forceRefresh )

if ( httpcapabilitiesresponse.isEmpty() )
{
mErrorFormat = "text/plain";
mError = tr( "empty capabilities document" );
if ( mError.isEmpty() )
{
mErrorFormat = "text/plain";
mError = tr( "empty capabilities document" );
}
return false;
}

Expand Down

0 comments on commit 0a099b5

Please sign in to comment.