Skip to content
Permalink
Browse files
Remove \brief from doxygen in sipify
  • Loading branch information
nyalldawson committed Apr 2, 2017
1 parent 0c08fb3 commit f044eeb597fbc3cf406ad13a0cc5ab12dcae4588
Showing with 25 additions and 21 deletions.
  1. +1 −1 python/core/annotations/qgsannotationmanager.sip
  2. +1 −1 python/core/qgsvectorlayer.sip
  3. +9 −19 scripts/sipify.pl
  4. +7 −0 tests/scripts/sipifyheader.expected.sip
  5. +7 −0 tests/scripts/sipifyheader.h
@@ -15,7 +15,7 @@ class QgsAnnotationManager : QObject
%Docstring
.. versionadded:: 3.0

\brief Manages storage of a set of QgsAnnotation annotation objects.
Manages storage of a set of QgsAnnotation annotation objects.

QgsAnnotationManager handles the storage, serializing and deserializing
of QgsAnnotations. Usually this class is not constructed directly, but
@@ -1539,7 +1539,7 @@ Returns the current transparency for the vector layer

QgsConditionalLayerStyles *conditionalStyles() const;
%Docstring
@brief Return the conditional styles that are set for this layer. Style information is
Return the conditional styles that are set for this layer. Style information is
used to render conditional formatting in the attribute table.
@return Return a QgsConditionalLayerStyles object holding the conditional attribute
style information. Style information is generic and can be used for anything.
@@ -7,24 +7,20 @@
# "multiline function signatures"
# docustrings for QgsFeature::QgsAttributes

sub shouldSkipDoxygenLine
{
do {no warnings 'uninitialized';
if ( $_[0] =~ m/[\\@](ingroup|class)/ ) {
return 1;
}
return 0;
}
}

sub processDoxygenLine
{
if ( $_[0] =~ m/[\\@](ingroup|class)/ ) {
return ""
}
if ( $_[0] =~ m/[\\@]note added .*?([\d\.]+)/i ) {
return ".. versionadded:: $1\n";
}
if ( $_[0] =~ m/[\\@]note (.*)/ ) {
return ".. note::\n\n $1\n";
}
if ( $_[0] =~ m/[\\@]brief (.*)/ ) {
return " $1\n";
}
return $_[0];
}

@@ -172,18 +168,12 @@ sub processDoxygenLine
# Detect comment block
if ($line =~ m/^\s*\/\*/){
do {no warnings 'uninitialized';
if ( !shouldSkipDoxygenLine($line) )
{
$comment = processDoxygenLine( $line =~ s/^\s*\/\*(\*)?(.*)$/$2/r );
}
$comment = processDoxygenLine( $line =~ s/^\s*\/\*(\*)?(.*)$/$2/r );
};
$comment =~ s/^\s*$//;
while(!eof $header){
$line = readline $header;
if ( !shouldSkipDoxygenLine($line) )
{
$comment .= processDoxygenLine( $line =~ s/\s*\*?(.*?)(\/)?$/$1/r );
}
$comment .= processDoxygenLine( $line =~ s/\s*\*?(.*?)(\/)?$/$1/r );
if ( $line =~ m/\*\/$/ ){
last;
}
@@ -195,7 +185,7 @@ sub processDoxygenLine

# save comments and do not print them, except in SIP_RUN
if ( $SIP_RUN == 0 ){
if ( $line =~ m/^\s*\/\// && !shouldSkipDoxygenLine($line) ){
if ( $line =~ m/^\s*\/\// ){
$line =~ s/^\s*\/\/\!*\s*(.*)\n?$/$1/;
$comment = processDoxygenLine( $line );
next;
@@ -93,6 +93,13 @@ Factory annotation
is not very interesting!
%End

void LongDocStringMethodWithBrief();
%Docstring
some brief
My long doc string
is not very interesting!
%End

bool isOKwithErrMesg( QString &ErrMsg /Out/ );

void InOutParam( bool &ok = true /In,Out/ );
@@ -124,6 +124,13 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private QgsBaseCla
*/
void LongDocStringMethod();

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

bool isOKwithErrMesg( QString &ErrMsg SIP_OUT );

void InOutParam( bool &ok = true SIP_INOUT );

0 comments on commit f044eeb

Please sign in to comment.