mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[sipify] Fix stripping function body with virtual const reference returns
This commit is contained in:
parent
5fb63c066f
commit
669fa87eb4
@ -347,7 +347,7 @@ while(!eof $header){
|
||||
}
|
||||
|
||||
# remove function bodies
|
||||
if ( $line =~ m/^(\s*)?(const )?(virtual |static )?(([\w:]+(<.*?>)?\s+(\*|&)?)?(\w+|operator.{1,2})\(.*?(\(.*\))*.*\)( (?:const|SIP_[A-Z_]*?))*)\s*(\{.*\})?(?!;)(\s*\/\/.*)?$/ ){
|
||||
if ( $line =~ m/^(\s*)?(virtual )?(static |const )*(([\w:]+(<.*?>)?\s+(\*|&)?)?(\w+|operator.{1,2})\(.*?(\(.*\))*.*\)( (?:const|SIP_[A-Z_]*?))*)\s*(\{.*\})?(?!;)(\s*\/\/.*)?$/ ){
|
||||
my $newline = "$1$2$3$4;\n";
|
||||
if ($line !~ m/\{.*?\}$/){
|
||||
$line = readline $header;
|
||||
|
@ -190,6 +190,12 @@ Removing function body with namespaced return value
|
||||
:rtype: QgsRaster.RasterBuildPyramids
|
||||
%End
|
||||
|
||||
virtual const QgsLayerMetadata &metadata() const;
|
||||
%Docstring
|
||||
Removing function body with virtual const reference
|
||||
:rtype: QgsLayerMetadata
|
||||
%End
|
||||
|
||||
|
||||
virtual int overriddenProperty();
|
||||
%Docstring
|
||||
|
@ -205,6 +205,9 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
|
||||
//! Removing function body with namespaced return value
|
||||
QgsRaster::RasterBuildPyramids buildPyramidsFlag() const { return mBuildPyramidsFlag; }
|
||||
|
||||
//! Removing function body with virtual const reference
|
||||
virtual const QgsLayerMetadata &metadata() const { return mMetadata; }
|
||||
|
||||
bool deletedFunction() = delete; // some comments
|
||||
|
||||
virtual int overriddenProperty() override { return 42; } // if in doubt, comment it out
|
||||
|
Loading…
x
Reference in New Issue
Block a user