diff --git a/python/core/auto_generated/qgsvectorlayereditpassthrough.sip.in b/python/core/auto_generated/qgsvectorlayereditpassthrough.sip.in index afbfab78a647..c3d736b28845 100644 --- a/python/core/auto_generated/qgsvectorlayereditpassthrough.sip.in +++ b/python/core/auto_generated/qgsvectorlayereditpassthrough.sip.in @@ -8,11 +8,21 @@ +%ModuleHeaderCode +#include +%End + class QgsVectorLayerEditPassthrough : QgsVectorLayerEditBuffer { %TypeHeaderCode #include "qgsvectorlayereditpassthrough.h" +%End +%ConvertToSubClassCode + if ( qobject_cast( sipCpp ) ) + sipType = sipType_QgsVectorLayerEditPassthrough; + else + sipType = nullptr; %End public: QgsVectorLayerEditPassthrough( QgsVectorLayer *layer ); diff --git a/src/core/qgsvectorlayereditpassthrough.h b/src/core/qgsvectorlayereditpassthrough.h index c744f615a82c..e8992f0ab3e2 100644 --- a/src/core/qgsvectorlayereditpassthrough.h +++ b/src/core/qgsvectorlayereditpassthrough.h @@ -22,12 +22,28 @@ class QgsVectorLayer; class QgsVectorLayerUndoPassthroughCommand; class QgsTransaction; +#ifdef SIP_RUN +% ModuleHeaderCode +#include +% End +#endif + /** * \ingroup core * \class QgsVectorLayerEditPassthrough */ class CORE_EXPORT QgsVectorLayerEditPassthrough : public QgsVectorLayerEditBuffer { + +#ifdef SIP_RUN + SIP_CONVERT_TO_SUBCLASS_CODE + if ( qobject_cast( sipCpp ) ) + sipType = sipType_QgsVectorLayerEditPassthrough; + else + sipType = nullptr; + SIP_END +#endif + Q_OBJECT public: QgsVectorLayerEditPassthrough( QgsVectorLayer *layer );