Skip to content

Commit 289f137

Browse files
m-kuhnnyalldawson
authored andcommitted
Properly convert to QgsVectorLayerEditpassTrough subclass
1 parent 10860c3 commit 289f137

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

python/core/auto_generated/qgsvectorlayereditpassthrough.sip.in

+10
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,21 @@
88

99

1010

11+
%ModuleHeaderCode
12+
#include <qgsvectorlayereditpassthrough.h>
13+
%End
14+
1115
class QgsVectorLayerEditPassthrough : QgsVectorLayerEditBuffer
1216
{
1317

1418
%TypeHeaderCode
1519
#include "qgsvectorlayereditpassthrough.h"
20+
%End
21+
%ConvertToSubClassCode
22+
if ( qobject_cast<QgsVectorLayerEditPassthrough *>( sipCpp ) )
23+
sipType = sipType_QgsVectorLayerEditPassthrough;
24+
else
25+
sipType = nullptr;
1626
%End
1727
public:
1828
QgsVectorLayerEditPassthrough( QgsVectorLayer *layer );

src/core/qgsvectorlayereditpassthrough.h

+16
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,28 @@ class QgsVectorLayer;
2222
class QgsVectorLayerUndoPassthroughCommand;
2323
class QgsTransaction;
2424

25+
#ifdef SIP_RUN
26+
% ModuleHeaderCode
27+
#include <qgsvectorlayereditpassthrough.h>
28+
% End
29+
#endif
30+
2531
/**
2632
* \ingroup core
2733
* \class QgsVectorLayerEditPassthrough
2834
*/
2935
class CORE_EXPORT QgsVectorLayerEditPassthrough : public QgsVectorLayerEditBuffer
3036
{
37+
38+
#ifdef SIP_RUN
39+
SIP_CONVERT_TO_SUBCLASS_CODE
40+
if ( qobject_cast<QgsVectorLayerEditPassthrough *>( sipCpp ) )
41+
sipType = sipType_QgsVectorLayerEditPassthrough;
42+
else
43+
sipType = nullptr;
44+
SIP_END
45+
#endif
46+
3147
Q_OBJECT
3248
public:
3349
QgsVectorLayerEditPassthrough( QgsVectorLayer *layer );

0 commit comments

Comments
 (0)