Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[sipify] fix annotations in multiline virtual methods
  • Loading branch information
3nids authored and nyalldawson committed Sep 14, 2018
1 parent 4cdf0a2 commit 05f35f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsvectorlayer.sip.in
Expand Up @@ -831,7 +831,7 @@ Load a named style from file/local db/datasource db
:param categories: the style categories to be loaded.
%End

virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag SIP_OUT,
virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag /Out/,
QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
%Docstring
Calls loadNamedStyle( theURI, resultFlag, false );
Expand Down
4 changes: 2 additions & 2 deletions scripts/sipify.pl
Expand Up @@ -1042,7 +1042,7 @@ sub detect_non_method_member{
if ( $virtual_line !~ m/^(\s*)virtual\b(.*)$/ ){
my $idx = $#OUTPUT-$LINE_IDX+$virtual_line_idx+2;
#print "len: $#OUTPUT line_idx: $LINE_IDX virt: $virtual_line_idx\n"idx: $idx\n$OUTPUT[$idx]\n";
$OUTPUT[$idx] = $virtual_line =~ s/^(\s*?)\b(.*)$/$1 virtual $2\n/r;
$OUTPUT[$idx] = fix_annotations($virtual_line =~ s/^(\s*?)\b(.*)$/$1 virtual $2\n/r);
}
}
elsif ( $LINE !~ m/^(\s*)virtual\b(.*)$/ ){
Expand Down Expand Up @@ -1148,7 +1148,7 @@ sub detect_non_method_member{
}
}
elsif ( $LINE =~ m/^[^()]+\([^()]*([^()]*\([^()]*\)[^()]*)*[^)]*$/ ){
dbg_info("Mulitline detected");
dbg_info("Multiline detected:: $LINE");
if ( $LINE =~ m/^\s*((else )?if|while|for) *\(/ ){
$MULTILINE_DEFINITION = MULTILINE_CONDITIONAL_STATEMENT;
}
Expand Down

0 comments on commit 05f35f2

Please sign in to comment.