File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,11 @@ class QgsAbstractProperty
15
15
%End
16
16
17
17
%ConvertToSubClassCode
18
- if (dynamic_cast<QgsStaticProperty*>(sipCpp) != NULL )
18
+ if ( sipCpp->propertyType() == QgsAbstractProperty::StaticProperty )
19
19
sipType = sipType_QgsStaticProperty;
20
- else if (dynamic_cast<QgsFieldBasedProperty*>(sipCpp) != NULL )
20
+ else if ( sipCpp->propertyType() == QgsAbstractProperty::FieldBasedProperty )
21
21
sipType = sipType_QgsFieldBasedProperty;
22
- else if (dynamic_cast<QgsExpressionBasedProperty*>(sipCpp) != NULL )
22
+ else if ( sipCpp->propertyType() == QgsAbstractProperty::ExpressionBasedProperty )
23
23
sipType = sipType_QgsExpressionBasedProperty;
24
24
else
25
25
sipType = sipType_QgsAbstractProperty;
Original file line number Diff line number Diff line change @@ -10,6 +10,16 @@ class QgsAbstractPropertyCollection
10
10
%TypeHeaderCode
11
11
#include <qgspropertycollection.h>
12
12
%End
13
+
14
+ %ConvertToSubClassCode
15
+ if ( dynamic_cast<QgsPropertyCollection*>(sipCpp) )
16
+ sipType = sipType_QgsPropertyCollection;
17
+ else if ( dynamic_cast<QgsPropertyCollectionStack*>(sipCpp) )
18
+ sipType = sipType_QgsPropertyCollectionStack;
19
+ else
20
+ sipType = sipType_QgsAbstractPropertyCollection;
21
+ %End
22
+
13
23
public:
14
24
15
25
QgsAbstractPropertyCollection( const QString& name = QString() );
You can’t perform that action at this time.
0 commit comments