Skip to content

Commit

Permalink
don't overwrite wms error messages
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@14928 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 16, 2010
1 parent b49a6c8 commit ec89f49
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/providers/wms/qgswmsprovider.cpp
Original file line number Diff line number Diff line change
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 ec89f49

Please sign in to comment.