File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments