"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/core/qgsvirtuallayerdefinition.cpp" between
QGIS-final-3_14_15.tar.gz and QGIS-final-3_14_16.tar.gz

About: QGIS (Quantum GIS) is a Geographic Information System that supports vector, raster, and database formats. Latest release (3.14.x series).

qgsvirtuallayerdefinition.cpp  (QGIS-final-3_14_15):qgsvirtuallayerdefinition.cpp  (QGIS-final-3_14_16)
skipping to change at line 165 skipping to change at line 165
if ( fieldType == QLatin1String( "text" ) ) if ( fieldType == QLatin1String( "text" ) )
{ {
fields.append( QgsField( fieldName, QVariant::String, fieldType ) ); fields.append( QgsField( fieldName, QVariant::String, fieldType ) );
} }
} }
} }
else if ( key == QLatin1String( "lazy" ) ) else if ( key == QLatin1String( "lazy" ) )
{ {
def.setLazy( true ); def.setLazy( true );
} }
else if ( key == QLatin1String( "subsetstring" ) )
{
def.setSubsetString( QUrl::fromPercentEncoding( value.toUtf8() ) );
}
} }
def.setFields( fields ); def.setFields( fields );
return def; return def;
} }
// Mega ewwww. all this is taken from Qt's QUrl::addEncodedQueryItem compatibili ty helper. // Mega ewwww. all this is taken from Qt's QUrl::addEncodedQueryItem compatibili ty helper.
// (I can't see any way to port the below code to NOT require this without break ing // (I can't see any way to port the below code to NOT require this without break ing
// existing projects.) // existing projects.)
skipping to change at line 305 skipping to change at line 309
urlQuery.addQueryItem( QStringLiteral( "field" ), f.name() + ":real" ); urlQuery.addQueryItem( QStringLiteral( "field" ), f.name() + ":real" );
else if ( f.type() == QVariant::String ) else if ( f.type() == QVariant::String )
urlQuery.addQueryItem( QStringLiteral( "field" ), f.name() + ":text" ); urlQuery.addQueryItem( QStringLiteral( "field" ), f.name() + ":text" );
} }
if ( isLazy() ) if ( isLazy() )
{ {
urlQuery.addQueryItem( QStringLiteral( "lazy" ), QString() ); urlQuery.addQueryItem( QStringLiteral( "lazy" ), QString() );
} }
if ( ! subsetString().isEmpty() )
{
urlQuery.addQueryItem( QStringLiteral( "subsetstring" ), QUrl::toPercentEnco
ding( subsetString() ) );
}
url.setQuery( urlQuery ); url.setQuery( urlQuery );
return url; return url;
} }
QString QgsVirtualLayerDefinition::toString() const QString QgsVirtualLayerDefinition::toString() const
{ {
return QString( toUrl().toEncoded() ); return QString( toUrl().toEncoded() );
} }
skipping to change at line 350 skipping to change at line 359
const auto constSourceLayers = sourceLayers(); const auto constSourceLayers = sourceLayers();
for ( const QgsVirtualLayerDefinition::SourceLayer &l : constSourceLayers ) for ( const QgsVirtualLayerDefinition::SourceLayer &l : constSourceLayers )
{ {
if ( l.isReferenced() ) if ( l.isReferenced() )
{ {
return true; return true;
} }
} }
return false; return false;
} }
QString QgsVirtualLayerDefinition::subsetString() const
{
return mSubsetString;
}
void QgsVirtualLayerDefinition::setSubsetString( const QString &subsetString )
{
mSubsetString = subsetString;
}
 End of changes. 3 change blocks. 
0 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)