Skip to content
Permalink
Browse files
Handle c++11 '= default' in sipify
  • Loading branch information
nyalldawson committed Apr 2, 2017
1 parent aec3e15 commit bed74fc24ae57c7e058545f40009ce43ec5b89dc
Showing with 9 additions and 0 deletions.
  1. +1 −0 scripts/sipify.pl
  2. +5 −0 tests/scripts/sipifyheader.expected.sip
  3. +3 −0 tests/scripts/sipifyheader.h
@@ -232,6 +232,7 @@
$line =~ s/\s*override( SIP_\w+(\(.+\))?)?;/$1;/;
$line =~ s/^(\s*)?(const )?(virtual |static )?inline /$1$2$3/;
$line =~ s/\bnullptr\b/0/g;
$line =~ s/\s*=\s*default\b//g;

# remove constructor definition
if ( $line =~ m/^(\s*)?(explicit )?(\w+)\(([^()]*\([^()]*\)[^()]*)*\)(?!;)$/ ){
@@ -63,6 +63,11 @@ A constructor with definition in header
A classic constructor with arguments
%End

QgsSipifyHeader();
%Docstring
Default constructor
%End

void multilineMethod( const QgsPoint &startPoint,
QgsFeatureId featureId,
QgsVectorLayer *vl,
@@ -99,6 +99,9 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private QgsBaseCla
*/
QgsSipifyHeader( QWidget *parent SIP_TRANSFERTHIS = nullptr );

//! Default constructor
QgsSipifyHeader() = default;

//! A multiline method signature
void multilineMethod( const QgsPoint &startPoint,
QgsFeatureId featureId,

0 comments on commit bed74fc

Please sign in to comment.