Skip to content

Commit

Permalink
Revert const on createFeature
Browse files Browse the repository at this point in the history
just because it would be an API break
  • Loading branch information
elpaso committed Sep 25, 2018
1 parent 930c3f8 commit 3157af2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsvectorlayerutils.sip.in
Expand Up @@ -133,7 +133,7 @@ Returns true if the attribute value is valid for the field. Any constraint failu
If the strength or origin parameter is set then only constraints with a matching strength/origin will be checked.
%End

static QgsFeature createFeature( const QgsVectorLayer *layer,
static QgsFeature createFeature( QgsVectorLayer *layer,
const QgsGeometry &geometry = QgsGeometry(),
const QgsAttributeMap &attributes = QgsAttributeMap(),
QgsExpressionContext *context = 0 );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayerutils.cpp
Expand Up @@ -349,7 +349,7 @@ bool QgsVectorLayerUtils::validateAttribute( const QgsVectorLayer *layer, const
return valid;
}

QgsFeature QgsVectorLayerUtils::createFeature( const QgsVectorLayer *layer, const QgsGeometry &geometry,
QgsFeature QgsVectorLayerUtils::createFeature( QgsVectorLayer *layer, const QgsGeometry &geometry,
const QgsAttributeMap &attributes, QgsExpressionContext *context )
{
if ( !layer )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsvectorlayerutils.h
Expand Up @@ -140,7 +140,7 @@ class CORE_EXPORT QgsVectorLayerUtils
* assuming that they respect the layer's constraints. Note that the created feature is not
* automatically inserted into the layer.
*/
static QgsFeature createFeature( const QgsVectorLayer *layer,
static QgsFeature createFeature( QgsVectorLayer *layer,
const QgsGeometry &geometry = QgsGeometry(),
const QgsAttributeMap &attributes = QgsAttributeMap(),
QgsExpressionContext *context = nullptr );
Expand Down

0 comments on commit 3157af2

Please sign in to comment.