Skip to content

Commit

Permalink
Fix MappedType error
Browse files Browse the repository at this point in the history
  • Loading branch information
pblottiere authored and nyalldawson committed Jun 16, 2020
1 parent 29e9580 commit 718de7f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/CMakeLists.txt
Expand Up @@ -192,6 +192,11 @@ ENDIF((${SIP_VERSION_STR} VERSION_EQUAL 4.19.11) OR (${SIP_VERSION_STR} VERSION_
IF((${SIP_VERSION_STR} VERSION_EQUAL 4.18) OR (${SIP_VERSION_STR} VERSION_GREATER 4.18))
SET(SIP_EXTRA_OPTIONS ${SIP_EXTRA_OPTIONS} -y ${QGIS_PYTHON_OUTPUT_DIRECTORY}/_core.pyi)
ENDIF((${SIP_VERSION_STR} VERSION_EQUAL 4.18) OR (${SIP_VERSION_STR} VERSION_GREATER 4.18))

IF((${PYQT5_VERSION_STR} VERSION_EQUAL 5.15) OR (${PYQT5_VERSION_STR} VERSION_GREATER 5.15))
SET(SIP_DISABLE_FEATURES ${SIP_DISABLE_FEATURES} VECTOR_MAPPED_TYPE)
ENDIF((${PYQT5_VERSION_STR} VERSION_EQUAL 5.15) OR (${PYQT5_VERSION_STR} VERSION_GREATER 5.15))

GENERATE_SIP_PYTHON_MODULE_CODE(qgis._core core/core.sip "${sip_files_core}" cpp_files)
BUILD_SIP_PYTHON_MODULE(qgis._core core/core.sip ${cpp_files} "" qgis_core)
SET(SIP_CORE_CPP_FILES ${cpp_files})
Expand Down
2 changes: 2 additions & 0 deletions python/core/conversions.sip
Expand Up @@ -1435,6 +1435,7 @@ template <TYPE>
%End
};

%If (VECTOR_MAPPED_TYPE)
template <TYPE>
%MappedType QVector< TYPE* >
{
Expand Down Expand Up @@ -1507,6 +1508,7 @@ template <TYPE>
return sipGetState(sipTransferObj);
%End
};
%End

%MappedType QMap<qint64, QgsFeature*>
{
Expand Down
1 change: 1 addition & 0 deletions python/core/core.sip.in
Expand Up @@ -99,6 +99,7 @@ done:
%Import QtWidgets/QtWidgetsmod.sip

%Feature ANDROID
%Feature VECTOR_MAPPED_TYPE

%Include conversions.sip
%Include qgsexception.sip
Expand Down

0 comments on commit 718de7f

Please sign in to comment.