mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[sipify] use single regex for all double annotation cases
followup ac54a3f83fa95e965f415ec6884d195629e87273
This commit is contained in:
parent
f7f32e64b5
commit
eda17309d7
@ -574,14 +574,10 @@ while ($line_idx < $line_count){
|
||||
$line =~ s/SIP_PYNAME\(\s*(\w+)\s*\)/\/PyName=$1\//;
|
||||
|
||||
# combine multiple annotations
|
||||
# https://regex101.com/r/uvCt4M/1
|
||||
do {no warnings 'uninitialized';
|
||||
$line =~ s/\/(\w+(=\w+)?)\/\s*\/(\w+(=\w+)?)\/\s*;(\s*(\/\/.*)?)$/\/$1,$3\/$5;/;
|
||||
(! $3) or dbg_info("combine multiple annotations -- works only for 2");
|
||||
};
|
||||
# combine multiple argument annotations
|
||||
# https://regex101.com/r/uvCt4M/3
|
||||
do {no warnings 'uninitialized';
|
||||
$line =~ s/\/(\w+(=\w+)?)\/\s*\/(\w+(=\w+)?)\//\/$1,$3\//;
|
||||
(! $3) or dbg_info("combine multiple annotations -- works only for 2");
|
||||
};
|
||||
|
||||
# unprinted annotations
|
||||
|
@ -208,8 +208,6 @@ complex default value and type (i.e. containing commas) should be given as a str
|
||||
|
||||
void removeProxyFactory( QNetworkProxyFactory *factory /TransferBack/ );
|
||||
|
||||
void multiAnnotationArg( SomeClass **object /Out,TransferBack/, int &another /Out/ );
|
||||
|
||||
bool removeFunctionBody( const QList<int, QString> &list, QgsVectorLayer *vl, Some::Thing _part = -1 /*default =-1*/ );
|
||||
%Docstring
|
||||
:rtype: bool
|
||||
@ -303,6 +301,7 @@ Mulitline body
|
||||
}
|
||||
|
||||
void combinedAnnotations() /Factory,PyName=otherName/;
|
||||
void multiAnnotationArg( SomeClass **object /Out,TransferBack/, int &another /Out/ );
|
||||
|
||||
void simple( );
|
||||
%Docstring
|
||||
|
@ -240,8 +240,6 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
|
||||
|
||||
void removeProxyFactory( QNetworkProxyFactory *factory SIP_TRANSFERBACK );
|
||||
|
||||
void multiAnnotationArg( SomeClass **object SIP_OUT SIP_TRANSFERBACK, int &another SIP_OUT );
|
||||
|
||||
bool removeFunctionBody( const QList<int, QString> &list, QgsVectorLayer *vl, Some::Thing _part = -1 /*default =-1*/ ) { doSomething; return true; } // some comments
|
||||
|
||||
static inline QgsMapLayer *skippedMethodWithBody() SIP_SKIP
|
||||
@ -331,6 +329,7 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
|
||||
}
|
||||
|
||||
void combinedAnnotations() SIP_FACTORY SIP_PYNAME( otherName );
|
||||
void multiAnnotationArg( SomeClass **object SIP_OUT SIP_TRANSFERBACK, int &another SIP_OUT );
|
||||
|
||||
//! remove argument
|
||||
void simple( bool test SIP_PYARGREMOVE );
|
||||
|
Loading…
x
Reference in New Issue
Block a user