Skip to content
Permalink
Browse files
don't overwrite wms error messages
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 ec89f4906c4e3ef90c1439e892f13eecba56b556
Showing with 7 additions and 2 deletions.
  1. +7 −2 src/providers/wms/qgswmsprovider.cpp
@@ -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 );
@@ -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;
}

0 comments on commit ec89f49

Please sign in to comment.