Skip to content
Permalink
Browse files
[sipify] do not copy struct docstrings
  • Loading branch information
m-kuhn committed Apr 7, 2017
1 parent f82997c commit 97e2661eeb00820dd9cbb0607711b625bd4251ea
Showing with 17 additions and 1 deletion.
  1. +1 −1 scripts/sipify.pl
  2. +6 −0 tests/scripts/sipifyheader.expected.sip
  3. +10 −0 tests/scripts/sipifyheader.h
@@ -389,7 +389,7 @@ sub processDoxygenLine
}

# write comment
if ( $line =~ m/^\s*$/ || $line =~ m/\/\// || $line =~ m/\s*typedef / ){
if ( $line =~ m/^\s*$/ || $line =~ m/\/\// || $line =~ m/\s*typedef / || $line =~ m/\s*struct / ){
$comment = '';
}
elsif ( $comment !~ m/^\s*$/ ){
@@ -69,6 +69,12 @@ class QgsSipifyHeader : QtClass<QVariant>
};
typedef QFlags<QgsSipifyHeader::MyEnum> Flags;

struct Data
{
QString name;
int count;
};

explicit QgsSipifyHeader();
%Docstring
A constructor with definition in header
@@ -105,6 +105,16 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
};
Q_DECLARE_FLAGS( Flags, MyEnum )

/**
* Docstring headers for structs are not supported by sip (as of 4.18) and
* therefore this docstring must not to be copied to the sipfile.
*/
struct Data
{
QString name;
int count;
};

//! A constructor with definition in header
explicit QgsSipifyHeader()
: QtClass<QVariant>()

0 comments on commit 97e2661

Please sign in to comment.