[sipify] do not copy struct docstrings

This commit is contained in:
Matthias Kuhn 2017-04-04 10:37:58 +02:00
parent f82997c4aa
commit 97e2661eeb
3 changed files with 17 additions and 1 deletions

View File

@ -389,7 +389,7 @@ while(!eof $header){
}
# 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*$/ ){

View File

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

View File

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