Skip to content
Permalink
Browse files

Apply suggestions from code review

Co-authored-by: Nyall Dawson <nyall.dawson@gmail.com>
(cherry picked from commit 2adf89c)
  • Loading branch information
elpaso authored and nyalldawson committed Apr 17, 2021
1 parent 44d2b4b commit a53f669245db8654daedb5f1101437aabf40edbc
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/providers/wms/qgswmsprovider.cpp
  2. +1 −1 src/server/services/wms/qgswmsrenderer.cpp
@@ -3492,7 +3492,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPointXY &point, QgsRa
// Try to parse and set feature id if matches "<some string>.<integer>"
if ( f.value( QLatin1String( "id" ) ).isString() )
{
static const QRegularExpression re{ R"raw(\.(\d+)$)raw" };
const thread_local QRegularExpression re{ R"raw(\.(\d+)$)raw" };
const QString idVal { f.value( QLatin1String( "id" ) ).toString() };
const QRegularExpressionMatch match { re.match( idVal ) };
if ( match.hasMatch() )
@@ -2432,7 +2432,7 @@ namespace QgsWms
if ( layer && layer->dataProvider() )
fid = QgsServerFeatureId::getServerFid( *feat, layer->dataProvider()->pkAttributeIndexes() );
else
fid = QString::number( feat->id() );
fid = FID_TO_STRING( feat->id() );

typeNameElement.setAttribute( QStringLiteral( "fid" ), QStringLiteral( "%1.%2" ).arg( typeName, fid ) );

0 comments on commit a53f669

Please sign in to comment.