Remove ingroup and class from doxygen when creating sip docstrings

This commit is contained in:
Nyall Dawson 2017-04-02 20:30:22 +10:00
parent d40de5dbd0
commit 28a57c8f95
12 changed files with 28 additions and 17 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -22,7 +22,6 @@ typedef QList<QgsPointV2> 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,

View File

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

View File

@ -39,7 +39,6 @@ typedef QVector<QVariant> QgsSuperClass;
class QgsSipifyHeader : QtClass<QVariant>
{
%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"

View File

@ -162,6 +162,11 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private QgsBaseCla
};
/**
* \class ClassWithPrivateInheritanceOnly
* \ingroup core
* Documentation goes here
*/
class CORE_EXPORT ClassWithPrivateInheritanceOnly : private QgsBaseClass
{
//! A constructor with definition in header on several lines