Skip to content

Commit 7e8592b

Browse files
committed
Const correctness (because it's not an API break)
1 parent 3157af2 commit 7e8592b

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

python/core/auto_generated/qgsvectorlayerutils.sip.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ Returns true if the attribute value is valid for the field. Any constraint failu
133133
If the strength or origin parameter is set then only constraints with a matching strength/origin will be checked.
134134
%End
135135

136-
static QgsFeature createFeature( QgsVectorLayer *layer,
136+
static QgsFeature createFeature( const QgsVectorLayer *layer,
137137
const QgsGeometry &geometry = QgsGeometry(),
138138
const QgsAttributeMap &attributes = QgsAttributeMap(),
139139
QgsExpressionContext *context = 0 );
@@ -178,7 +178,7 @@ are padded with NULL values to match the required length).
178178
%End
179179

180180

181-
static QgsFeatureList makeFeaturesCompatible( const QgsFeatureList &features, QgsVectorLayer &layer );
181+
static QgsFeatureList makeFeaturesCompatible( const QgsFeatureList &features, const QgsVectorLayer &layer );
182182
%Docstring
183183
Converts input ``features`` to be compatible with the given ``layer``.
184184

src/core/qgsvectorlayerutils.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ bool QgsVectorLayerUtils::validateAttribute( const QgsVectorLayer *layer, const
349349
return valid;
350350
}
351351

352-
QgsFeature QgsVectorLayerUtils::createFeature( QgsVectorLayer *layer, const QgsGeometry &geometry,
352+
QgsFeature QgsVectorLayerUtils::createFeature( const QgsVectorLayer *layer, const QgsGeometry &geometry,
353353
const QgsAttributeMap &attributes, QgsExpressionContext *context )
354354
{
355355
if ( !layer )
@@ -561,7 +561,7 @@ void QgsVectorLayerUtils::matchAttributesToFields( QgsFeature &feature, const Qg
561561
}
562562
}
563563

564-
QgsFeatureList QgsVectorLayerUtils::makeFeaturesCompatible( const QgsFeatureList &features, QgsVectorLayer &layer )
564+
QgsFeatureList QgsVectorLayerUtils::makeFeaturesCompatible( const QgsFeatureList &features, const QgsVectorLayer &layer )
565565
{
566566
QgsWkbTypes::Type inputWkbType( layer.wkbType( ) );
567567
QgsFeatureList resultFeatures;

src/core/qgsvectorlayerutils.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class CORE_EXPORT QgsVectorLayerUtils
140140
* assuming that they respect the layer's constraints. Note that the created feature is not
141141
* automatically inserted into the layer.
142142
*/
143-
static QgsFeature createFeature( QgsVectorLayer *layer,
143+
static QgsFeature createFeature( const QgsVectorLayer *layer,
144144
const QgsGeometry &geometry = QgsGeometry(),
145145
const QgsAttributeMap &attributes = QgsAttributeMap(),
146146
QgsExpressionContext *context = nullptr );
@@ -207,7 +207,7 @@ class CORE_EXPORT QgsVectorLayerUtils
207207
*
208208
* \since QGIS 3.4
209209
*/
210-
static QgsFeatureList makeFeaturesCompatible( const QgsFeatureList &features, QgsVectorLayer &layer );
210+
static QgsFeatureList makeFeaturesCompatible( const QgsFeatureList &features, const QgsVectorLayer &layer );
211211

212212
};
213213

0 commit comments

Comments
 (0)