Skip to content

Commit

Permalink
Properly convert to QgsVectorLayerEditpassTrough subclass
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and nyalldawson committed Apr 1, 2019
1 parent 356ec23 commit 1bb3f99
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/core/auto_generated/qgsvectorlayereditpassthrough.sip.in
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,11 +8,21 @@






%ModuleHeaderCode
#include <qgsvectorlayereditpassthrough.h>
%End

class QgsVectorLayerEditPassthrough : QgsVectorLayerEditBuffer class QgsVectorLayerEditPassthrough : QgsVectorLayerEditBuffer
{ {


%TypeHeaderCode %TypeHeaderCode
#include "qgsvectorlayereditpassthrough.h" #include "qgsvectorlayereditpassthrough.h"
%End
%ConvertToSubClassCode
if ( qobject_cast<QgsVectorLayerEditPassthrough *>( sipCpp ) )
sipType = sipType_QgsVectorLayerEditPassthrough;
else
sipType = nullptr;
%End %End
public: public:
QgsVectorLayerEditPassthrough( QgsVectorLayer *layer ); QgsVectorLayerEditPassthrough( QgsVectorLayer *layer );
Expand Down
16 changes: 16 additions & 0 deletions src/core/qgsvectorlayereditpassthrough.h
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -22,12 +22,28 @@ class QgsVectorLayer;
class QgsVectorLayerUndoPassthroughCommand; class QgsVectorLayerUndoPassthroughCommand;
class QgsTransaction; class QgsTransaction;


#ifdef SIP_RUN
% ModuleHeaderCode
#include <qgsvectorlayereditpassthrough.h>
% End
#endif

/** /**
* \ingroup core * \ingroup core
* \class QgsVectorLayerEditPassthrough * \class QgsVectorLayerEditPassthrough
*/ */
class CORE_EXPORT QgsVectorLayerEditPassthrough : public QgsVectorLayerEditBuffer class CORE_EXPORT QgsVectorLayerEditPassthrough : public QgsVectorLayerEditBuffer
{ {

#ifdef SIP_RUN
SIP_CONVERT_TO_SUBCLASS_CODE
if ( qobject_cast<QgsVectorLayerEditPassthrough *>( sipCpp ) )
sipType = sipType_QgsVectorLayerEditPassthrough;
else
sipType = nullptr;
SIP_END
#endif

Q_OBJECT Q_OBJECT
public: public:
QgsVectorLayerEditPassthrough( QgsVectorLayer *layer ); QgsVectorLayerEditPassthrough( QgsVectorLayer *layer );
Expand Down

0 comments on commit 1bb3f99

Please sign in to comment.