Skip to content

Commit

Permalink
also "s/( )/()/;" in sipify.pl (followup 4f9a9e0)
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 19, 2017
1 parent 0665072 commit c29fc35
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions scripts/sipify.pl
Expand Up @@ -253,6 +253,7 @@ sub fix_annotations {
}
# see https://regex101.com/r/5iNptO/4
$line =~ s/(?<coma>, +)?(const )?(\w+)(\<(?>[^<>]|(?4))*\>)?\s+[\w&*]+\s+SIP_PYARGREMOVE( = [^()]*(\(\s*(?:[^()]++|(?6))*\s*\))?)?(?(<coma>)|,?)//g;
$line =~ s/\(\s+\)/()/;
}
$line =~ s/SIP_FORCE//;
return $line;
Expand Down
4 changes: 2 additions & 2 deletions tests/code_layout/sipifyheader.expected.sip
Expand Up @@ -304,15 +304,15 @@ Mulitline body
void combinedAnnotations() /Factory,PyName=otherName/;
void multiAnnotationArg( SomeClass **object /Out,TransferBack/, int &another /Out/ );

void simple( );
void simple();
%Docstring
remove argument
%End
void method( );
void test( );
void avoidIntersections( const QList<QgsVectorLayer *> &avoidIntersectionsLayers );

void position( );
void position();
void position( bool keep );
void position( bool keep, bool keep );
void position( bool keep );
Expand Down
2 changes: 1 addition & 1 deletion tests/code_layout/sipifyheader.h
Expand Up @@ -333,7 +333,7 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, 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<QgsVectorLayer *> &avoidIntersectionsLayers,
const QHash<QgsVectorLayer *, QSet<QgsFeatureId> > &ignoreFeatures SIP_PYARGREMOVE = ( QHash<QgsVectorLayer *, QSet<QgsFeatureId> >() ) );
Expand Down

0 comments on commit c29fc35

Please sign in to comment.