Skip to content

Commit

Permalink
[sipify] handle SIP_SKIP on several lines
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Apr 20, 2017
1 parent 1ab5a62 commit f022858
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions scripts/sipify.pl
Expand Up @@ -189,6 +189,15 @@ sub processDoxygenLine
# SIP_SKIP
if ( $line =~ m/SIP_SKIP/ ){
$comment = '';
# if multiline definition, remove previous lines
if ( $MULTILINE_DEFINITION == 1){
my $opening_line = '';
while ( $opening_line !~ m/^[^()]*\(([^()]*\([^()]*\)[^()]*)*[^()]*$/){
$opening_line = pop(@output);
$#output >= 0 or die 'could not reach opening definition';
}
$MULTILINE_DEFINITION = 0;
}
next;
}

Expand Down
1 change: 1 addition & 0 deletions tests/scripts/sipifyheader.expected.sip
Expand Up @@ -120,6 +120,7 @@ A multiline method signature

void nonAnnotatedMethodFollowingSkip();


virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) /Factory/;
%Docstring
Factory annotation
Expand Down
4 changes: 4 additions & 0 deletions tests/scripts/sipifyheader.h
Expand Up @@ -163,6 +163,10 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas

void nonAnnotatedMethodFollowingSkip();

bool myMultiLineSkipped( const QList<int, QString> &list1,
const QList<int, QString> &list2,
const QList<int, QString> &list3 ) SIP_SKIP;

//! Factory annotation
virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) override SIP_FACTORY;

Expand Down

0 comments on commit f022858

Please sign in to comment.