Skip to content
Permalink
Browse files
[sipify] properly get out of private section
  • Loading branch information
3nids committed Apr 3, 2017
1 parent 26495db commit cca83b75990c0d7cf3fc1027f530243cf173222c
Showing with 17 additions and 4 deletions.
  1. +1 −1 scripts/sipify.pl
  2. +14 −1 tests/scripts/sipifyheader.h
  3. +2 −2 tests/scripts/test_sipify.sh
@@ -179,7 +179,7 @@ sub processDoxygenLine
}
if ( $PRIVATE_SECTION == 1 ){
if ( $SIP_RUN == 0){
if ( $line =~ m/^\s*(public|protected)( slots)?:.*$/ || $line =~ m/^\s*\};.*$/){
if ( $line =~ m/^\s*(public|protected)( slots)?:.*$/ || $line =~ m/^\};.*$/){
$PRIVATE_SECTION = 0;
}
else {
@@ -195,13 +195,26 @@ class CORE_EXPORT QgsSipifyHeader : public QtClass<QVariant>, private QgsBaseCla
#ifdef SIP_RUN
void privateMethodSIPRUNareShown();
#endif

public:
void FallBackToPublic();

private:
void PrivateAgain();

struct ProcessFeatureWrapper
{
QgsGeometrySnapper *instance = nullptr;
double snapTolerance;
SnapMode mode;
explicit ProcessFeatureWrapper( QgsGeometrySnapper *_instance, double snapTolerance, SnapMode mode )
: instance( _instance )
, snapTolerance( snapTolerance )
, mode( mode )
{}
void operator()( QgsFeature &feature ) { return instance->processFeature( feature, snapTolerance, mode ); }
};

enum PointFlag { SnappedToRefNode, SnappedToRefSegment, Unsnapped };
};

/**
@@ -4,9 +4,9 @@

DIR=$(git rev-parse --show-toplevel)

pushd ${DIR}
pushd ${DIR} > /dev/null
outdiff=$(./scripts/sipify.pl tests/scripts/sipifyheader.h | diff tests/scripts/sipifyheader.expected.sip -)
popd
popd > /dev/null

if [[ $outdiff ]]; then
echo " *** sipify.pl did not output expected file"

0 comments on commit cca83b7

Please sign in to comment.