diff --git a/python/core/processing/qgsprocessingfeedback.sip b/python/core/processing/qgsprocessingfeedback.sip index 376f7a6252b..f00313f2692 100644 --- a/python/core/processing/qgsprocessingfeedback.sip +++ b/python/core/processing/qgsprocessingfeedback.sip @@ -12,8 +12,6 @@ class QgsProcessingFeedback : QgsFeedback { %Docstring - \class QgsProcessingFeedback - \ingroup core Base class for providing feedback from a processing algorithm. This base class implementation silently ignores all feedback reported by algorithms. diff --git a/python/core/processing/qgsprocessingprovider.sip b/python/core/processing/qgsprocessingprovider.sip index 5e05248020f..b195fe16def 100644 --- a/python/core/processing/qgsprocessingprovider.sip +++ b/python/core/processing/qgsprocessingprovider.sip @@ -12,8 +12,6 @@ class QgsProcessingProvider { %Docstring - \class QgsProcessingProvider - \ingroup core Abstract base class for processing providers. An algorithm provider is a set of related algorithms, typically from the same external application or related to a common area of analysis. diff --git a/python/core/processing/qgsprocessingregistry.sip b/python/core/processing/qgsprocessingregistry.sip index 994ef30aa20..2fd04b5f9cb 100644 --- a/python/core/processing/qgsprocessingregistry.sip +++ b/python/core/processing/qgsprocessingregistry.sip @@ -12,8 +12,6 @@ class QgsProcessingRegistry : QObject { %Docstring - \class QgsProcessingRegistry - \ingroup core Registry for various processing components, including providers, algorithms and various parameters and outputs. diff --git a/python/core/qgsactionscope.sip b/python/core/qgsactionscope.sip index e07af5c4943..72862b89b5b 100644 --- a/python/core/qgsactionscope.sip +++ b/python/core/qgsactionscope.sip @@ -10,7 +10,6 @@ class QgsActionScope { %Docstring - \ingroup core An action scope defines a "place" for an action to be shown and may add additional expression variables. Each QgsAction can be available in one or several action scopes. diff --git a/python/core/qgsactionscoperegistry.sip b/python/core/qgsactionscoperegistry.sip index 35c0870ac8d..016da439a06 100644 --- a/python/core/qgsactionscoperegistry.sip +++ b/python/core/qgsactionscoperegistry.sip @@ -10,7 +10,6 @@ class QgsActionScopeRegistry : QObject { %Docstring - \ingroup core The action scope registry is an application wide registry that contains a list of available action scopes. Some scopes are available by default, additional ones can be registered diff --git a/python/core/qgsanimatedicon.sip b/python/core/qgsanimatedicon.sip index 3caab34b04f..892fa16075e 100644 --- a/python/core/qgsanimatedicon.sip +++ b/python/core/qgsanimatedicon.sip @@ -11,7 +11,6 @@ class QgsAnimatedIcon : QObject { %Docstring - \ingroup core Animated icon is keeping an animation running if there are listeners connected to frameChanged %End diff --git a/python/core/qgsfeature.sip b/python/core/qgsfeature.sip index 851882a57b2..97a09002483 100644 --- a/python/core/qgsfeature.sip +++ b/python/core/qgsfeature.sip @@ -20,7 +20,6 @@ typedef qint64 QgsFeatureId; class QgsFeature { %Docstring - \ingroup core The feature class encapsulates a single feature including its id, geometry and a list of field/values attributes. \note QgsFeature objects are implicitly shared. diff --git a/python/core/qgssettings.sip b/python/core/qgssettings.sip index dda661f38ae..0dd7e2c86da 100644 --- a/python/core/qgssettings.sip +++ b/python/core/qgssettings.sip @@ -12,8 +12,6 @@ class QgsSettings : QObject { %Docstring - \ingroup core - \class QgsSettings This class is a composition of two QSettings instances: - the main QSettings instance is the standard User Settings and diff --git a/python/core/qgsvectorlayer.sip b/python/core/qgsvectorlayer.sip index 6b8bf914f3b..089d72ed2ca 100644 --- a/python/core/qgsvectorlayer.sip +++ b/python/core/qgsvectorlayer.sip @@ -22,7 +22,6 @@ typedef QList QgsPointSequence; class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator { %Docstring - \ingroup core Represents a vector layer which manages a vector based data sets. The QgsVectorLayer is instantiated by specifying the name of a data provider, diff --git a/scripts/sipify.pl b/scripts/sipify.pl index 61f3c6b352f..7dd799d2343 100755 --- a/scripts/sipify.pl +++ b/scripts/sipify.pl @@ -7,6 +7,17 @@ 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; + } +} + + my $headerfile = $ARGV[0]; open(my $header, "<", $headerfile) || die "Couldn't open '".$headerfile."' for reading because: ".$!; @@ -150,12 +161,18 @@ while(!eof $header){ # Detect comment block if ($line =~ m/^\s*\/\*/){ do {no warnings 'uninitialized'; - $comment = $line =~ s/^\s*\/\*(\*)?(.*)$/$2/r; + if ( !shouldSkipDoxygenLine($line) ) + { + $comment = $line =~ s/^\s*\/\*(\*)?(.*)$/$2/r; + } }; $comment =~ s/^\s*$//; while(!eof $header){ $line = readline $header; - $comment .= $line =~ s/\s*\*?(.*?)(\/)?$/$1/r; + if ( !shouldSkipDoxygenLine($line) ) + { + $comment .= $line =~ s/\s*\*?(.*?)(\/)?$/$1/r; + } if ( $line =~ m/\*\/$/ ){ last; } @@ -167,7 +184,7 @@ while(!eof $header){ # save comments and do not print them, except in SIP_RUN if ( $SIP_RUN == 0 ){ - if ( $line =~ m/^\s*\/\// ){ + if ( $line =~ m/^\s*\/\// && !shouldSkipDoxygenLine($line) ){ $line =~ s/^\s*\/\/\!*\s*(.*)\n?$/$1/; $comment = $line; next; diff --git a/tests/scripts/sipifyheader.expected.sip b/tests/scripts/sipifyheader.expected.sip index 0b810e36f1e..67d3c568493 100644 --- a/tests/scripts/sipifyheader.expected.sip +++ b/tests/scripts/sipifyheader.expected.sip @@ -39,7 +39,6 @@ typedef QVector QgsSuperClass; class QgsSipifyHeader : QtClass { %Docstring - \ingroup core Documentation goes here %End @@ -125,6 +124,9 @@ complex default value and type (i.e. containing commas) should be given as a str class ClassWithPrivateInheritanceOnly { +%Docstring + Documentation goes here +%End %TypeHeaderCode #include "sipifyheader.h" diff --git a/tests/scripts/sipifyheader.h b/tests/scripts/sipifyheader.h index b88c7a44c5b..4c5d8a6494c 100644 --- a/tests/scripts/sipifyheader.h +++ b/tests/scripts/sipifyheader.h @@ -162,6 +162,11 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass, private QgsBaseCla }; +/** + * \class ClassWithPrivateInheritanceOnly + * \ingroup core + * Documentation goes here + */ class CORE_EXPORT ClassWithPrivateInheritanceOnly : private QgsBaseClass { //! A constructor with definition in header on several lines