Skip to content
Permalink
Browse files
[sipify] fix struct member assignment
  • Loading branch information
3nids committed Apr 19, 2017
1 parent be9a51c commit e5ab2f6b5b12079225b25a5f3d71d1f5b3e14071
Showing with 18 additions and 4 deletions.
  1. +5 −0 scripts/sipify.pl
  2. +5 −2 tests/scripts/sipifyheader.expected.sip
  3. +8 −2 tests/scripts/sipifyheader.h
@@ -303,6 +303,11 @@ sub processDoxygenLine
next;
}

# remove struct member assignment
if ( $SIP_RUN != 1 && $ACCESS == PUBLIC && $line =~ m/^(\s*\w+[\w<> *&:,]* \*?\w+) = \w+(\([^()]+\))?;/ ){
$line = "$1;\n";
}

# catch Q_DECLARE_FLAGS
if ( $line =~ m/^(\s*)Q_DECLARE_FLAGS\(\s*(.*?)\s*,\s*(.*?)\s*\)\s*$/ ){
$line = "$1typedef QFlags<$classname::$3> $2;\n";
@@ -70,8 +70,11 @@ class QgsSipifyHeader : QtClass<QVariant>

struct Data
{
QString name;
int count;
Data( QgsMapLayer *layer, Qstring name );

QString mName;
int mCount;
QgsMapLayer *mLayer;
};

explicit QgsSipifyHeader();
@@ -112,8 +112,14 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
*/
struct Data
{
QString name;
int count;
Data( QgsMapLayer *layer, Qstring name )
: mLayer( layer )
, mName( name )
{}

QString mName;
int mCount = 100;
QgsMapLayer *mLayer = nullptr;
};

//! A constructor with definition in header

0 comments on commit e5ab2f6

Please sign in to comment.