Skip to content

Commit 3c84229

Browse files
committed
Fix new method segnatures
1 parent eb1ab18 commit 3c84229

8 files changed

Lines changed: 12 additions & 12 deletions

‎src/core/geometry/qgsgeometry.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ bool QgsGeometry::insertVertex( double x, double y, int beforeVertex )
508508
return d->geometry->insertVertex( id, QgsPointV2( x, y ) );
509509
}
510510

511-
bool QgsGeometry::insertVertex( QgsPointV2& p, int beforeVertex )
511+
bool QgsGeometry::insertVertex( const QgsPointV2& point, int beforeVertex )
512512
{
513513
if ( !d->geometry )
514514
{
@@ -520,7 +520,7 @@ bool QgsGeometry::insertVertex( QgsPointV2& p, int beforeVertex )
520520
{
521521
detach( true );
522522
//insert geometry instead of point
523-
return static_cast< QgsGeometryCollection* >( d->geometry )->insertGeometry( new QgsPointV2( p ), beforeVertex );
523+
return static_cast< QgsGeometryCollection* >( d->geometry )->insertGeometry( new QgsPointV2( point ), beforeVertex );
524524
}
525525

526526
QgsVertexId id;
@@ -531,7 +531,7 @@ bool QgsGeometry::insertVertex( QgsPointV2& p, int beforeVertex )
531531

532532
detach( true );
533533

534-
return d->geometry->insertVertex( id, p );
534+
return d->geometry->insertVertex( id, point );
535535
}
536536

537537
QgsPoint QgsGeometry::vertexAt( int atVertex ) const

‎src/core/geometry/qgsgeometry.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ class CORE_EXPORT QgsGeometry
279279
* these error conditions. (Or maybe we add another method to this
280280
* object to help make the distinction?)
281281
*/
282-
bool insertVertex( QgsPointV2& p, int beforeVertex );
282+
bool insertVertex( const QgsPointV2& point, int beforeVertex );
283283

284284
/** Moves the vertex at the given position number
285285
* and item (first number is index 0)

‎src/core/qgsvectorlayer.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,13 +1023,13 @@ bool QgsVectorLayer::insertVertex( double x, double y, QgsFeatureId atFeatureId,
10231023
}
10241024

10251025

1026-
bool QgsVectorLayer::insertVertex( QgsPointV2& p, QgsFeatureId atFeatureId, int beforeVertex )
1026+
bool QgsVectorLayer::insertVertex( const QgsPointV2& point, QgsFeatureId atFeatureId, int beforeVertex )
10271027
{
10281028
if ( !mValid || !mEditBuffer || !mDataProvider )
10291029
return false;
10301030

10311031
QgsVectorLayerEditUtils utils( this );
1032-
bool result = utils.insertVertex( p, atFeatureId, beforeVertex );
1032+
bool result = utils.insertVertex( point, atFeatureId, beforeVertex );
10331033
if ( result )
10341034
updateExtents();
10351035
return result;

‎src/core/qgsvectorlayer.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
943943
* in the given ring, item (first number is index 0), and feature
944944
* Not meaningful for Point geometries
945945
*/
946-
bool insertVertex( QgsPointV2& p, QgsFeatureId atFeatureId, int beforeVertex );
946+
bool insertVertex( const QgsPointV2& point, QgsFeatureId atFeatureId, int beforeVertex );
947947

948948
/** Moves the vertex at the given position number,
949949
* ring and item (first number is index 0), and feature

‎src/core/qgsvectorlayereditutils.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ bool QgsVectorLayerEditUtils::insertVertex( double x, double y, QgsFeatureId atF
5656
return true;
5757
}
5858

59-
bool QgsVectorLayerEditUtils::insertVertex( QgsPointV2& p, QgsFeatureId atFeatureId, int beforeVertex )
59+
bool QgsVectorLayerEditUtils::insertVertex( const QgsPointV2& point, QgsFeatureId atFeatureId, int beforeVertex )
6060
{
6161
if ( !L->hasGeometryType() )
6262
return false;
@@ -72,7 +72,7 @@ bool QgsVectorLayerEditUtils::insertVertex( QgsPointV2& p, QgsFeatureId atFeatur
7272
geometry = f.geometry();
7373
}
7474

75-
geometry.insertVertex( p, beforeVertex );
75+
geometry.insertVertex( point, beforeVertex );
7676

7777
L->editBuffer()->changeGeometry( atFeatureId, geometry );
7878
return true;

‎src/core/qgsvectorlayereditutils.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ class CORE_EXPORT QgsVectorLayerEditUtils
4545
* in the given ring, item (first number is index 0), and feature
4646
* Not meaningful for Point geometries
4747
*/
48-
bool insertVertex( QgsPointV2& p, QgsFeatureId atFeatureId, int beforeVertex );
48+
bool insertVertex( const QgsPointV2& point, QgsFeatureId atFeatureId, int beforeVertex );
4949

5050
/** Moves the vertex at the given position number,
5151
* ring and item (first number is index 0), and feature

‎src/gui/qgsmaptooledit.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ QgsMapToolEdit::~QgsMapToolEdit()
3434
}
3535

3636

37-
double QgsMapToolEdit::defaultZValue()
37+
double QgsMapToolEdit::defaultZValue() const
3838
{
3939
QSettings().value( QStringLiteral( "/qgis/digitizing/default_z_value" ), Qgis::DEFAULT_Z_COORDINATE ).toDouble();
4040
}

‎src/gui/qgsmaptooledit.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class GUI_EXPORT QgsMapToolEdit: public QgsMapTool
4141
* Return default Z value
4242
* Use for set Z coordinate to new vertex for 2.5d geometries
4343
*/
44-
double defaultZValue();
44+
double defaultZValue() const;
4545

4646
protected:
4747

0 commit comments

Comments
 (0)