From c29fc35155b35edbe4d432b8b83d41232e5c5e17 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Wed, 19 Jul 2017 10:34:46 +0200 Subject: [PATCH] also "s/( )/()/;" in sipify.pl (followup 4f9a9e036) --- scripts/sipify.pl | 1 + tests/code_layout/sipifyheader.expected.sip | 4 ++-- tests/code_layout/sipifyheader.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/sipify.pl b/scripts/sipify.pl index 19722709182f..3bdea4ee9ed2 100755 --- a/scripts/sipify.pl +++ b/scripts/sipify.pl @@ -253,6 +253,7 @@ sub fix_annotations { } # see https://regex101.com/r/5iNptO/4 $line =~ s/(?, +)?(const )?(\w+)(\<(?>[^<>]|(?4))*\>)?\s+[\w&*]+\s+SIP_PYARGREMOVE( = [^()]*(\(\s*(?:[^()]++|(?6))*\s*\))?)?(?()|,?)//g; + $line =~ s/\(\s+\)/()/; } $line =~ s/SIP_FORCE//; return $line; diff --git a/tests/code_layout/sipifyheader.expected.sip b/tests/code_layout/sipifyheader.expected.sip index 542ef8826762..d94cf621727e 100644 --- a/tests/code_layout/sipifyheader.expected.sip +++ b/tests/code_layout/sipifyheader.expected.sip @@ -304,7 +304,7 @@ Mulitline body void combinedAnnotations() /Factory,PyName=otherName/; void multiAnnotationArg( SomeClass **object /Out,TransferBack/, int &another /Out/ ); - void simple( ); + void simple(); %Docstring remove argument %End @@ -312,7 +312,7 @@ remove argument void test( ); void avoidIntersections( const QList &avoidIntersectionsLayers ); - void position( ); + void position(); void position( bool keep ); void position( bool keep, bool keep ); void position( bool keep ); diff --git a/tests/code_layout/sipifyheader.h b/tests/code_layout/sipifyheader.h index 278ecfb5f0e8..3a7f19f715a3 100644 --- a/tests/code_layout/sipifyheader.h +++ b/tests/code_layout/sipifyheader.h @@ -333,7 +333,7 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass, private Ui::QgsBas //! remove argument void simple( bool test SIP_PYARGREMOVE ); - void method( bool myArg SIP_PYARGREMOVE = test ); + void method( bool myArg SIP_PYARGREMOVE = test ); void test( QgsMapLayer *vl SIP_PYARGREMOVE = nullptr ); void avoidIntersections( const QList &avoidIntersectionsLayers, const QHash > &ignoreFeatures SIP_PYARGREMOVE = ( QHash >() ) );