Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clang-format for analysis and gui on 3.40 #59736

Open
wants to merge 26 commits into
base: release-3_40
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ SpacesInSquareBrackets: false
Standard: Cpp11
TabWidth: 2
UseTab: Never
Macros:
- SIP_ENUM_BASETYPE(x)=x
- SIP_MONKEYPATCH_SCOPEENUM_UNNEST(x,y)=x

---

Expand Down
2 changes: 0 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ repos:
exclude: |
(?x)^(
src/core/.*|
src/gui/.*|
src/analysis/.*|
src/3d/.*|
src/server/.*|
tests/code_layout/sipify/sipifyheader.h
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ A geometry transformer which uses an underlying Ground Control Points (GCP) base
#include "qgsgcpgeometrytransformer.h"
%End
public:

QgsGcpGeometryTransformer( QgsGcpTransformerInterface *gcpTransformer /Transfer/ );
%Docstring
Constructor for QgsGcpGeometryTransformer, which uses the specified ``gcpTransformer`` to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ Contains properties of a ground control point (GCP).
#include "qgsgcppoint.h"
%End
public:

enum class PointType
{
Source,
Destination,
};

QgsGcpPoint( const QgsPointXY &sourcePoint, const QgsPointXY &destinationPoint,
const QgsCoordinateReferenceSystem &destinationPointCrs, bool enabled = true );
QgsGcpPoint( const QgsPointXY &sourcePoint, const QgsPointXY &destinationPoint, const QgsCoordinateReferenceSystem &destinationPointCrs, bool enabled = true );
%Docstring
Constructor for QgsGcpPoint.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ based on a transformation method and a list of GCPs.
static const QMetaObject staticMetaObject;

public:

enum class TransformMethod /BaseType=IntEnum/
{
Linear,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ Vector layer warper which warps vector layers based on a list of source and dest
#include "qgsvectorwarper.h"
%End
public:

explicit QgsVectorWarper( QgsGcpTransformerInterface::TransformMethod method, const QList < QgsGcpPoint > &points,
const QgsCoordinateReferenceSystem &destinationCrs );
explicit QgsVectorWarper( QgsGcpTransformerInterface::TransformMethod method, const QList<QgsGcpPoint> &points, const QgsCoordinateReferenceSystem &destinationCrs );
%Docstring
Constructor for QgsVectorWarper.

Expand All @@ -32,9 +30,7 @@ Constructor for QgsVectorWarper.
:param destinationCrs: target CRS for transformed features
%End

bool transformFeatures( QgsFeatureIterator &iterator, QgsFeatureSink *sink,
const QgsCoordinateTransformContext &context,
QgsFeedback *feedback = 0 ) const;
bool transformFeatures( QgsFeatureIterator &iterator, QgsFeatureSink *sink, const QgsCoordinateTransformContext &context, QgsFeedback *feedback = 0 ) const;
%Docstring
Transforms the features from ``iterator`` and adds the results to the specified ``sink``.

Expand Down Expand Up @@ -63,11 +59,7 @@ A task for warping a vector layer in a background thread.
#include "qgsvectorwarper.h"
%End
public:

QgsVectorWarperTask( QgsGcpTransformerInterface::TransformMethod method, const QList < QgsGcpPoint > &points,
const QgsCoordinateReferenceSystem &destinationCrs,
QgsVectorLayer *layer,
const QString &fileName );
QgsVectorWarperTask( QgsGcpTransformerInterface::TransformMethod method, const QList<QgsGcpPoint> &points, const QgsCoordinateReferenceSystem &destinationCrs, QgsVectorLayer *layer, const QString &fileName );
%Docstring
Constructor for QgsVectorWarperTask.

Expand Down Expand Up @@ -99,7 +91,6 @@ Returns the descriptive error message, if an error occurred.
%End

protected:

virtual bool run();


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ A class that does interpolation to a grid and writes the results to an ascii gri
#include "qgsgridfilewriter.h"
%End
public:

QgsGridFileWriter( QgsInterpolator *interpolator, const QString &outputPath, const QgsRectangle &extent, int nCols, int nRows );
%Docstring
Constructor for QgsGridFileWriter, for the specified ``interpolator``.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@



class QgsIDWInterpolator: QgsInterpolator
class QgsIDWInterpolator : QgsInterpolator
{
%Docstring(signature="appended")
Inverse distance weight interpolator.
Expand All @@ -19,7 +19,6 @@ Inverse distance weight interpolator.
#include "qgsidwinterpolator.h"
%End
public:

QgsIDWInterpolator( const QList<QgsInterpolator::LayerData> &layerData );
%Docstring
Constructor for QgsIDWInterpolator, with the specified ``layerData`` sources.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,17 @@

struct QgsInterpolatorVertexData
{

QgsInterpolatorVertexData( double x, double y, double z );
QgsInterpolatorVertexData( double x, double y, double z );
%Docstring
Constructor for QgsInterpolatorVertexData with the specified
``x``, ``y``, and ``z`` coordinate.
%End

QgsInterpolatorVertexData();
QgsInterpolatorVertexData();

double x;
double y;
double z;
double x;
double y;
double z;
};

class QgsInterpolator
Expand All @@ -45,7 +44,6 @@ can be an attribute or the z-coordinates in case of 3D types.
#include "qgsinterpolator.h"
%End
public:

enum SourceType /BaseType=IntEnum/
{
SourcePoints,
Expand All @@ -70,12 +68,12 @@ can be an attribute or the z-coordinates in case of 3D types.

struct LayerData
{
QgsFeatureSource *source;
QgsInterpolator::ValueSource valueSource;
int interpolationAttribute;
QgsInterpolator::SourceType sourceType;
QgsFeatureSource *source;
QgsInterpolator::ValueSource valueSource;
int interpolationAttribute;
QgsInterpolator::SourceType sourceType;

QgsCoordinateTransformContext transformContext;
QgsCoordinateTransformContext transformContext;
};

QgsInterpolator( const QList<QgsInterpolator::LayerData> &layerData );
Expand All @@ -96,7 +94,6 @@ Calculates interpolation value for map coordinates x, y


protected:

Result cacheBaseData( QgsFeedback *feedback = 0 );
%Docstring
Caches the vertex and value data from the provider. All the vertex data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@



class QgsTinInterpolator: QgsInterpolator
class QgsTinInterpolator : QgsInterpolator
{
%Docstring(signature="appended")
Interpolation in a triangular irregular network
Expand All @@ -20,7 +20,6 @@ Interpolation in a triangular irregular network
#include "qgstininterpolator.h"
%End
public:

enum TinInterpolation /BaseType=IntEnum/
{
Linear,
Expand Down
12 changes: 2 additions & 10 deletions python/PyQt6/analysis/auto_generated/mesh/qgsmeshcontours.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Exporter of contours lines or polygons from a mesh layer.
#include "qgsmeshcontours.h"
%End
public:

QgsMeshContours( QgsMeshLayer *layer );
%Docstring
Constructs the mesh contours exporter.
Expand All @@ -37,10 +36,7 @@ Caches the native and triangular mesh from data provider

~QgsMeshContours();

QgsGeometry exportLines( const QgsMeshDatasetIndex &index,
double value,
QgsMeshRendererScalarSettings::DataResamplingMethod method,
QgsFeedback *feedback = 0 );
QgsGeometry exportLines( const QgsMeshDatasetIndex &index, double value, QgsMeshRendererScalarSettings::DataResamplingMethod method, QgsFeedback *feedback = 0 );
%Docstring
Exports multi line string containing the contour line for particular dataset and value.

Expand All @@ -57,11 +53,7 @@ Exports multi line string containing the contour line for particular dataset and
%End


QgsGeometry exportPolygons( const QgsMeshDatasetIndex &index,
double min_value,
double max_value,
QgsMeshRendererScalarSettings::DataResamplingMethod method,
QgsFeedback *feedback = 0 );
QgsGeometry exportPolygons( const QgsMeshDatasetIndex &index, double min_value, double max_value, QgsMeshRendererScalarSettings::DataResamplingMethod method, QgsFeedback *feedback = 0 );
%Docstring
Exports multi polygons representing the areas with values in range for particular dataset

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ Class that handles mesh creation with Delaunay constrained triangulation
#include "qgsmeshtriangulation.h"
%End
public:

QgsMeshTriangulation();
~QgsMeshTriangulation();

Expand Down Expand Up @@ -76,7 +75,7 @@ Sets the coordinate reference system used for the triangulation
};


class QgsMeshZValueDatasetGroup: QgsMeshDatasetGroup
class QgsMeshZValueDatasetGroup : QgsMeshDatasetGroup
{
%Docstring(signature="appended")

Expand All @@ -89,7 +88,6 @@ Convenient class that can be used to obtain a datasetgroup on vertices that repr
#include "qgsmeshtriangulation.h"
%End
public:

QgsMeshZValueDatasetGroup( const QString &datasetGroupName, const QgsMesh &mesh );
%Docstring
Constructor
Expand Down Expand Up @@ -129,7 +127,6 @@ a Delaunay triangulation on provided existing vertex.
#include "qgsmeshtriangulation.h"
%End
public:

QgsMeshEditingDelaunayTriangulation();

virtual QString text() const;
Expand Down
10 changes: 3 additions & 7 deletions python/PyQt6/analysis/auto_generated/network/qgsgraph.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ This class implements a graph edge
#include "qgsgraph.h"
%End
public:

QgsGraphEdge();

QVariant cost( int strategyIndex ) const;
Expand All @@ -32,7 +31,7 @@ Returns edge cost calculated using specified strategy
:param strategyIndex: strategy index
%End

QVector< QVariant > strategies() const;
QVector<QVariant> strategies() const;
%Docstring
Returns array of available strategies
%End
Expand All @@ -54,7 +53,7 @@ Returns the index of the vertex at the start of this edge.
};


typedef QList< int > QgsGraphEdgeIds;
typedef QList<int> QgsGraphEdgeIds;

class QgsGraphVertex
{
Expand All @@ -66,7 +65,6 @@ This class implements a graph vertex
#include "qgsgraph.h"
%End
public:

QgsGraphVertex();


Expand Down Expand Up @@ -107,7 +105,6 @@ Mathematical graph representation
#include "qgsgraph.h"
%End
public:

QgsGraph();


Expand All @@ -116,7 +113,7 @@ Mathematical graph representation
Add a vertex to the graph
%End

int addEdge( int fromVertexIdx, int toVertexIdx, const QVector< QVariant > &strategies );
int addEdge( int fromVertexIdx, int toVertexIdx, const QVector<QVariant> &strategies );
%Docstring
Add an edge to the graph, going from the ``fromVertexIdx``
to ``toVertexIdx``.
Expand Down Expand Up @@ -269,7 +266,6 @@ Returns whether the vertex of the given index exists.
protected:



};

/************************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ points using different strategies with Dijkstra algorithm
#include "qgsgraphanalyzer.h"
%End
public:

static SIP_PYLIST dijkstra( const QgsGraph *source, int startVertexIdx, int criterionNum, QVector<int> *resultTree = 0, QVector<double> *resultCost = 0 );
%Docstring
Solve shortest path problem using Dijkstra algorithm
Expand All @@ -36,8 +35,8 @@ Solve shortest path problem using Dijkstra algorithm
%End

%MethodCode
QVector< int > treeResult;
QVector< double > costResult;
QVector<int> treeResult;
QVector<double> costResult;
QgsGraphAnalyzer::dijkstra( a0, a1, a2, &treeResult, &costResult );

PyObject *l1 = PyList_New( treeResult.size() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ This class used for making the :py:class:`QgsGraph` object
#include "qgsgraphbuilder.h"
%End
public:

QgsGraphBuilder( const QgsCoordinateReferenceSystem &crs, bool otfEnabled = true, double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );
%Docstring
Default constructor
Expand All @@ -35,7 +34,7 @@ Default constructor
MANDATORY BUILDER PROPERTY DECLARATION
%End

virtual void addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &prop );
virtual void addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector<QVariant> &prop );


QgsGraph graph() const;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ Determine interface for creating a graph. Contains the settings of the graph.
#include "qgsgraphbuilderinterface.h"
%End
%ConvertToSubClassCode
if ( dynamic_cast< QgsGraphBuilder * >( sipCpp ) != NULL )
if ( dynamic_cast<QgsGraphBuilder *>( sipCpp ) != NULL )
sipType = sipType_QgsGraphBuilder;
else
sipType = NULL;
%End
public:

QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true,
double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );
QgsGraphBuilderInterface( const QgsCoordinateReferenceSystem &crs, bool ctfEnabled = true, double topologyTolerance = 0.0, const QString &ellipsoidID = "WGS84" );
%Docstring
Default constructor

Expand Down Expand Up @@ -77,7 +75,7 @@ Add vertex to the graph
id and pt are redundant. You can use pt or id to identify the vertex
%End

virtual void addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector< QVariant > &strategies );
virtual void addEdge( int pt1id, const QgsPointXY &pt1, int pt2id, const QgsPointXY &pt2, const QVector<QVariant> &strategies );
%Docstring
Add edge to the graph

Expand Down
Loading
Loading