mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
Fix sip subclassing for properties
This commit is contained in:
parent
53ba1a1f10
commit
ef3f61fc17
@ -15,11 +15,11 @@ class QgsAbstractProperty
|
|||||||
%End
|
%End
|
||||||
|
|
||||||
%ConvertToSubClassCode
|
%ConvertToSubClassCode
|
||||||
if (dynamic_cast<QgsStaticProperty*>(sipCpp) != NULL)
|
if ( sipCpp->propertyType() == QgsAbstractProperty::StaticProperty )
|
||||||
sipType = sipType_QgsStaticProperty;
|
sipType = sipType_QgsStaticProperty;
|
||||||
else if (dynamic_cast<QgsFieldBasedProperty*>(sipCpp) != NULL)
|
else if ( sipCpp->propertyType() == QgsAbstractProperty::FieldBasedProperty )
|
||||||
sipType = sipType_QgsFieldBasedProperty;
|
sipType = sipType_QgsFieldBasedProperty;
|
||||||
else if (dynamic_cast<QgsExpressionBasedProperty*>(sipCpp) != NULL)
|
else if ( sipCpp->propertyType() == QgsAbstractProperty::ExpressionBasedProperty )
|
||||||
sipType = sipType_QgsExpressionBasedProperty;
|
sipType = sipType_QgsExpressionBasedProperty;
|
||||||
else
|
else
|
||||||
sipType = sipType_QgsAbstractProperty;
|
sipType = sipType_QgsAbstractProperty;
|
||||||
|
@ -10,6 +10,16 @@ class QgsAbstractPropertyCollection
|
|||||||
%TypeHeaderCode
|
%TypeHeaderCode
|
||||||
#include <qgspropertycollection.h>
|
#include <qgspropertycollection.h>
|
||||||
%End
|
%End
|
||||||
|
|
||||||
|
%ConvertToSubClassCode
|
||||||
|
if ( dynamic_cast<QgsPropertyCollection*>(sipCpp) )
|
||||||
|
sipType = sipType_QgsPropertyCollection;
|
||||||
|
else if ( dynamic_cast<QgsPropertyCollectionStack*>(sipCpp) )
|
||||||
|
sipType = sipType_QgsPropertyCollectionStack;
|
||||||
|
else
|
||||||
|
sipType = sipType_QgsAbstractPropertyCollection;
|
||||||
|
%End
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
QgsAbstractPropertyCollection( const QString& name = QString() );
|
QgsAbstractPropertyCollection( const QString& name = QString() );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user