Skip to content
Permalink
Browse files

[wms] Misc Qt 6 fixes

  • Loading branch information
nyalldawson committed Mar 30, 2021
1 parent 405ae2d commit 9085de274b35521d87db938329bd5f3541437f36
Showing with 4 additions and 2 deletions.
  1. +1 −1 src/providers/wms/qgswmscapabilities.cpp
  2. +3 −1 src/providers/wms/qgswmsprovider.cpp
@@ -1154,7 +1154,7 @@ void QgsWmsCapabilities::parseLayer( const QDomElement &element, QgsWmsLayerProp
{
// CRS can contain several definitions separated by whitespace
// though this was deprecated in WMS 1.1.1
const QStringList crsList = nodeElement.text().split( QRegExp( "\\s+" ) );
const QStringList crsList = nodeElement.text().split( QRegularExpression( "\\s+" ) );
for ( const QString &srs : crsList )
{
if ( !layerProperty.crs.contains( srs ) )
@@ -2167,7 +2167,7 @@ QString QgsWmsProvider::layerMetadata( QgsWmsLayerProperty &layer )
}

// Layer Coordinate Reference Systems
for ( int j = 0; j < std::min( layer.crs.size(), 10 ); j++ )
for ( int j = 0; j < std::min( static_cast< int >( layer.crs.size() ), 10 ); j++ )
{
metadata += QStringLiteral( "<tr><td>" ) %
tr( "Available in CRS" ) %
@@ -3275,7 +3275,9 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPointXY &point, QgsRa
dom.setContent( gmlByteArray ); // gets XML encoding
gmlByteArray.clear();
QTextStream stream( &gmlByteArray );
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
stream.setCodec( QTextCodec::codecForName( "UTF-8" ) );
#endif
dom.save( stream, 4, QDomNode::EncodingFromTextStream );

QgsDebugMsgLevel( "GML UTF-8 (first 2000 bytes):\n" + gmlByteArray.left( 2000 ), 2 );

0 comments on commit 9085de2

Please sign in to comment.