Skip to content


Crazy fix to avoid shared data getting corrupted in sip bindings
Browse files Browse the repository at this point in the history
Without this (should be unnecessary) virtual destructor the
shared data member for QgsProperty gets filled with garbage if
a QgsProperty is created from python code.

I can't explain it...!
  • Loading branch information
nyalldawson committed Jan 23, 2017
1 parent c3617de commit fa26b45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/core/qgsproperty.sip
Expand Up @@ -76,6 +76,8 @@ class QgsProperty

virtual ~QgsProperty();

static QgsProperty fromExpression( const QString& expression, bool isActive = true );
static QgsProperty fromField( const QString& fieldName, bool isActive = true );
static QgsProperty fromValue( const QVariant& value, bool isActive = true );
Expand Down
2 changes: 2 additions & 0 deletions src/core/qgsproperty.h
Expand Up @@ -191,6 +191,8 @@ class CORE_EXPORT QgsProperty

virtual ~QgsProperty() = default;

* Returns a new ExpressionBasedProperty created from the specified expression.
Expand Down

0 comments on commit fa26b45

Please sign in to comment.