Skip to content

Commit accdc23

Browse files
committed
Fix sip subclassing of metadata subclasses
1 parent 016f228 commit accdc23

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

python/core/metadata/qgsabstractmetadatabase.sip.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ using QgsNativeMetadataValidator.
4343
%ConvertToSubClassCode
4444
if ( dynamic_cast< QgsLayerMetadata * >( sipCpp ) != NULL )
4545
sipType = sipType_QgsLayerMetadata;
46-
else if ( dynamic_cast< QgsLayerMetadata * >( sipCpp ) != NULL )
46+
else if ( dynamic_cast< QgsProjectMetadata * >( sipCpp ) != NULL )
4747
sipType = sipType_QgsProjectMetadata;
4848
else
4949
sipType = NULL;

src/core/metadata/qgsabstractmetadatabase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class CORE_EXPORT QgsAbstractMetadataBase
5757
SIP_CONVERT_TO_SUBCLASS_CODE
5858
if ( dynamic_cast< QgsLayerMetadata * >( sipCpp ) != NULL )
5959
sipType = sipType_QgsLayerMetadata;
60-
else if ( dynamic_cast< QgsLayerMetadata * >( sipCpp ) != NULL )
60+
else if ( dynamic_cast< QgsProjectMetadata * >( sipCpp ) != NULL )
6161
sipType = sipType_QgsProjectMetadata;
6262
else
6363
sipType = NULL;

0 commit comments

Comments
 (0)