Skip to content
Permalink
Browse files
[sifpiy] handle multiline body
  • Loading branch information
3nids committed Apr 24, 2017
1 parent 46310d4 commit 085803de8af08a624adabedc3cc1d307724b2dd0
Showing with 28 additions and 2 deletions.
  1. +9 −2 scripts/sipify.pl
  2. +6 −0 tests/scripts/sipifyheader.expected.sip
  3. +13 −0 tests/scripts/sipifyheader.h
@@ -434,12 +434,19 @@ sub processDoxygenLine
if ($line !~ m/\{.*?\}$/){
$line = $lines[$line_idx];
$line_idx++;
my $nesting_index = 1;
if ( $line =~ m/^\s*\{\s*$/ ){
while ($line_idx < $line_count){
$line = $lines[$line_idx];
$line_idx++;
if ( $line =~ m/\}\s*$/ ){
last;
if ( $line =~ m/^\s*{/ ){
$nesting_index++;
}
elsif ( $line =~ m/\}\s*$/ ){
$nesting_index--;
if ($nesting_index == 0){
last;
}
}
}
}
@@ -206,6 +206,12 @@ Removing function body with virtual const reference
:rtype: QgsLayerMetadata
%End

bool myMultiLineBody();
%Docstring
Mulitline body
:rtype: bool
%End


virtual int overriddenProperty();
virtual int overrideWithoutVirtual();
@@ -230,6 +230,19 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
//! Removing function body with virtual const reference
virtual const QgsLayerMetadata &metadata() const { return mMetadata; }

//! Mulitline body
bool myMultiLineBody()
{
if (isTrue())
{
return false;
}
else
{
return true;
}
}

bool deletedFunction() = delete; // some comments

virtual int overriddenProperty() override { return 42; } // if in doubt, comment it out

0 comments on commit 085803d

Please sign in to comment.