"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/providers/virtual/qgsvirtuallayerprovider.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).

qgsvirtuallayerprovider.cpp  (QGIS-final-3_14_15):qgsvirtuallayerprovider.cpp  (QGIS-final-3_14_16)
skipping to change at line 78 skipping to change at line 78
// xxxxx = open a virtual layer // xxxxx = open a virtual layer
// xxxxx?key=value&key=value = create a virtual layer // xxxxx?key=value&key=value = create a virtual layer
// ?key=value = create a temporary virtual layer // ?key=value = create a temporary virtual layer
// read url // read url
try try
{ {
mDefinition = QgsVirtualLayerDefinition::fromUrl( url ); mDefinition = QgsVirtualLayerDefinition::fromUrl( url );
mSubset = mDefinition.subsetString();
if ( !mDefinition.isLazy() ) if ( !mDefinition.isLazy() )
{ {
reloadData(); reloadData();
} }
} }
catch ( std::runtime_error &e ) catch ( std::runtime_error &e )
{ {
mValid = false; mValid = false;
PROVIDER_ERROR( e.what() ); PROVIDER_ERROR( e.what() );
return; return;
skipping to change at line 206 skipping to change at line 208
/* only one table */ /* only one table */
if ( mDefinition.query().isEmpty() ) if ( mDefinition.query().isEmpty() )
{ {
mTableName = mLayers[0].name; mTableName = mLayers[0].name;
} }
else else
{ {
mTableName = VIRTUAL_LAYER_QUERY_VIEW; mTableName = VIRTUAL_LAYER_QUERY_VIEW;
} }
mSubset = mDefinition.subsetString();
return true; return true;
} }
bool QgsVirtualLayerProvider::createIt() bool QgsVirtualLayerProvider::createIt()
{ {
using namespace QgsVirtualLayerQueryParser; using namespace QgsVirtualLayerQueryParser;
// consistency check // consistency check
if ( mDefinition.sourceLayers().size() > 1 && mDefinition.query().isEmpty() ) if ( mDefinition.sourceLayers().size() > 1 && mDefinition.query().isEmpty() )
{ {
skipping to change at line 523 skipping to change at line 527
bool QgsVirtualLayerProvider::setSubsetString( const QString &subset, bool updat eFeatureCount ) bool QgsVirtualLayerProvider::setSubsetString( const QString &subset, bool updat eFeatureCount )
{ {
if ( subset == mSubset ) if ( subset == mSubset )
return true; return true;
mSubset = subset; mSubset = subset;
clearMinMaxCache(); clearMinMaxCache();
if ( updateFeatureCount ) if ( updateFeatureCount )
updateStatistics(); updateStatistics();
mDefinition.setSubsetString( subset );
setDataSourceUri( mDefinition.toString() );
emit dataChanged(); emit dataChanged();
return true; return true;
} }
QgsWkbTypes::Type QgsVirtualLayerProvider::wkbType() const QgsWkbTypes::Type QgsVirtualLayerProvider::wkbType() const
{ {
return static_cast<QgsWkbTypes::Type>( mDefinition.geometryWkbType() ); return static_cast<QgsWkbTypes::Type>( mDefinition.geometryWkbType() );
} }
 End of changes. 3 change blocks. 
0 lines changed or deleted 8 lines changed or added

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