Renamed subset to subsetstring for clarity

This commit is contained in:
Alessandro Pasotti 2020-08-13 11:13:44 +02:00
parent e0bcc7e8a3
commit f3a451f2a9
3 changed files with 4 additions and 4 deletions

View File

@ -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;

View File

@ -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() ) );
}
@ -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 );

View File

@ -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 );