Skip to content

Commit 2ed144a

Browse files
committed
Apply clang-tidy readability-avoid-const-params-in-decls fixit
Checks whether a function declaration has parameters that are top level const. const values in declarations do not affect the signature of a function, so they should not be put there.
1 parent e91aed6 commit 2ed144a

File tree

203 files changed

+567
-561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+567
-561
lines changed

python/analysis/auto_generated/network/qgsvectorlayerdirector.sip.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Determine making the graph from vector line layer
3535
const QString &directDirectionValue,
3636
const QString &reverseDirectionValue,
3737
const QString &bothDirectionValue,
38-
const Direction defaultDirection
38+
Direction defaultDirection
3939
);
4040
%Docstring
4141
Default constructor

python/core/auto_generated/effects/qgseffectstack.sip.in

+3-3
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ Appends an effect to the end of the stack.
9393
.. seealso:: :py:func:`insertEffect`
9494
%End
9595

96-
bool insertEffect( const int index, QgsPaintEffect *effect /Transfer/ );
96+
bool insertEffect( int index, QgsPaintEffect *effect /Transfer/ );
9797
%Docstring
9898
Inserts an effect at a specified index within the stack.
9999

@@ -104,7 +104,7 @@ Inserts an effect at a specified index within the stack.
104104
.. seealso:: :py:func:`appendEffect`
105105
%End
106106

107-
bool changeEffect( const int index, QgsPaintEffect *effect /Transfer/ );
107+
bool changeEffect( int index, QgsPaintEffect *effect /Transfer/ );
108108
%Docstring
109109
Replaces the effect at a specified position within the stack.
110110

@@ -113,7 +113,7 @@ Replaces the effect at a specified position within the stack.
113113
transferred to the stack object.
114114
%End
115115

116-
QgsPaintEffect *takeEffect( const int index /TransferBack/ );
116+
QgsPaintEffect *takeEffect( int index /TransferBack/ );
117117
%Docstring
118118
Removes an effect from the stack and returns a pointer to it.
119119

python/core/auto_generated/effects/qgsimageoperation.sip.in

+7-7
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ on which is faster for the particular operation.
4646
FlipVertical
4747
};
4848

49-
static void convertToGrayscale( QImage &image, const GrayscaleMode mode = GrayscaleLuminosity );
49+
static void convertToGrayscale( QImage &image, GrayscaleMode mode = GrayscaleLuminosity );
5050
%Docstring
5151
Convert a QImage to a grayscale image. Alpha channel is preserved.
5252

5353
:param image: QImage to convert
5454
:param mode: mode to use during grayscale conversion
5555
%End
5656

57-
static void adjustBrightnessContrast( QImage &image, const int brightness, const double contrast );
57+
static void adjustBrightnessContrast( QImage &image, int brightness, double contrast );
5858
%Docstring
5959
Alter the brightness or contrast of a QImage.
6060

@@ -67,8 +67,8 @@ Alter the brightness or contrast of a QImage.
6767
contrast of the image.
6868
%End
6969

70-
static void adjustHueSaturation( QImage &image, const double saturation, const QColor &colorizeColor = QColor(),
71-
const double colorizeStrength = 1.0 );
70+
static void adjustHueSaturation( QImage &image, double saturation, const QColor &colorizeColor = QColor(),
71+
double colorizeStrength = 1.0 );
7272
%Docstring
7373
Alter the hue or saturation of a QImage.
7474

@@ -79,7 +79,7 @@ Alter the hue or saturation of a QImage.
7979
:param colorizeStrength: double between 0 and 1, where 0 = no colorization and 1.0 = full colorization
8080
%End
8181

82-
static void multiplyOpacity( QImage &image, const double factor );
82+
static void multiplyOpacity( QImage &image, double factor );
8383
%Docstring
8484
Multiplies opacity of image pixel values by a factor.
8585

@@ -118,7 +118,7 @@ using a color ramp.
118118
for the distance transform operation
119119
%End
120120

121-
static void stackBlur( QImage &image, const int radius, const bool alphaOnly = false );
121+
static void stackBlur( QImage &image, int radius, bool alphaOnly = false );
122122
%Docstring
123123
Performs a stack blur on an image. Stack blur represents a good balance between
124124
speed and blur quality.
@@ -133,7 +133,7 @@ speed and blur quality.
133133
alphaOnly is set to false, or ARGB32 if alphaOnly is true
134134
%End
135135

136-
static QImage *gaussianBlur( QImage &image, const int radius ) /Factory/;
136+
static QImage *gaussianBlur( QImage &image, int radius ) /Factory/;
137137
%Docstring
138138
Performs a gaussian blur on an image. Gaussian blur is slower but results in a high
139139
quality blur.

python/core/auto_generated/effects/qgspainteffect.sip.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Returns whether the effect is enabled
196196
.. seealso:: :py:func:`setEnabled`
197197
%End
198198

199-
void setEnabled( const bool enabled );
199+
void setEnabled( bool enabled );
200200
%Docstring
201201
Sets whether the effect is enabled
202202

@@ -215,7 +215,7 @@ effect if the paint effect is used in a :py:class:`QgsEffectStack`.
215215
.. seealso:: :py:func:`setDrawMode`
216216
%End
217217

218-
void setDrawMode( const DrawMode drawMode );
218+
void setDrawMode( DrawMode drawMode );
219219
%Docstring
220220
Sets the draw mode for the effect. This property only has an
221221
effect if the paint effect is used in a :py:class:`QgsEffectStack`.

python/core/auto_generated/expression/qgsexpression.sip.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ This function returns variables in each expression between [% and %].
388388
.. versionadded:: 3.2
389389
%End
390390

391-
static double evaluateToDouble( const QString &text, const double fallbackValue );
391+
static double evaluateToDouble( const QString &text, double fallbackValue );
392392
%Docstring
393393
Attempts to evaluate a text string as an expression to a resultant double
394394
value.

python/core/auto_generated/geometry/qgscircle.sip.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ Note that this method is 2D only and does not consider the z-value of the circle
196196

197197

198198

199-
virtual void setSemiMajorAxis( const double semiMajorAxis );
199+
virtual void setSemiMajorAxis( double semiMajorAxis );
200200

201201
%Docstring
202202
Inherited method. Use setRadius instead.
@@ -206,7 +206,7 @@ Inherited method. Use setRadius instead.
206206
.. seealso:: :py:func:`setRadius`
207207
%End
208208

209-
virtual void setSemiMinorAxis( const double semiMinorAxis );
209+
virtual void setSemiMinorAxis( double semiMinorAxis );
210210

211211
%Docstring
212212
Inherited method. Use setRadius instead.

python/core/auto_generated/geometry/qgsellipse.sip.in

+4-4
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Constructor for QgsEllipse.
3434

3535
virtual ~QgsEllipse();
3636

37-
QgsEllipse( const QgsPoint &center, const double semiMajorAxis, const double semiMinorAxis, const double azimuth = 90 );
37+
QgsEllipse( const QgsPoint &center, double semiMajorAxis, double semiMinorAxis, double azimuth = 90 );
3838
%Docstring
3939
Constructs an ellipse by defining all the members.
4040

@@ -146,21 +146,21 @@ Sets the center point.
146146
.. seealso:: :py:func:`rcenter`
147147
%End
148148

149-
virtual void setSemiMajorAxis( const double semiMajorAxis );
149+
virtual void setSemiMajorAxis( double semiMajorAxis );
150150
%Docstring
151151
Sets the semi-major axis.
152152

153153
.. seealso:: :py:func:`semiMajorAxis`
154154
%End
155155

156-
virtual void setSemiMinorAxis( const double semiMinorAxis );
156+
virtual void setSemiMinorAxis( double semiMinorAxis );
157157
%Docstring
158158
Sets the semi-minor axis.
159159

160160
.. seealso:: :py:func:`semiMinorAxis`
161161
%End
162162

163-
void setAzimuth( const double azimuth );
163+
void setAzimuth( double azimuth );
164164
%Docstring
165165
Sets the azimuth (orientation).
166166

python/core/auto_generated/geometry/qgsgeometry.sip.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1751,7 +1751,7 @@ The 2 types should match.
17511751
}
17521752
%End
17531753

1754-
QgsGeometry smooth( const unsigned int iterations = 1, const double offset = 0.25,
1754+
QgsGeometry smooth( unsigned int iterations = 1, double offset = 0.25,
17551755
double minimumDistance = -1.0, double maxAngle = 180.0 ) const;
17561756
%Docstring
17571757
Smooths a geometry by rounding off corners using the Chaikin algorithm. This operation

python/core/auto_generated/geometry/qgsgeometryutils.sip.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ supported and is retrieved from the first 3D point amongst ``p1`` and
102102
:return: Whether the lines intersect
103103
%End
104104

105-
static bool segmentIntersection( const QgsPoint &p1, const QgsPoint &p2, const QgsPoint &q1, const QgsPoint &q2, QgsPoint &intersectionPoint /Out/, bool &isIntersection /Out/, const double tolerance = 1e-8, bool acceptImproperIntersection = false );
105+
static bool segmentIntersection( const QgsPoint &p1, const QgsPoint &p2, const QgsPoint &q1, const QgsPoint &q2, QgsPoint &intersectionPoint /Out/, bool &isIntersection /Out/, double tolerance = 1e-8, bool acceptImproperIntersection = false );
106106
%Docstring
107107
Compute the intersection between two segments
108108

@@ -140,7 +140,7 @@ Compute the intersection between two segments
140140
# (True, 'Point (0 0)', True)
141141
%End
142142

143-
static bool lineCircleIntersection( const QgsPointXY &center, const double radius,
143+
static bool lineCircleIntersection( const QgsPointXY &center, double radius,
144144
const QgsPointXY &linePoint1, const QgsPointXY &linePoint2,
145145
QgsPointXY &intersection /In,Out/ );
146146
%Docstring

python/core/auto_generated/geometry/qgslinestring.sip.in

+1
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ segment in the line.
220220

221221
virtual QPolygonF asQPolygonF() const;
222222

223+
223224
virtual bool fromWkb( QgsConstWkbPtr &wkb );
224225

225226
virtual bool fromWkt( const QString &wkt );

python/core/auto_generated/geometry/qgsrectangle.sip.in

+4-4
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,13 @@ Expand the rectangle so that covers both the original rectangle and the given re
237237
Expand the rectangle so that covers both the original rectangle and the given point.
238238
%End
239239

240-
QgsRectangle operator-( const QgsVector v ) const;
240+
QgsRectangle operator-( QgsVector v ) const;
241241

242-
QgsRectangle operator+( const QgsVector v ) const;
242+
QgsRectangle operator+( QgsVector v ) const;
243243

244-
QgsRectangle &operator-=( const QgsVector v );
244+
QgsRectangle &operator-=( QgsVector v );
245245

246-
QgsRectangle &operator+=( const QgsVector v );
246+
QgsRectangle &operator+=( QgsVector v );
247247

248248
bool isEmpty() const;
249249
%Docstring

python/core/auto_generated/geometry/qgsregularpolygon.sip.in

+5-5
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The regular polygon is defined by a center point with a number of sides/vertices
3838
Constructor for QgsRegularPolygon.
3939
%End
4040

41-
QgsRegularPolygon( const QgsPoint &center, const double radius, const double azimuth, const unsigned int numberSides, const ConstructionOption circle );
41+
QgsRegularPolygon( const QgsPoint &center, double radius, double azimuth, unsigned int numberSides, ConstructionOption circle );
4242
%Docstring
4343
Constructs a regular polygon by ``center`` and parameters for the first vertex. An empty regular polygon is returned if ``numberSides`` < 3 or ``ConstructionOption`` isn't valid.
4444

@@ -49,7 +49,7 @@ Constructs a regular polygon by ``center`` and parameters for the first vertex.
4949
:param circle: Option to create the polygon. see ConstructionOption
5050
%End
5151

52-
QgsRegularPolygon( const QgsPoint &center, const QgsPoint &pt1, const unsigned int numberSides, const ConstructionOption circle );
52+
QgsRegularPolygon( const QgsPoint &center, const QgsPoint &pt1, unsigned int numberSides, ConstructionOption circle );
5353
%Docstring
5454
Constructs a regular polygon by ``center`` and another point.
5555

@@ -59,7 +59,7 @@ Constructs a regular polygon by ``center`` and another point.
5959
:param circle: Option to create the polygon inscribed in circle (the radius is the distance between the center and vertices) or circumscribed about circle (the radius is the distance from the center to the midpoints of the sides).
6060
%End
6161

62-
QgsRegularPolygon( const QgsPoint &pt1, const QgsPoint &pt2, const unsigned int numberSides );
62+
QgsRegularPolygon( const QgsPoint &pt1, const QgsPoint &pt2, unsigned int numberSides );
6363
%Docstring
6464
Constructs a regular polygon by two points of the first side.
6565

@@ -123,7 +123,7 @@ Radius is unchanged. The first vertex is reprojected from the new center.
123123
.. seealso:: :py:func:`center`
124124
%End
125125

126-
void setRadius( const double radius );
126+
void setRadius( double radius );
127127
%Docstring
128128
Sets the radius.
129129
Center is unchanged. The first vertex is reprojected from the center with the new radius.
@@ -139,7 +139,7 @@ Radius is unchanged. The center is reprojected from the new first vertex.
139139
.. seealso:: :py:func:`firstVertex`
140140
%End
141141

142-
void setNumberSides( const unsigned int numberSides );
142+
void setNumberSides( unsigned int numberSides );
143143
%Docstring
144144
Sets the number of sides.
145145
If numberSides < 3, the number of sides is unchanged.

python/core/auto_generated/geometry/qgstriangle.sip.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Construct a QgsTriangle from three :py:class:`QgsPoint`.
4141
:param p3: third point
4242
%End
4343

44-
explicit QgsTriangle( const QPointF p1, const QPointF p2, const QPointF p3 );
44+
explicit QgsTriangle( QPointF p1, QPointF p2, QPointF p3 );
4545
%Docstring
4646
Construct a QgsTriangle from three QPointF.
4747

python/core/auto_generated/layout/qgslayout.sip.in

+7-7
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ Returns the items model attached to the layout.
8888

8989

9090

91-
QList<QgsLayoutItem *> selectedLayoutItems( const bool includeLockedItems = true );
91+
QList<QgsLayoutItem *> selectedLayoutItems( bool includeLockedItems = true );
9292
%Docstring
9393
Returns list of selected layout items.
9494

@@ -168,7 +168,7 @@ updating the scene for each one.
168168
.. seealso:: :py:func:`updateZValues`
169169
%End
170170

171-
void updateZValues( const bool addUndoCommands = true );
171+
void updateZValues( bool addUndoCommands = true );
172172
%Docstring
173173
Resets the z-values of items based on their position in the internal
174174
z order list. This should be called after any stacking changes
@@ -237,13 +237,13 @@ Note that template UUIDs are only available while a layout is being restored fro
237237
.. seealso:: :py:func:`itemByUuid`
238238
%End
239239

240-
QgsLayoutItem *layoutItemAt( QPointF position, const bool ignoreLocked = false ) const;
240+
QgsLayoutItem *layoutItemAt( QPointF position, bool ignoreLocked = false ) const;
241241
%Docstring
242242
Returns the topmost layout item at a specified ``position``. Ignores paper items.
243243
If ``ignoreLocked`` is set to true any locked items will be ignored.
244244
%End
245245

246-
QgsLayoutItem *layoutItemAt( QPointF position, const QgsLayoutItem *belowItem, const bool ignoreLocked = false ) const;
246+
QgsLayoutItem *layoutItemAt( QPointF position, const QgsLayoutItem *belowItem, bool ignoreLocked = false ) const;
247247
%Docstring
248248
Returns the topmost layout item at a specified ``position`` which is below a specified ``item``. Ignores paper items.
249249
If ``ignoreLocked`` is set to true any locked items will be ignored.
@@ -301,7 +301,7 @@ Converts a ``point`` into the layout's native units.
301301
.. seealso:: :py:func:`units`
302302
%End
303303

304-
QgsLayoutMeasurement convertFromLayoutUnits( const double length, const QgsUnitTypes::LayoutUnit unit ) const;
304+
QgsLayoutMeasurement convertFromLayoutUnits( double length, QgsUnitTypes::LayoutUnit unit ) const;
305305
%Docstring
306306
Converts a ``length`` measurement from the layout's native units to a specified target ``unit``.
307307

@@ -312,7 +312,7 @@ Converts a ``length`` measurement from the layout's native units to a specified
312312
.. seealso:: :py:func:`units`
313313
%End
314314

315-
QgsLayoutSize convertFromLayoutUnits( const QSizeF &size, const QgsUnitTypes::LayoutUnit unit ) const;
315+
QgsLayoutSize convertFromLayoutUnits( const QSizeF &size, QgsUnitTypes::LayoutUnit unit ) const;
316316
%Docstring
317317
Converts a ``size`` from the layout's native units to a specified target ``unit``.
318318

@@ -323,7 +323,7 @@ Converts a ``size`` from the layout's native units to a specified target ``unit`
323323
.. seealso:: :py:func:`units`
324324
%End
325325

326-
QgsLayoutPoint convertFromLayoutUnits( const QPointF &point, const QgsUnitTypes::LayoutUnit unit ) const;
326+
QgsLayoutPoint convertFromLayoutUnits( const QPointF &point, QgsUnitTypes::LayoutUnit unit ) const;
327327
%Docstring
328328
Converts a ``point`` from the layout's native units to a specified target ``unit``.
329329

python/core/auto_generated/layout/qgslayoutframe.sip.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Returns whether the page should be hidden (ie, not included in layout exports) i
7979
.. seealso:: :py:func:`setHidePageIfEmpty`
8080
%End
8181

82-
void setHidePageIfEmpty( const bool hidePageIfEmpty );
82+
void setHidePageIfEmpty( bool hidePageIfEmpty );
8383
%Docstring
8484
Sets whether the page should be hidden (ie, not included in layout exports) if this frame is empty
8585

@@ -97,7 +97,7 @@ Returns whether the background and frame stroke should be hidden if this frame i
9797
.. seealso:: :py:func:`setHideBackgroundIfEmpty`
9898
%End
9999

100-
void setHideBackgroundIfEmpty( const bool hideBackgroundIfEmpty );
100+
void setHideBackgroundIfEmpty( bool hideBackgroundIfEmpty );
101101
%Docstring
102102
Sets whether the background and frame stroke should be hidden if this frame is empty
103103

python/core/auto_generated/layout/qgslayoutgridsettings.sip.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Returns the page/snap grid resolution.
5555
.. seealso:: :py:func:`offset`
5656
%End
5757

58-
void setOffset( const QgsLayoutPoint offset );
58+
void setOffset( QgsLayoutPoint offset );
5959
%Docstring
6060
Sets the ``offset`` of the page/snap grid.
6161

0 commit comments

Comments
 (0)