run sipify

This commit is contained in:
Denis Rouzaud 2020-06-18 16:28:46 +02:00 committed by Nyall Dawson
parent 43b122ede0
commit 044a05d828
28 changed files with 51 additions and 51 deletions

View File

@ -48,7 +48,7 @@ Ownership is transferred to the caller.
.. versionadded:: 3.4
%End
QList<QgsGeometryCheckFactory *> geometryCheckFactories( QgsVectorLayer *layer, QgsGeometryCheck::CheckType type, QgsGeometryCheck::Flags flags = 0 ) const;
QList<QgsGeometryCheckFactory *> geometryCheckFactories( QgsVectorLayer *layer, QgsGeometryCheck::CheckType type, QgsGeometryCheck::Flags flags = QgsGeometryCheck::Flags() ) const;
%Docstring
Returns all geometry check factories that are compatible with ``layer`` and have all of the ``flags`` set.

View File

@ -71,7 +71,7 @@ to ``p2`` will be used (i.e. winding the other way around the circle).
virtual bool fromWkt( const QString &wkt );
virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = 0 ) const;
virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() ) const;
virtual QString asWkt( int precision = 17 ) const;

View File

@ -42,7 +42,7 @@ Compound curve geometry type
virtual bool fromWkt( const QString &wkt );
virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = 0 ) const;
virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() ) const;
virtual QString asWkt( int precision = 17 ) const;

View File

@ -46,7 +46,7 @@ Curve polygon geometry type
virtual bool fromWkt( const QString &wkt );
virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = 0 ) const;
virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() ) const;
virtual QString asWkt( int precision = 17 ) const;

View File

@ -332,7 +332,7 @@ by :py:func:`~QgsGeometry.equals` instead.
typedef QFlags<QgsGeometry::ValidityFlag> ValidityFlags;
bool isGeosValid( QgsGeometry::ValidityFlags flags = 0 ) const;
bool isGeosValid( QgsGeometry::ValidityFlags flags = QgsGeometry::ValidityFlags() ) const;
%Docstring
Checks validity of the geometry using GEOS.
@ -1537,7 +1537,7 @@ is null, a ValueError will be raised.
QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = 0 ) const;
QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() ) const;
%Docstring
Export the geometry to WKB
@ -1972,7 +1972,7 @@ The coordinates at which the error is located and should be visualized.
ValidatorGeos,
};
void validateGeometry( QVector<QgsGeometry::Error> &errors /Out/, ValidationMethod method = ValidatorQgisInternal, QgsGeometry::ValidityFlags flags = 0 ) const;
void validateGeometry( QVector<QgsGeometry::Error> &errors /Out/, ValidationMethod method = ValidatorQgisInternal, QgsGeometry::ValidityFlags flags = QgsGeometry::ValidityFlags() ) const;
%Docstring
Validates geometry and produces a list of geometry errors.
The ``method`` argument dictates which validator to utilize.

View File

@ -154,7 +154,7 @@ An IndexError will be raised if no geometry with the specified index exists.
virtual bool fromWkt( const QString &wkt );
virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = 0 ) const;
virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() ) const;
virtual QString asWkt( int precision = 17 ) const;

View File

@ -424,7 +424,7 @@ segment in the line.
virtual bool fromWkt( const QString &wkt );
virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = 0 ) const;
virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() ) const;
virtual QString asWkt( int precision = 17 ) const;

View File

@ -41,7 +41,7 @@ Ownership of ``exterior`` and ``rings`` is transferred to the polygon.
virtual bool fromWkb( QgsConstWkbPtr &wkb );
virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = 0 ) const;
virtual QByteArray asWkb( QgsAbstractGeometry::WkbFlags flags = QgsAbstractGeometry::WkbFlags() ) const;
virtual QgsPolygon *surfaceToPolygon() const /Factory/;

View File

@ -34,7 +34,7 @@ Encapsulates settings relating to a feature source input to a processing algorit
QgsProcessingFeatureSourceDefinition( const QString &source = QString(), bool selectedFeaturesOnly = false, long long featureLimit = -1,
QgsProcessingFeatureSourceDefinition::Flags flags = 0, QgsFeatureRequest::InvalidGeometryCheck geometryCheck = QgsFeatureRequest::GeometryAbortOnInvalid );
QgsProcessingFeatureSourceDefinition::Flags flags = QgsProcessingFeatureSourceDefinition::Flags(), QgsFeatureRequest::InvalidGeometryCheck geometryCheck = QgsFeatureRequest::GeometryAbortOnInvalid );
%Docstring
Constructor for QgsProcessingFeatureSourceDefinition, accepting a static string ``source``.
@ -50,7 +50,7 @@ the default geometry check method (as dictated by :py:class:`QgsProcessingContex
%End
QgsProcessingFeatureSourceDefinition( const QgsProperty &source, bool selectedFeaturesOnly = false, long long featureLimit = -1,
QgsProcessingFeatureSourceDefinition::Flags flags = 0, QgsFeatureRequest::InvalidGeometryCheck geometryCheck = QgsFeatureRequest::GeometryAbortOnInvalid );
QgsProcessingFeatureSourceDefinition::Flags flags = QgsProcessingFeatureSourceDefinition::Flags(), QgsFeatureRequest::InvalidGeometryCheck geometryCheck = QgsFeatureRequest::GeometryAbortOnInvalid );
%Docstring
Constructor for QgsProcessingFeatureSourceDefinition, accepting a QgsProperty source.

View File

@ -40,7 +40,7 @@ An interface for objects which accept features via addFeature(s) methods.
virtual ~QgsFeatureSink();
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
%Docstring
Adds a single ``feature`` to the sink. Feature addition behavior is controlled by the specified ``flags``.
@ -49,7 +49,7 @@ Adds a single ``feature`` to the sink. Feature addition behavior is controlled b
:return: ``True`` in case of success and ``False`` in case of failure
%End
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 ) = 0;
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) = 0;
%Docstring
Adds a list of ``features`` to the sink. Feature addition behavior is controlled by the specified ``flags``.
@ -58,7 +58,7 @@ Adds a list of ``features`` to the sink. Feature addition behavior is controlled
:return: ``True`` in case of success and ``False`` in case of failure
%End
virtual bool addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
%Docstring
Adds all features from the specified ``iterator`` to the sink. Feature addition behavior is controlled by the specified ``flags``.

View File

@ -55,9 +55,9 @@ Sets the store's ``crs``.
.. seealso:: :py:func:`crs`
%End
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
int count() const;

View File

@ -536,7 +536,7 @@ stored inside a local temporary folder (such as the "/tmp" folder on Linux).
typedef QFlags<QgsMapLayer::ReadFlag> ReadFlags;
bool readLayerXml( const QDomElement &layerElement, QgsReadWriteContext &context, QgsMapLayer::ReadFlags flags = 0 );
bool readLayerXml( const QDomElement &layerElement, QgsReadWriteContext &context, QgsMapLayer::ReadFlags flags = QgsMapLayer::ReadFlags() );
%Docstring
Sets state from DOM document

View File

@ -317,7 +317,7 @@ Clears the project, removing all settings and resetting it back to an empty, def
.. versionadded:: 2.4
%End
bool read( const QString &filename, QgsProject::ReadFlags flags = 0 );
bool read( const QString &filename, QgsProject::ReadFlags flags = QgsProject::ReadFlags() );
%Docstring
Reads given project file from the given file.
@ -327,7 +327,7 @@ Reads given project file from the given file.
:return: ``True`` if project file has been read successfully
%End
bool read( QgsProject::ReadFlags flags = 0 );
bool read( QgsProject::ReadFlags flags = QgsProject::ReadFlags() );
%Docstring
Reads the project from its currently associated file (see :py:func:`~QgsProject.fileName` ).
@ -525,7 +525,7 @@ Returns project file path if layer is embedded from other project file. Returns
%End
QgsLayerTreeGroup *createEmbeddedGroup( const QString &groupName, const QString &projectFilePath, const QStringList &invisibleLayers, QgsProject::ReadFlags flags = 0 );
QgsLayerTreeGroup *createEmbeddedGroup( const QString &groupName, const QString &projectFilePath, const QStringList &invisibleLayers, QgsProject::ReadFlags flags = QgsProject::ReadFlags() );
%Docstring
Create layer group instance defined in an arbitrary project file.

View File

@ -33,9 +33,9 @@ proxy sink can be safely deleted without affecting the destination sink.
%Docstring
Constructs a new QgsProxyFeatureSink which forwards features onto a destination ``sink``.
%End
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
virtual bool addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
QgsFeatureSink *destinationSink();
%Docstring

View File

@ -186,11 +186,11 @@ Sets the transform ``context`` to use when reprojecting features.
Remaps a ``feature`` to a set of features compatible with the destination sink.
%End
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
virtual bool addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeatures( QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
QgsFeatureSink *destinationSink();

View File

@ -46,12 +46,12 @@ QgsSpatialIndex objects are implicitly shared and can be inexpensively copied.
typedef QFlags<QgsSpatialIndex::Flag> Flags;
QgsSpatialIndex( QgsSpatialIndex::Flags flags = 0 );
QgsSpatialIndex( QgsSpatialIndex::Flags flags = QgsSpatialIndex::Flags() );
%Docstring
Constructor for QgsSpatialIndex. Creates an empty R-tree index.
%End
explicit QgsSpatialIndex( const QgsFeatureIterator &fi, QgsFeedback *feedback = 0, QgsSpatialIndex::Flags flags = 0 );
explicit QgsSpatialIndex( const QgsFeatureIterator &fi, QgsFeedback *feedback = 0, QgsSpatialIndex::Flags flags = QgsSpatialIndex::Flags() );
%Docstring
Constructor - creates R-tree and bulk loads it with features from the iterator.
This is much faster approach than creating an empty index and then inserting features one by one.
@ -64,7 +64,7 @@ that of the spatial index construction.
%End
explicit QgsSpatialIndex( const QgsFeatureSource &source, QgsFeedback *feedback = 0, QgsSpatialIndex::Flags flags = 0 );
explicit QgsSpatialIndex( const QgsFeatureSource &source, QgsFeedback *feedback = 0, QgsSpatialIndex::Flags flags = QgsSpatialIndex::Flags() );
%Docstring
Constructor - creates R-tree and bulk loads it with features from the source.
This is much faster approach than creating an empty index and then inserting features one by one.
@ -93,7 +93,7 @@ Adds a ``feature`` to the index.
Use addFeature() instead
%End
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
%Docstring
Adds a ``feature`` to the index.
@ -103,7 +103,7 @@ The ``flags`` argument is ignored.
.. versionadded:: 3.4
%End
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
%Docstring
Adds a list of ``features`` to the index.

View File

@ -232,7 +232,7 @@ or if the given attribute is not an enum type.
:param index: the index of the attribute
%End
virtual bool addFeatures( QgsFeatureList &flist /In,Out/, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeatures( QgsFeatureList &flist /In,Out/, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
virtual bool deleteFeatures( const QgsFeatureIds &id );

View File

@ -568,9 +568,9 @@ Checks whether there were any errors in constructor
Retrieves error message
%End
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
bool addFeatureWithStyle( QgsFeature &feature, QgsFeatureRenderer *renderer, QgsUnitTypes::DistanceUnit outputUnit = QgsUnitTypes::DistanceMeters );

View File

@ -1160,7 +1160,7 @@ Queries the layer for the features with the given ids.
Queries the layer for the features which intersect the specified rectangle.
%End
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 ) ${SIP_FINAL};
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) ${SIP_FINAL};
bool updateFeature( QgsFeature &feature, bool skipDefaultValues = false );
@ -1969,7 +1969,7 @@ Deletes a list of attribute fields (but does not commit it)
:return: ``True`` if at least one attribute has been deleted
%End
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 ) ${SIP_FINAL};
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) ${SIP_FINAL};
bool deleteFeature( QgsFeatureId fid, DeleteContext *context = 0 );

View File

@ -120,9 +120,9 @@ Returns the number of error messages encountered during the export.
.. seealso:: :py:func:`errorCode`
%End
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
~QgsVectorLayerExporter();

View File

@ -154,7 +154,7 @@ Create a copy of the join buffer
.. versionadded:: 2.6
%End
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 );
virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() );
%Docstring
Adds a list of features in joined layers. Features given in parameter

View File

@ -25,7 +25,7 @@ enter their sizes and positions.
%End
public:
QgsLayoutItemPropertiesDialog( QWidget *parent = 0, Qt::WindowFlags flags = 0 );
QgsLayoutItemPropertiesDialog( QWidget *parent = 0, Qt::WindowFlags flags = Qt::WindowFlags() );
%Docstring
Constructor for :py:class:`QgsLayoutNewItemPropertiesDialog`.
%End

View File

@ -29,7 +29,7 @@ Model designer dialog base class
%End
public:
QgsModelDesignerDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0 );
QgsModelDesignerDialog( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags() );
~QgsModelDesignerDialog();
virtual void closeEvent( QCloseEvent *event );

View File

@ -34,7 +34,7 @@ Base class for processing algorithm dialogs.
FormatHtml,
};
QgsProcessingAlgorithmDialogBase( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0 );
QgsProcessingAlgorithmDialogBase( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags() );
%Docstring
Constructor for QgsProcessingAlgorithmDialogBase.
%End

View File

@ -125,7 +125,7 @@ A dialog for selection of multiple options from a fixed list of options.
QgsProcessingMultipleSelectionDialog( const QVariantList &availableOptions = QVariantList(),
const QVariantList &selectedOptions = QVariantList(),
QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0 );
QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags() );
%Docstring
Constructor for :py:class:`QgsProcessingMultipleSelectionPanelWidget`.
@ -229,7 +229,7 @@ A dialog for selection of multiple layer inputs.
const QVariantList &selectedOptions,
const QList< QgsProcessingModelChildParameterSource > &modelSources,
QgsProcessingModelAlgorithm *model = 0,
QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0 );
QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags() );
%Docstring
Constructor for QgsProcessingMultipleInputDialog.

View File

@ -22,7 +22,7 @@ QgsDockWidget subclass with more fine-grained control over how the widget is clo
%End
public:
explicit QgsDockWidget( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0 );
explicit QgsDockWidget( QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags() );
%Docstring
Constructor for QgsDockWidget.
@ -30,7 +30,7 @@ Constructor for QgsDockWidget.
:param flags: window flags
%End
explicit QgsDockWidget( const QString &title, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = 0 );
explicit QgsDockWidget( const QString &title, QWidget *parent /TransferThis/ = 0, Qt::WindowFlags flags = Qt::WindowFlags() );
%Docstring
Constructor for QgsDockWidget.

View File

@ -38,7 +38,7 @@ An action which can run on map layers
typedef QFlags<QgsMapLayerAction::Flag> Flags;
QgsMapLayerAction( const QString &name, QObject *parent /TransferThis/, Targets targets = AllActions, const QIcon &icon = QIcon(), QgsMapLayerAction::Flags flags = 0 );
QgsMapLayerAction( const QString &name, QObject *parent /TransferThis/, Targets targets = AllActions, const QIcon &icon = QIcon(), QgsMapLayerAction::Flags flags = QgsMapLayerAction::Flags() );
%Docstring
Creates a map layer action which can run on any layer
@ -47,12 +47,12 @@ Creates a map layer action which can run on any layer
using AllActions as a target probably does not make a lot of sense. This default action was settled for API compatibility reasons.
%End
QgsMapLayerAction( const QString &name, QObject *parent /TransferThis/, QgsMapLayer *layer, Targets targets = AllActions, const QIcon &icon = QIcon(), QgsMapLayerAction::Flags flags = 0 );
QgsMapLayerAction( const QString &name, QObject *parent /TransferThis/, QgsMapLayer *layer, Targets targets = AllActions, const QIcon &icon = QIcon(), QgsMapLayerAction::Flags flags = QgsMapLayerAction::Flags() );
%Docstring
Creates a map layer action which can run only on a specific layer
%End
QgsMapLayerAction( const QString &name, QObject *parent /TransferThis/, QgsMapLayerType layerType, Targets targets = AllActions, const QIcon &icon = QIcon(), QgsMapLayerAction::Flags flags = 0 );
QgsMapLayerAction( const QString &name, QObject *parent /TransferThis/, QgsMapLayerType layerType, Targets targets = AllActions, const QIcon &icon = QIcon(), QgsMapLayerAction::Flags flags = QgsMapLayerAction::Flags() );
%Docstring
Creates a map layer action which can run on a specific type of layer
%End

View File

@ -45,7 +45,7 @@ information for an HTTP Server for WMS, etc.
QgsNewHttpConnection::ConnectionTypes types = ConnectionWms,
const QString &baseKey = "qgis/connections-wms/",
const QString &connectionName = QString(),
QgsNewHttpConnection::Flags flags = 0,
QgsNewHttpConnection::Flags flags = QgsNewHttpConnection::Flags(),
Qt::WindowFlags fl = QgsGuiUtils::ModalDialogFlags );
%Docstring
Constructor for QgsNewHttpConnection.