Crazy fix to avoid shared data getting corrupted in sip bindings

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...!
This commit is contained in:
Nyall Dawson 2017-01-23 11:27:35 +10:00
parent c3617dec22
commit fa26b45736
2 changed files with 4 additions and 0 deletions

View File

@ -76,6 +76,8 @@ class QgsProperty
};
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 );

View File

@ -191,6 +191,8 @@ class CORE_EXPORT QgsProperty
*/
QgsProperty();
virtual ~QgsProperty() = default;
/**
* Returns a new ExpressionBasedProperty created from the specified expression.
*/