Skip to content
Permalink
Browse files

[sipify] fix initializer in strcuts

  • Loading branch information
3nids committed Nov 28, 2018
1 parent 5f6dff0 commit 7bce9342e52c01b0e112fa18fd191b48958108a9
Showing with 4 additions and 1 deletion.
  1. +2 −1 scripts/sipify.pl
  2. +1 −0 tests/code_layout/sipifyheader.expected.sip
  3. +1 −0 tests/code_layout/sipifyheader.h
@@ -1006,7 +1006,8 @@ sub detect_non_method_member{
};

# remove struct member assignment
if ( $SIP_RUN != 1 && $ACCESS[$#ACCESS] == PUBLIC && $LINE =~ m/^(\s*\w+[\w<> *&:,]* \*?\w+) = [\-\w\:\.]+(\([^()]*\))?\s*;/ ){
# https://regex101.com/r/tWRGkY/2
if ( $SIP_RUN != 1 && $ACCESS[$#ACCESS] == PUBLIC && $LINE =~ m/^(\s*\w+[\w<> *&:,]* \*?\w+) = [\-\w\:\.]+(<\w+( \*)?>)?(\([^()]*\))?\s*;/ ){
dbg_info("remove struct member assignment");
$LINE = "$1;";
}
@@ -93,6 +93,7 @@ typedef QtClass<QVariant> QtClassQVariantBase;
QString mName;
int mCount;
QgsMapLayer *mLayer;
QList<QAction *> contextMenuActions;
};

static const int MONTHS;
@@ -134,6 +134,7 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
QString mName;
int mCount = 100;
QgsMapLayer *mLayer = nullptr;
QList<QAction *> contextMenuActions = QList<QAction *>();
};

static const int MONTHS = 60 * 60 * 24 * 30; // something

0 comments on commit 7bce934

Please sign in to comment.
You can’t perform that action at this time.