Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Strip \a from doxygen comments in sipify
  • Loading branch information
nyalldawson committed Apr 3, 2017
1 parent 5813eb1 commit e1e1f0d
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion python/core/qgsanimatedicon.sip
Expand Up @@ -21,7 +21,7 @@ class QgsAnimatedIcon : QObject

QgsAnimatedIcon( const QString &iconPath = QString(), QObject *parent = 0 );
%Docstring
Create a new animated icon. Optionally, the \a iconPath can already be specified.
Create a new animated icon. Optionally, the iconPath can already be specified.
%End

QString iconPath() const;
Expand Down
16 changes: 8 additions & 8 deletions python/core/qgspropertytransformer.sip
Expand Up @@ -26,7 +26,7 @@ class QgsCurveTransform

QgsCurveTransform( const QList< QgsPoint > &controlPoints );
%Docstring
Constructs a QgsCurveTransform using a specified list of \a controlPoints.
Constructs a QgsCurveTransform using a specified list of controlPoints.
Behavior is undefined if duplicate x values exist in the control points
list.
%End
Expand Down Expand Up @@ -69,12 +69,12 @@ class QgsCurveTransform

double y( double x ) const;
%Docstring
Returns the mapped y value corresponding to the specified \a x value.
Returns the mapped y value corresponding to the specified x value.
%End

QVector< double > y( const QVector< double > &x ) const;
%Docstring
Returns a list of y values corresponding to a list of \a x values.
Returns a list of y values corresponding to a list of x values.
Calling this method is faster then calling the double variant multiple
times.
%End
Expand Down Expand Up @@ -232,7 +232,7 @@ class QgsPropertyTransformer
void setCurveTransform( QgsCurveTransform *transform /Transfer/ );
%Docstring
Sets a curve transform to apply to input values before they are transformed
by the individual transform subclasses. Ownership of \a transform is transferred
by the individual transform subclasses. Ownership of transform is transferred
to the property transformer.
\see curveTransform()
%End
Expand All @@ -247,7 +247,7 @@ class QgsPropertyTransformer

virtual QString toExpression( const QString &baseExpression ) const = 0;
%Docstring
Converts the transformer to a QGIS expression string. The \a baseExpression string consists
Converts the transformer to a QGIS expression string. The baseExpression string consists
of a sub-expression reflecting the parent property's state.
%End

Expand All @@ -270,7 +270,7 @@ class QgsPropertyTransformer
double transformNumeric( double input ) const;
%Docstring
Applies base class numeric transformations. Derived classes should call this
to transform an \a input numeric value before they apply any transform to the result.
to transform an input numeric value before they apply any transform to the result.
This applies any curve transforms which may exist on the transformer.
%End
};
Expand Down Expand Up @@ -329,7 +329,7 @@ class QgsGenericNumericTransformer : QgsPropertyTransformer

double value( double input ) const;
%Docstring
Calculates the size corresponding to a specific \a input value.
Calculates the size corresponding to a specific input value.
\returns calculated size using size scale transformer's parameters and type
%End

Expand Down Expand Up @@ -610,7 +610,7 @@ Copy constructor

void setRampName( const QString &name );
%Docstring
Sets the color ramp's \a name. The ramp name must be set to match
Sets the color ramp's name. The ramp name must be set to match
a color ramp available in the style database for conversion to expression
to work correctly.
\see rampName()
Expand Down
4 changes: 2 additions & 2 deletions python/gui/symbology-ng/characterwidget.sip
Expand Up @@ -58,7 +58,7 @@ class CharacterWidget : QWidget

void setFont( const QFont &font );
%Docstring
Sets the \a font to show in the widget.
Sets the font to show in the widget.
\see font()
.. versionadded:: 3.0
%End
Expand All @@ -85,7 +85,7 @@ class CharacterWidget : QWidget

void setCharacter( QChar character );
%Docstring
Sets the currently selected \a character in the widget.
Sets the currently selected character in the widget.
\see character()
\see characterSelected()
%End
Expand Down
13 changes: 8 additions & 5 deletions scripts/sipify.pl
Expand Up @@ -9,19 +9,22 @@

sub processDoxygenLine
{
if ( $_[0] =~ m/[\\@](ingroup|class)/ ) {
my $line = $_[0];
# remove \a formatting
$line =~ s/\\a //g;
if ( $line =~ m/[\\@](ingroup|class)/ ) {
return ""
}
if ( $_[0] =~ m/\\since .*?([\d\.]+)/i ) {
if ( $line =~ m/\\since .*?([\d\.]+)/i ) {
return ".. versionadded:: $1\n";
}
if ( $_[0] =~ m/[\\@]note (.*)/ ) {
if ( $line =~ m/[\\@]note (.*)/ ) {
return ".. note::\n\n $1\n";
}
if ( $_[0] =~ m/[\\@]brief (.*)/ ) {
if ( $line =~ m/[\\@]brief (.*)/ ) {
return " $1\n";
}
return $_[0];
return $line;
}


Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/sipifyheader.h
Expand Up @@ -152,7 +152,7 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private QgsBaseCla

/**
* \brief some brief
* My long doc string
* My long doc \a string
* is not very interesting!
*/
void LongDocStringMethodWithBrief();
Expand Down

0 comments on commit e1e1f0d

Please sign in to comment.