Skip to content
Permalink
Browse files

[WFS provider] Fix setSubsetString() to accept SELECT followed by new…

…line or tabulation
  • Loading branch information
rouault committed Jun 7, 2016
1 parent 5c3aa51 commit 496c3f03a130295996cbed8abf8216119966df56
Showing with 5 additions and 1 deletion.
  1. +5 −1 src/providers/wfs/qgswfsprovider.cpp
@@ -655,6 +655,7 @@ QString QgsWFSProvider::subsetString()

bool QgsWFSProvider::setSubsetString( const QString& theSQL, bool updateFeatureCount )
{
QgsDebugMsg( QString( "theSql = '%1'" ).arg( theSQL ) );
mSubsetString = theSQL;
mCacheMinMaxDirty = true;

@@ -663,7 +664,10 @@ bool QgsWFSProvider::setSubsetString( const QString& theSQL, bool updateFeatureC
mShared->mLayerPropertiesList.clear();
mShared->mMapFieldNameToSrcLayerNameFieldName.clear();
mShared->mDistinctSelect = false;
if ( theSQL.startsWith( "SELECT ", Qt::CaseInsensitive ) )
if ( theSQL.startsWith( "SELECT ", Qt::CaseInsensitive ) ||
theSQL.startsWith( "SELECT\t", Qt::CaseInsensitive ) ||
theSQL.startsWith( "SELECT\r", Qt::CaseInsensitive ) ||
theSQL.startsWith( "SELECT\n", Qt::CaseInsensitive ) )
{
QString errorMsg, warningMsg;
if ( !processSQL( theSQL, errorMsg, warningMsg ) )

0 comments on commit 496c3f0

Please sign in to comment.
You can’t perform that action at this time.