[sipify] skip protected members

This commit is contained in:
Denis Rouzaud 2017-04-05 09:46:14 +02:00
parent 9a0595117b
commit d7014846f1
3 changed files with 9 additions and 0 deletions

View File

@ -276,6 +276,11 @@ while(!eof $header){
next;
}
# skip non-method member declaration (e.g. in protected sections)
if ( $SIP_RUN != 1 && $line =~ m/^\s*\w+(::\w+)? \*?\w+( = \w+(\([^()]+\))?)?;/){
next;
}
# catch Q_DECLARE_FLAGS
if ( $line =~ m/^(\s*)Q_DECLARE_FLAGS\(\s*(.*?)\s*,\s*(.*?)\s*\)\s*$/ ){
$line = "$1typedef QFlags<$classname::$3> $2;\n";

View File

@ -160,6 +160,7 @@ complex default value and type (i.e. containing commas) should be given as a str
protected:
bool thisShouldBeListed();
private:
void privateMethodSIPRUNareShown();
public:

View File

@ -193,6 +193,9 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private QgsBaseCla
protected:
bool thisShouldBeListed();
Whatever skipMember;
Whatever::Something *alsoSkipMember = nullptr;
private:
void privateMethodAreNotShown();
#ifdef SIP_RUN