[sipify] remove static const value assignment

This commit is contained in:
Denis Rouzaud 2017-05-02 20:34:25 +02:00
parent 1f3ff11b35
commit fbd62be7c5
3 changed files with 8 additions and 0 deletions

View File

@ -465,6 +465,10 @@ while ($line_idx < $line_count){
next;
}
# remove static const value assignment
# https://regex101.com/r/DyWkgn/1
$line =~ s/^(\s*static const \w+(<([\w()<>, ]|::)+>)? \w+) = .*;\s*(\/\/.*)?$/$1;/;
# remove struct member assignment
if ( $SIP_RUN != 1 && $ACCESS[$#ACCESS] == PUBLIC && $line =~ m/^(\s*\w+[\w<> *&:,]* \*?\w+) = \w+(\([^()]+\))?;/ ){
dbg_info("remove struct member assignment");

View File

@ -89,6 +89,8 @@ class QgsSipifyHeader : QtClass<QVariant>
QgsMapLayer *mLayer;
};
static const int MONTHS;
explicit QgsSipifyHeader();
%Docstring
A constructor with definition in header

View File

@ -134,6 +134,8 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas
QgsMapLayer *mLayer = nullptr;
};
static const int MONTHS = 60 * 60 * 24 * 30; // something
//! A constructor with definition in header
explicit QgsSipifyHeader()
: QtClass<QVariant>()