Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Renamed subset to subsetstring for clarity
  • Loading branch information
elpaso committed Aug 13, 2020
1 parent e0bcc7e commit f3a451f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Expand Up @@ -94,7 +94,7 @@ uid=column_name is the name of a column with unique inte
nogeometry is a flag to force the layer to be a non-geometry layer
query=sql represents the SQL query. Must be URL-encoded
field=column_name:[int|real|text] represents a field with its name and its type
subset=where_condition represents the subset
subsetstring=subset_string represents the subsetstring
%End

QUrl toUrl() const;
Expand Down
4 changes: 2 additions & 2 deletions src/core/qgsvirtuallayerdefinition.cpp
Expand Up @@ -162,7 +162,7 @@ QgsVirtualLayerDefinition QgsVirtualLayerDefinition::fromUrl( const QUrl &url )
{
def.setLazy( true );
}
else if ( key == QLatin1String( "subset" ) )
else if ( key == QLatin1String( "subsetstring" ) )
{
def.setSubsetString( QUrl::fromPercentEncoding( value.toUtf8() ) );
}
Expand Down Expand Up @@ -308,7 +308,7 @@ QUrl QgsVirtualLayerDefinition::toUrl() const

if ( ! subsetString().isEmpty() )
{
urlQuery.addQueryItem( QStringLiteral( "subset" ), QUrl::toPercentEncoding( subsetString() ) );
urlQuery.addQueryItem( QStringLiteral( "subsetstring" ), QUrl::toPercentEncoding( subsetString() ) );
}

url.setQuery( urlQuery );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvirtuallayerdefinition.h
Expand Up @@ -95,7 +95,7 @@ class CORE_EXPORT QgsVirtualLayerDefinition
* nogeometry is a flag to force the layer to be a non-geometry layer
* query=sql represents the SQL query. Must be URL-encoded
* field=column_name:[int|real|text] represents a field with its name and its type
* subset=where_condition represents the subset
* subsetstring=subset_string represents the subsetstring
*/
static QgsVirtualLayerDefinition fromUrl( const QUrl &url );

Expand Down

0 comments on commit f3a451f

Please sign in to comment.