Skip to content
Permalink
Browse files

Fix incorrect returns docstring when doxygen \returns has extra trail…

…ing spaces or uses tabs
  • Loading branch information
nyalldawson committed May 27, 2018
1 parent 0e75f6e commit 7a1a787c0aa4c8d4a218fff974015c69c8c13e59
@@ -115,7 +115,7 @@ supported and is retrieved from the first 3D point amongst ``p1`` and
:param tolerance: The tolerance to use
:param acceptImproperIntersection: By default, this method returns true only if segments have proper intersection. If set true, returns also true if segments have improper intersection (end of one segment on other segment ; continuous segments).

:return: Whether the segments intersect
:return: Whether the segments intersect
* Example:
.. code-block:: python

@@ -247,9 +247,7 @@ Creates a new attribute editor element which represents a field

int idx() const;
%Docstring
Returns the index of the field

:return:
Returns the index of the field.
%End

virtual QgsAttributeEditorElement *clone( QgsAttributeEditorElement *parent ) const /Factory/;
@@ -61,7 +61,7 @@ it will return false.
value is true.
:param featureRequest: The feature request, for which this index is queried.

:return: True, if this index holds the information to answer the request.
:return: True, if this index holds the information to answer the request.
%End
};

@@ -76,7 +76,7 @@ need to implement!!

:param f: The feature to write to

:return: true if a feature was written to f
:return: true if a feature was written to f
%End

virtual bool nextFeatureFilterExpression( QgsFeature &f );
@@ -89,7 +89,7 @@ redirect this call to fetchFeature so the default check will be omitted.

:param f: The feature to write to

:return: true if a feature was written to f
:return: true if a feature was written to f
%End

virtual bool nextFeatureFilterFids( QgsFeature &f );
@@ -103,7 +103,7 @@ so the default check will be omitted.

:param f: The feature to write to

:return: true if a feature was written to f
:return: true if a feature was written to f
%End

void geometryToDestinationCrs( QgsFeature &feature, const QgsCoordinateTransform &transform ) const;
@@ -259,7 +259,7 @@ Converts the provided variant to a compatible format

:param v: The value to convert

:return: True if the conversion was successful
:return: True if the conversion was successful
%End
%MethodCode
PyObject *sipParseErr = NULL;
@@ -121,7 +121,7 @@ Returns if a field index is valid

:param i: Index of the field which needs to be checked

:return: True if the field exists
:return: True if the field exists
%End


@@ -116,15 +116,11 @@ Test using renderer to generate the image to be compared.
QString report() const;
%Docstring
Returns a report for this test

:return: A report
%End

QString controlImagePath() const;
%Docstring
controlImagePath

:return:
Returns the path to the control images.
%End

static void drawBackground( QImage *image );
@@ -106,9 +106,7 @@ Check if the root location has been set for the manager.

QStringList allProfiles() const;
%Docstring
A list of all found profile names.

:return:
Returns a list of all found profile names.
%End

bool profileExists( const QString &name ) const;
@@ -357,7 +357,7 @@ Changes geometries of existing features
that will have their geometries changed.
The second map parameter being the new geometries themselves

:return: True in case of success and false in case of failure
:return: True in case of success and false in case of failure
%End

virtual bool createSpatialIndex();
@@ -254,7 +254,7 @@ Please note, that this does not check, if the requested features are cached.

:param featureRequest: The QgsFeatureRequest to be answered

:return: True if the information is being cached, false if not
:return: True if the information is being cached, false if not
%End


@@ -92,8 +92,7 @@ Adds a ring to polygon/multipolygon features
%Docstring
Adds a new part polygon to a multipart feature

:return:
- QgsGeometry.Success
:return: - QgsGeometry.Success
- QgsGeometry.AddPartSelectedGeometryNotFound
- QgsGeometry.AddPartNotMultiGeometry
- QgsGeometry.InvalidBaseGeometry
@@ -104,8 +103,7 @@ Adds a new part polygon to a multipart feature
%Docstring
Adds a new part polygon to a multipart feature

:return:
- QgsGeometry.Success
:return: - QgsGeometry.Success
- QgsGeometry.AddPartSelectedGeometryNotFound
- QgsGeometry.AddPartNotMultiGeometry
- QgsGeometry.InvalidBaseGeometry
@@ -120,8 +118,7 @@ Adds a new part polygon to a multipart feature
%Docstring
Adds a new part polygon to a multipart feature

:return:
- QgsGeometry.Success
:return: - QgsGeometry.Success
- QgsGeometry.AddPartSelectedGeometryNotFound
- QgsGeometry.AddPartNotMultiGeometry
- QgsGeometry.InvalidBaseGeometry
@@ -150,8 +147,7 @@ Splits parts cut by the given line
:param splitLine: line that splits the layer feature parts
:param topologicalEditing: true if topological editing is enabled

:return:
- QgsGeometry.InvalidBaseGeometry
:return: - QgsGeometry.InvalidBaseGeometry
- QgsGeometry.Success
- QgsGeometry.InvalidInput
- QgsGeometry.NothingHappened if a selection is present but no feature has been split
@@ -167,8 +163,7 @@ Splits features cut by the given line
:param splitLine: line that splits the layer features
:param topologicalEditing: true if topological editing is enabled

:return:
0 in case of success,
:return: 0 in case of success,
4 if there is a selection but no feature split
%End

@@ -36,7 +36,7 @@ This method should/will be called, whenever a new feature will be added to the l
:param defaultGeometry: A default geometry to add to the feature
:param feature: Updated feature after adding will be written back to this

:return: True in case of success, False if the operation failed/was aborted
:return: True in case of success, False if the operation failed/was aborted

TODO QGIS 3: remove const qualifier
%End
@@ -49,7 +49,7 @@ If successful layer->startEditing() will be called and true returned.

:param layer: The layer on which to start an edit session

:return: True, if the editing session was started
:return: True, if the editing session was started

TODO QGIS 3: remove const qualifier
%End
@@ -62,7 +62,7 @@ Appropriate dialogs should be shown like
:param layer: The layer to commit
:param allowCancel: True if a cancel button should be offered

:return: True if successful
:return: True if successful

TODO QGIS 3: remove const qualifier
%End
@@ -73,7 +73,7 @@ Should be called, when the features should be committed but the editing session

:param layer: The layer to commit

:return: True if successful
:return: True if successful

TODO QGIS 3: remove const qualifier
%End
@@ -137,7 +137,7 @@ Check if a given feature shall be rendered by this rule
:param f: The feature to test
:param context: The context in which the rendering happens

:return: True if the feature shall be rendered
:return: True if the feature shall be rendered
%End

bool isScaleOK( double scale ) const;
@@ -303,7 +303,7 @@ Render a given feature, will recursively call subclasses and only render if the
:param context: The rendering context
:param renderQueue: The rendering queue to which the feature should be added

:return: The result of the rendering. In explicit if the feature is added to the queue or
:return: The result of the rendering. In explicit if the feature is added to the queue or
the reason for not rendering the feature.
%End

@@ -380,8 +380,6 @@ Creates a OGC Expression element based on the provided function expression
:param doc: The document owning the element
:param element: The element parent
:param function: The expression to be encoded

:return:
%End
static bool createFunctionElement( QDomDocument &doc, QDomElement &element, const QString &function );
static bool functionFromSldElement( QDomElement &element, QString &function );
@@ -46,7 +46,7 @@ instead of calling this method directly.
:param editor: An editor widget if already existent. If NULL is provided, a new widget will be created.
:param parent: The parent for the wrapper class and any created widget.

:return: A new widget wrapper
:return: A new widget wrapper
%End

virtual QgsSearchWidgetWrapper *createSearchWidget( QgsVectorLayer *vl, int fieldIdx, QWidget *parent ) const /Factory/;
@@ -67,7 +67,7 @@ Create a new configuration widget for this widget type.
:param fieldIdx: The field index for which the widget will be created
:param parent: The parent widget of the created config widget

:return: A configuration widget
:return: A configuration widget
%End

bool supportsField( const QgsVectorLayer *vl, int fieldIdx );
@@ -77,7 +77,7 @@ Check if this editor widget type supports a certain field.
:param vl: The layer
:param fieldIdx: The field index

:return: True if the type is supported for this field
:return: True if the type is supported for this field

.. seealso:: :py:func:`fieldScore`
%End
@@ -173,7 +173,7 @@ Filter key events to e.g. toggle construction mode or adapt constraints

:param e: A mouse event (may be modified)

:return: If the event is hidden (construction mode hides events from the maptool)
:return: If the event is hidden (construction mode hides events from the maptool)
%End

bool applyConstraints( QgsMapMouseEvent *e );
@@ -61,7 +61,7 @@ Takes ownership
%Docstring
Returns the layer for which this form is shown

:return: Layer
:return: Layer
%End

bool editable();
@@ -106,7 +106,7 @@ Intercepts keypress on custom form (escape should not close it)
:param object: The object for which the event has been sent
:param event: The event which is being filtered

:return: true if the event has been handled (key was ESC)
:return: true if the event has been handled (key was ESC)
%End

void setMultiEditFeatureIds( const QgsFeatureIds &fids );
@@ -59,7 +59,7 @@ Constructor
QUrl url() const;
%Docstring

:return: the request url
:return: the request url
%End

QgsServerRequest::Method method() const;
@@ -184,7 +184,9 @@ sub processDoxygenLine {
}
# replace \returns with :return:
if ( $line =~ m/\\return(s)?/ ){
$line =~ s/\s*\\return(s)?/\n:return:/;
$line =~ s/\s*\\return(s)?\s*/\n:return: /;
# remove any trailing spaces, will be present now for empty 'returns' tags
$line =~ s/\s*$//g;
$INDENT = ' 'x( index($line,':',4) + 1);
}

@@ -295,8 +295,7 @@ class CORE_EXPORT QgsAttributeEditorField : public QgsAttributeEditorElement
{}

/**
* Returns the index of the field
* \returns
* Returns the index of the field.
*/
int idx() const { return mIdx; }

@@ -119,14 +119,11 @@ class CORE_EXPORT QgsMultiRenderChecker

/**
* Returns a report for this test
*
* \returns A report
*/
QString report() const { return mReport; }

/**
* \brief controlImagePath
* \returns
* Returns the path to the control images.
*/
QString controlImagePath() const;

@@ -110,8 +110,7 @@ class CORE_EXPORT QgsUserProfileManager : public QObject
bool rootLocationIsSet() const;

/**
* A list of all found profile names.
* \return
* Returns a list of all found profile names.
*/
QStringList allProfiles() const;

@@ -93,8 +93,7 @@ class CORE_EXPORT QgsVectorLayerEditUtils

/**
* Adds a new part polygon to a multipart feature
* \return
* - QgsGeometry::Success
* \returns - QgsGeometry::Success
* - QgsGeometry::AddPartSelectedGeometryNotFound
* - QgsGeometry::AddPartNotMultiGeometry
* - QgsGeometry::InvalidBaseGeometry
@@ -105,8 +104,7 @@ class CORE_EXPORT QgsVectorLayerEditUtils
/**
* Adds a new part polygon to a multipart feature
*
* \return
* - QgsGeometry::Success
* \returns - QgsGeometry::Success
* - QgsGeometry::AddPartSelectedGeometryNotFound
* - QgsGeometry::AddPartNotMultiGeometry
* - QgsGeometry::InvalidBaseGeometry
@@ -118,8 +116,7 @@ class CORE_EXPORT QgsVectorLayerEditUtils
/**
* Adds a new part polygon to a multipart feature
*
* \return
* - QgsGeometry::Success
* \returns - QgsGeometry::Success
* - QgsGeometry::AddPartSelectedGeometryNotFound
* - QgsGeometry::AddPartNotMultiGeometry
* - QgsGeometry::InvalidBaseGeometry
@@ -142,8 +139,7 @@ class CORE_EXPORT QgsVectorLayerEditUtils
* Splits parts cut by the given line
* \param splitLine line that splits the layer feature parts
* \param topologicalEditing true if topological editing is enabled
* \return
* - QgsGeometry::InvalidBaseGeometry
* \returns - QgsGeometry::InvalidBaseGeometry
* - QgsGeometry::Success
* - QgsGeometry::InvalidInput
* - QgsGeometry::NothingHappened if a selection is present but no feature has been split
@@ -157,8 +153,7 @@ class CORE_EXPORT QgsVectorLayerEditUtils
* Splits features cut by the given line
* \param splitLine line that splits the layer features
* \param topologicalEditing true if topological editing is enabled
* \return
* 0 in case of success,
* \returns 0 in case of success,
* 4 if there is a selection but no feature split
*/
QgsGeometry::OperationResult splitFeatures( const QVector<QgsPointXY> &splitLine, bool topologicalEditing = false );

0 comments on commit 7a1a787

Please sign in to comment.
You can’t perform that action at this time.