Remove \brief from doxygen in sipify

This commit is contained in:
Nyall Dawson 2017-04-02 21:28:20 +10:00
parent 0c08fb3b35
commit f044eeb597
5 changed files with 25 additions and 21 deletions

View File

@ -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

View File

@ -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.

View File

@ -7,24 +7,20 @@ use File::Basename;
# "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 @@ while(!eof $header){
# 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 @@ while(!eof $header){
# 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;

View File

@ -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/ );

View File

@ -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 );