Skip to content

Commit 32e844f

Browse files
committedDec 18, 2018
fix multiline comments on out params
1 parent edfb7e1 commit 32e844f

File tree

4 files changed

+19
-28
lines changed

4 files changed

+19
-28
lines changed
 

‎python/core/auto_generated/geometry/qgsabstractgeometry.sip.in

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -344,13 +344,10 @@ Searches for the closest segment of the geometry to a given point.
344344
:param pt: specifies the point to find closest segment to
345345
:param segmentPt: storage for the closest point within the geometry
346346
:param vertexAfter: storage for the ID of the vertex at the end of the closest segment
347-
of the geometry, +1 if the point is to the right of the geometry, or 0 for cases where left/right could not
348-
be determined, e.g. point exactly on a line)
349-
false if point is to right of segment)
350347
:param epsilon: epsilon for segment snapping
351348

352349
:return: squared distance to closest segment or negative value on error
353-
leftOf: indicates whether the point lies on the left side of the geometry (-1 if point is to the left
350+
leftOf: indicates whether the point lies on the left side of the geometry (-1 if point is to the left of the geometry, +1 if the point is to the right of the geometry, or 0 for cases where left/right could not be determined, e.g. point exactly on a line) false if point is to right of segment)
354351
%End
355352

356353

‎python/core/auto_generated/qgsmaplayer.sip.in

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,9 @@ Save the current metadata of this layer as the default metadata
650650
(either as a .qmd file on disk or as a
651651
record in the users style table in their personal qgis.db)
652652

653-
we did not manage to save the default metadata.
654653

655654
:return: a QString with any status messages
656-
resultFlag: a reference to a flag that will be set to false if
655+
resultFlag: a reference to a flag that will be set to false if we did not manage to save the default metadata.
657656

658657
.. versionadded:: 3.0
659658
%End
@@ -688,10 +687,9 @@ record in the users style table in their personal qgis.db)
688687
is a file and load that, if that fails the qgis.db metadata
689688
table will be consulted to see if there is a metadata who's
690689
key matches the URI.
691-
we did not manage to load the default metadata.
692690

693691
:return: a QString with any status messages
694-
resultFlag: a reference to a flag that will be set to false if
692+
resultFlag: a reference to a flag that will be set to false if we did not manage to load the default metadata.
695693

696694
.. versionadded:: 3.0
697695
%End
@@ -752,10 +750,9 @@ Retrieve the default style for this layer if one
752750
exists (either as a .qml file on disk or as a
753751
record in the users style table in their personal qgis.db)
754752

755-
we did not manage to load the default style.
756753

757754
:return: a QString with any status messages
758-
resultFlag: a reference to a flag that will be set to false if
755+
resultFlag: a reference to a flag that will be set to false if we did not manage to load the default style.
759756

760757
.. seealso:: :py:func:`also`
761758
%End
@@ -771,11 +768,10 @@ record in the users style table in their personal qgis.db)
771768
is a file and load that, if that fails the qgis.db styles
772769
table will be consulted to see if there is a style who's
773770
key matches the URI.
774-
we did not manage to load the default style.
775771
:param categories: the style categories to be loaded.
776772

777773
:return: a QString with any status messages
778-
resultFlag: a reference to a flag that will be set to false if
774+
resultFlag: a reference to a flag that will be set to false if we did not manage to load the default style.
779775

780776
.. seealso:: :py:func:`also`
781777
%End
@@ -834,10 +830,9 @@ Save the properties of this layer as the default style
834830
(either as a .qml file on disk or as a
835831
record in the users style table in their personal qgis.db)
836832

837-
we did not manage to save the default style.
838833

839834
:return: a QString with any status messages
840-
resultFlag: a reference to a flag that will be set to false if
835+
resultFlag: a reference to a flag that will be set to false if we did not manage to save the default style.
841836

842837
.. seealso:: :py:func:`loadNamedStyle`
843838
%End
@@ -853,11 +848,10 @@ record in the users style table in their personal qgis.db)
853848
is a file and save to that, if that fails the qgis.db styles
854849
table will be used to create a style entry who's
855850
key matches the URI.
856-
we did not manage to save the default style.
857851
:param categories: the style categories to be saved.
858852

859853
:return: a QString with any status messages
860-
resultFlag: a reference to a flag that will be set to false if
854+
resultFlag: a reference to a flag that will be set to false if we did not manage to save the default style.
861855

862856
.. seealso:: :py:func:`saveDefaultStyle`
863857
%End

‎python/core/auto_generated/qgspropertytransformer.sip.in

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -295,14 +295,12 @@ of a sub-expression reflecting the parent property's state.
295295
Attempts to parse an expression into a corresponding property transformer.
296296

297297
:param expression: expression to parse
298-
is used to calculate the input to the property transformer. This will be set to an
299-
empty string if a field reference is the transformer input.
300298
:param fieldName: will be set to a field name which is used to calculate the input
301299
to the property transformer. This will be set to an
302300
empty string if an expression is the transformer input.
303301

304302
:return: corresponding property transformer, or None if expression could not
305-
baseExpression: will be set to the component of the source expression which
303+
baseExpression: will be set to the component of the source expression which is used to calculate the input to the property transformer. This will be set to an empty string if a field reference is the transformer input.
306304
be parsed to a transformer.
307305
%End
308306

@@ -364,14 +362,12 @@ Constructor for QgsGenericNumericTransformer.
364362
Attempts to parse an expression into a corresponding :py:class:`QgsSizeScaleTransformer`.
365363

366364
:param expression: expression to parse
367-
is used to calculate the input to the property transformer. This will be set to an
368-
empty string if a field reference is the transformer input.
369365
:param fieldName: will be set to a field name which is used to calculate the input
370366
to the property transformer. This will be set to an
371367
empty string if an expression is the transformer input.
372368

373369
:return: corresponding :py:class:`QgsSizeScaleTransformer`, or None if expression could not
374-
baseExpression: will be set to the component of the source expression which
370+
baseExpression: will be set to the component of the source expression which is used to calculate the input to the property transformer. This will be set to an empty string if a field reference is the transformer input.
375371
be parsed to a size scale transformer.
376372
%End
377373

@@ -513,14 +509,12 @@ Constructor for QgsSizeScaleTransformer.
513509
Attempts to parse an expression into a corresponding QgsSizeScaleTransformer.
514510

515511
:param expression: expression to parse
516-
is used to calculate the input to the property transformer. This will be set to an
517-
empty string if a field reference is the transformer input.
518512
:param fieldName: will be set to a field name which is used to calculate the input
519513
to the property transformer. This will be set to an
520514
empty string if an expression is the transformer input.
521515

522516
:return: corresponding QgsSizeScaleTransformer, or None if expression could not
523-
baseExpression: will be set to the component of the source expression which
517+
baseExpression: will be set to the component of the source expression which is used to calculate the input to the property transformer. This will be set to an empty string if a field reference is the transformer input.
524518
be parsed to a size scale transformer.
525519
%End
526520

‎scripts/sipify.pl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,17 +1212,23 @@ sub detect_non_method_member{
12121212
if ( $1 ~~ @SKIPPED_PARAMS_OUT ) {
12131213
$comment_line =~ s/^:param\s+(\w+):(.*)$/$1: $2/;
12141214
push @out_params, $comment_line ;
1215+
$skipping_param = 2;
1216+
}
1217+
else {
1218+
$skipping_param = 1;
12151219
}
1216-
$skipping_param = 1;
12171220
next;
12181221
}
12191222
}
1220-
if ( $skipping_param == 1 ) {
1223+
if ( $skipping_param > 0 ) {
12211224
if ( $comment_line =~ m/^(:.*|\.\..*|\s*)$/ ){
12221225
$skipping_param = 0;
12231226
}
1224-
else {
1227+
elsif ( $skipping_param == 2 ) {
1228+
$comment_line =~ s/^\s+/ /;
1229+
$out_params[$#out_params] .= $comment_line;
12251230
# exit_with_error('Skipped param (SIP_OUT) should have their doc on a single line');
1231+
next;
12261232
}
12271233
}
12281234
write_output("CM2", "$doc_prepend$comment_line\n");

0 commit comments

Comments
 (0)
Please sign in to comment.