Skip to content

Commit

Permalink
[sipify] skip non-public template based member declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Apr 8, 2017
1 parent d820702 commit 14e949b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
3 changes: 0 additions & 3 deletions python/core/qgscolorramp.sip
Expand Up @@ -440,7 +440,6 @@ class QgsLimitedRandomColorRamp : QgsColorRamp
%End

protected:
QList<QColor> mColors;
};

class QgsRandomColorRamp: QgsColorRamp
Expand Down Expand Up @@ -498,7 +497,6 @@ class QgsRandomColorRamp: QgsColorRamp

protected:

QList<QColor> mPrecalculatedColors;

};

Expand Down Expand Up @@ -710,7 +708,6 @@ class QgsColorBrewerColorRamp : QgsColorRamp
Generates the scheme using the current name and number of colors
%End

QList<QColor> mPalette;
};


Expand Down
4 changes: 2 additions & 2 deletions scripts/sipify.pl
Expand Up @@ -295,8 +295,8 @@ sub processDoxygenLine
next;
}

# skip non-method member declaration (in non-public sections)
if ( $SIP_RUN != 1 && $ACCESS != PUBLIC && $line =~ m/^\s*\w+(::\w+)? \*?\w+( = \w+(\([^()]+\))?)?;/){
# skip non-method member declaration in non-public sections
if ( $SIP_RUN != 1 && $ACCESS != PUBLIC && $line =~ m/^\s*[\w<>]+(::\w+)? \*?\w+( = \w+(\([^()]+\))?)?;/){
next;
}

Expand Down
2 changes: 2 additions & 0 deletions tests/scripts/sipifyheader.expected.sip
Expand Up @@ -225,6 +225,8 @@ Removing function body with namespaced return value
:rtype: set of QgsActionScope
%End

This<Member> shouldBeIncluded;

protected:
bool thisShouldBeListed();
%Docstring
Expand Down
3 changes: 3 additions & 0 deletions tests/scripts/sipifyheader.h
Expand Up @@ -221,11 +221,14 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private Ui::QgsBas

QSet<QgsActionScope> returnTypeSet();

This<Member> shouldBeIncluded;

protected:
bool thisShouldBeListed();

Whatever skipMember;
Whatever::Something *alsoSkipMember = nullptr;
Some<Other> memberToSkip;

private:
void privateMethodAreNotShown();
Expand Down

0 comments on commit 14e949b

Please sign in to comment.