Remove SIP convert to subclass code for QgsRubberBand and QgsVertexMarker

These conversions just crash sip (woo. sip. yay. good times.). I can't find
any alternative approach which avoids this crash, so just remove the cast
to avoid the crash.

Fixes #32700
This commit is contained in:
Nyall Dawson 2019-11-08 13:27:09 +10:00
parent cc80bb4af6
commit 4b014e6e84
4 changed files with 0 additions and 52 deletions

View File

@ -10,11 +10,6 @@
%ModuleHeaderCode
// For ConvertToSubClassCode.
#include <qgsrubberband.h>
%End
class QgsRubberBand : QObject, QgsMapCanvasItem
{
%Docstring
@ -26,12 +21,6 @@ for tracking the mouse while drawing polylines or polygons.
%TypeHeaderCode
#include "qgsrubberband.h"
%End
%ConvertToSubClassCode
if ( dynamic_cast<QgsRubberBand *>( sipCpp ) )
sipType = sipType_QgsRubberBand;
else
sipType = nullptr;
%End
public:

View File

@ -9,11 +9,6 @@
%ModuleHeaderCode
// For ConvertToSubClassCode.
#include <qgsvertexmarker.h>
%End
class QgsVertexMarker : QgsMapCanvasItem
{
%Docstring
@ -22,12 +17,6 @@ A class for marking vertices of features using e.g. circles or 'x'.
%TypeHeaderCode
#include "qgsvertexmarker.h"
%End
%ConvertToSubClassCode
if ( dynamic_cast<QgsVertexMarker *>( sipCpp ) )
sipType = sipType_QgsVertexMarker;
else
sipType = nullptr;
%End
public:

View File

@ -31,13 +31,6 @@
class QgsVectorLayer;
class QPaintEvent;
#ifdef SIP_RUN
% ModuleHeaderCode
// For ConvertToSubClassCode.
#include <qgsrubberband.h>
% End
#endif
/**
* \ingroup gui
* A class for drawing transient features (e.g. digitizing lines) on the map.
@ -49,14 +42,6 @@ class GUI_EXPORT QgsRubberBand : public QObject, public QgsMapCanvasItem
{
Q_OBJECT
#ifdef SIP_RUN
SIP_CONVERT_TO_SUBCLASS_CODE
if ( dynamic_cast<QgsRubberBand *>( sipCpp ) )
sipType = sipType_QgsRubberBand;
else
sipType = nullptr;
SIP_END
#endif
public:
Q_PROPERTY( QColor fillColor READ fillColor WRITE setFillColor )

View File

@ -22,13 +22,6 @@
class QPainter;
#ifdef SIP_RUN
% ModuleHeaderCode
// For ConvertToSubClassCode.
#include <qgsvertexmarker.h>
% End
#endif
/**
* \ingroup gui
* A class for marking vertices of features using e.g. circles or 'x'.
@ -36,14 +29,6 @@ class QPainter;
class GUI_EXPORT QgsVertexMarker : public QgsMapCanvasItem
{
#ifdef SIP_RUN
SIP_CONVERT_TO_SUBCLASS_CODE
if ( dynamic_cast<QgsVertexMarker *>( sipCpp ) )
sipType = sipType_QgsVertexMarker;
else
sipType = nullptr;
SIP_END
#endif
public:
//! Icons