Fix sipify.pl script not handling Q_INVOKABLE inline

This commit is contained in:
Mathieu Pellerin 2024-04-16 17:29:57 +07:00
parent 70ceb9d317
commit 6709debbac
3 changed files with 7 additions and 7 deletions

View File

@ -1049,7 +1049,7 @@ Queries the layer for features specified in request.
Queries the layer for features matching a given expression.
%End
inline QgsFeature getFeature( QgsFeatureId fid ) const;
QgsFeature getFeature( QgsFeatureId fid ) const;
%Docstring
Queries the layer for the feature with the given id.
If there is no such feature, the returned feature will be invalid.
@ -1711,7 +1711,7 @@ This also includes fields which have not yet been saved to the provider.
:return: A list of fields
%End
inline QgsAttributeList attributeList() const;
QgsAttributeList attributeList() const;
%Docstring
Returns list of attribute indexes. i.e. a list from 0 ... :py:func:`~QgsVectorLayer.fieldCount`
%End

View File

@ -1049,7 +1049,7 @@ Queries the layer for features specified in request.
Queries the layer for features matching a given expression.
%End
inline QgsFeature getFeature( QgsFeatureId fid ) const;
QgsFeature getFeature( QgsFeatureId fid ) const;
%Docstring
Queries the layer for the feature with the given id.
If there is no such feature, the returned feature will be invalid.
@ -1711,7 +1711,7 @@ This also includes fields which have not yet been saved to the provider.
:return: A list of fields
%End
inline QgsAttributeList attributeList() const;
QgsAttributeList attributeList() const;
%Docstring
Returns list of attribute indexes. i.e. a list from 0 ... :py:func:`~QgsVectorLayer.fieldCount`
%End

View File

@ -1755,6 +1755,9 @@ while ($LINE_IDX < $LINE_COUNT){
$IS_OVERRIDE_OR_MAKE_PRIVATE = PREPEND_CODE_VIRTUAL if ( $LINE =~ m/\bFINAL\b/);
$IS_OVERRIDE_OR_MAKE_PRIVATE = PREPEND_CODE_MAKE_PRIVATE if ( $LINE =~ m/\bSIP_MAKE_PRIVATE\b/);
# remove Q_INVOKABLE
$LINE =~ s/^(\s*)Q_INVOKABLE /$1/;
# keyword fixes
do {no warnings 'uninitialized';
$LINE =~ s/^(\s*template\s*<)(?:class|typename) (\w+>)(.*)$/$1$2$3/;
@ -1861,9 +1864,6 @@ while ($LINE_IDX < $LINE_COUNT){
}
}
# remove Q_INVOKABLE
$LINE =~ s/^(\s*)Q_INVOKABLE /$1/;
do {no warnings 'uninitialized';
# remove keywords
if ( $IS_OVERRIDE_OR_MAKE_PRIVATE != PREPEND_CODE_NO ){