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 )
849
849
{
850
850
QString url = mBaseUrl + " SERVICE=WMS&REQUEST=GetCapabilities" ;
851
851
852
+ mError = " " ;
853
+
852
854
QNetworkRequest request ( url );
853
855
request.setAttribute ( QNetworkRequest::CacheLoadControlAttribute, QNetworkRequest::PreferNetwork );
854
856
request.setAttribute ( QNetworkRequest::CacheSaveControlAttribute, true );
@@ -866,8 +868,11 @@ bool QgsWmsProvider::retrieveServerCapabilities( bool forceRefresh )
866
868
867
869
if ( httpcapabilitiesresponse.isEmpty () )
868
870
{
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
+ }
871
876
return false ;
872
877
}
873
878
You can’t perform that action at this time.
0 commit comments