Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[API] Remove specific deprecated QgsVectorLayer::setDataSource
  • Loading branch information
rldhont committed Apr 21, 2021
1 parent 2dd3d9b commit 88c0d3f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
17 changes: 0 additions & 17 deletions python/core/auto_generated/vector/qgsvectorlayer.sip.in
Expand Up @@ -1082,23 +1082,6 @@ Determines if this vector layer has features.
.. versionadded:: 3.4
%End

void setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, bool loadDefaultStyleFlag = false ) /Deprecated/;
%Docstring
Update the data source of the layer. The layer's renderer and legend will be preserved only
if the geometry type of the new data source matches the current geometry type of the layer.

:param dataSource: new layer data source
:param baseName: base name of the layer
:param provider: provider string
:param loadDefaultStyleFlag: set to ``True`` to reset the layer's style to the default for the
data source

.. versionadded:: 2.10

.. deprecated::
Use version with ProviderOptions argument instead
%End

virtual void setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, bool loadDefaultStyleFlag = false );

%Docstring
Expand Down
6 changes: 0 additions & 6 deletions src/core/vector/qgsvectorlayer.cpp
Expand Up @@ -1630,12 +1630,6 @@ bool QgsVectorLayer::readXml( const QDomNode &layer_node, QgsReadWriteContext &c
} // void QgsVectorLayer::readXml


void QgsVectorLayer::setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, bool loadDefaultStyleFlag )
{
QgsDataProvider::ProviderOptions options;
setDataSource( dataSource, baseName, provider, options, loadDefaultStyleFlag );
}

void QgsVectorLayer::setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, bool loadDefaultStyleFlag )
{
QgsWkbTypes::GeometryType geomType = geometryType();
Expand Down
13 changes: 0 additions & 13 deletions src/core/vector/qgsvectorlayer.h
Expand Up @@ -1131,19 +1131,6 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
*/
FeatureAvailability hasFeatures() const FINAL;

/**
* Update the data source of the layer. The layer's renderer and legend will be preserved only
* if the geometry type of the new data source matches the current geometry type of the layer.
* \param dataSource new layer data source
* \param baseName base name of the layer
* \param provider provider string
* \param loadDefaultStyleFlag set to TRUE to reset the layer's style to the default for the
* data source
* \since QGIS 2.10
* \deprecated Use version with ProviderOptions argument instead
*/
Q_DECL_DEPRECATED void setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, bool loadDefaultStyleFlag = false ) SIP_DEPRECATED;

/**
* Updates the data source of the layer. The layer's renderer and legend will be preserved only
* if the geometry type of the new data source matches the current geometry type of the layer.
Expand Down

0 comments on commit 88c0d3f

Please sign in to comment.