Skip to content

Commit 28a57c8

Browse files
committedApr 2, 2017
Remove ingroup and class from doxygen when creating sip docstrings
1 parent d40de5d commit 28a57c8

12 files changed

+28
-17
lines changed
 

‎python/core/processing/qgsprocessingfeedback.sip

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
class QgsProcessingFeedback : QgsFeedback
1313
{
1414
%Docstring
15-
\class QgsProcessingFeedback
16-
\ingroup core
1715
Base class for providing feedback from a processing algorithm.
1816

1917
This base class implementation silently ignores all feedback reported by algorithms.

‎python/core/processing/qgsprocessingprovider.sip

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
class QgsProcessingProvider
1313
{
1414
%Docstring
15-
\class QgsProcessingProvider
16-
\ingroup core
1715
Abstract base class for processing providers. An algorithm provider is a set of
1816
related algorithms, typically from the same external application or related
1917
to a common area of analysis.

‎python/core/processing/qgsprocessingregistry.sip

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
class QgsProcessingRegistry : QObject
1313
{
1414
%Docstring
15-
\class QgsProcessingRegistry
16-
\ingroup core
1715
Registry for various processing components, including providers, algorithms
1816
and various parameters and outputs.
1917

‎python/core/qgsactionscope.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
class QgsActionScope
1111
{
1212
%Docstring
13-
\ingroup core
1413
An action scope defines a "place" for an action to be shown and may add
1514
additional expression variables.
1615
Each QgsAction can be available in one or several action scopes.

‎python/core/qgsactionscoperegistry.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
class QgsActionScopeRegistry : QObject
1111
{
1212
%Docstring
13-
\ingroup core
1413
The action scope registry is an application wide registry that
1514
contains a list of available action scopes.
1615
Some scopes are available by default, additional ones can be registered

‎python/core/qgsanimatedicon.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
class QgsAnimatedIcon : QObject
1212
{
1313
%Docstring
14-
\ingroup core
1514
Animated icon is keeping an animation running if there are listeners connected to frameChanged
1615
%End
1716

‎python/core/qgsfeature.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ typedef qint64 QgsFeatureId;
2020
class QgsFeature
2121
{
2222
%Docstring
23-
\ingroup core
2423
The feature class encapsulates a single feature including its id,
2524
geometry and a list of field/values attributes.
2625
\note QgsFeature objects are implicitly shared.

‎python/core/qgssettings.sip

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
class QgsSettings : QObject
1313
{
1414
%Docstring
15-
\ingroup core
16-
\class QgsSettings
1715

1816
This class is a composition of two QSettings instances:
1917
- the main QSettings instance is the standard User Settings and

‎python/core/qgsvectorlayer.sip

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ typedef QList<QgsPointV2> QgsPointSequence;
2222
class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
2323
{
2424
%Docstring
25-
\ingroup core
2625
Represents a vector layer which manages a vector based data sets.
2726

2827
The QgsVectorLayer is instantiated by specifying the name of a data provider,

‎scripts/sipify.pl

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,17 @@
77
# "multiline function signatures"
88
# docustrings for QgsFeature::QgsAttributes
99

10+
sub shouldSkipDoxygenLine
11+
{
12+
do {no warnings 'uninitialized';
13+
if ( $_[0] =~ m/[\\@](ingroup|class)/ ) {
14+
return 1;
15+
}
16+
return 0;
17+
}
18+
}
19+
20+
1021
my $headerfile = $ARGV[0];
1122

1223
open(my $header, "<", $headerfile) || die "Couldn't open '".$headerfile."' for reading because: ".$!;
@@ -150,12 +161,18 @@
150161
# Detect comment block
151162
if ($line =~ m/^\s*\/\*/){
152163
do {no warnings 'uninitialized';
153-
$comment = $line =~ s/^\s*\/\*(\*)?(.*)$/$2/r;
164+
if ( !shouldSkipDoxygenLine($line) )
165+
{
166+
$comment = $line =~ s/^\s*\/\*(\*)?(.*)$/$2/r;
167+
}
154168
};
155169
$comment =~ s/^\s*$//;
156170
while(!eof $header){
157171
$line = readline $header;
158-
$comment .= $line =~ s/\s*\*?(.*?)(\/)?$/$1/r;
172+
if ( !shouldSkipDoxygenLine($line) )
173+
{
174+
$comment .= $line =~ s/\s*\*?(.*?)(\/)?$/$1/r;
175+
}
159176
if ( $line =~ m/\*\/$/ ){
160177
last;
161178
}
@@ -167,7 +184,7 @@
167184

168185
# save comments and do not print them, except in SIP_RUN
169186
if ( $SIP_RUN == 0 ){
170-
if ( $line =~ m/^\s*\/\// ){
187+
if ( $line =~ m/^\s*\/\// && !shouldSkipDoxygenLine($line) ){
171188
$line =~ s/^\s*\/\/\!*\s*(.*)\n?$/$1/;
172189
$comment = $line;
173190
next;

‎tests/scripts/sipifyheader.expected.sip

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ typedef QVector<QVariant> QgsSuperClass;
3939
class QgsSipifyHeader : QtClass<QVariant>
4040
{
4141
%Docstring
42-
\ingroup core
4342
Documentation goes here
4443
%End
4544

@@ -125,6 +124,9 @@ complex default value and type (i.e. containing commas) should be given as a str
125124

126125
class ClassWithPrivateInheritanceOnly
127126
{
127+
%Docstring
128+
Documentation goes here
129+
%End
128130

129131
%TypeHeaderCode
130132
#include "sipifyheader.h"

‎tests/scripts/sipifyheader.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private QgsBaseCla
162162

163163
};
164164

165+
/**
166+
* \class ClassWithPrivateInheritanceOnly
167+
* \ingroup core
168+
* Documentation goes here
169+
*/
165170
class CORE_EXPORT ClassWithPrivateInheritanceOnly : private QgsBaseClass
166171
{
167172
//! A constructor with definition in header on several lines

0 commit comments

Comments
 (0)
Please sign in to comment.