Skip to content

Commit e8cf8c2

Browse files
committedMay 15, 2018
[sipify] insert missing QMetaObject for gadget classes
1 parent ff35e69 commit e8cf8c2

17 files changed

+58
-2
lines changed
 

‎python/core/auto_generated/geometry/qgsabstractgeometry.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ class QgsAbstractGeometry
2525
%TypeHeaderCode
2626
#include "qgsabstractgeometry.h"
2727
%End
28+
public:
29+
static const QMetaObject staticMetaObject;
30+
2831
%ConvertToSubClassCode
2932
if ( qgsgeometry_cast<QgsPoint *>( sipCpp ) != nullptr )
3033
sipType = sipType_QgsPoint;

‎python/core/auto_generated/geometry/qgsgeometry.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ can be accessed via the geometry() method or set using the setGeometry() method.
4343
%TypeHeaderCode
4444
#include "qgsgeometry.h"
4545
%End
46+
public:
47+
static const QMetaObject staticMetaObject;
48+
4649
public:
4750

4851
enum OperationResult

‎python/core/auto_generated/geometry/qgspoint.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ class QgsPoint: QgsAbstractGeometry
2121
%TypeHeaderCode
2222
#include "qgspoint.h"
2323
%End
24+
public:
25+
static const QMetaObject staticMetaObject;
26+
2427
public:
2528

2629
QgsPoint( double x = 0.0, double y = 0.0, SIP_PYOBJECT z = Py_None, SIP_PYOBJECT m = Py_None, QgsWkbTypes::Type wkbType = QgsWkbTypes::Unknown ) [( double x = 0.0, double y = 0.0, double z = 0.0, double m = 0.0, QgsWkbTypes::Type wkbType = QgsWkbTypes::Unknown )];

‎python/core/auto_generated/qgscoordinatereferencesystem.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ both flavors.
156156
%TypeHeaderCode
157157
#include "qgscoordinatereferencesystem.h"
158158
%End
159+
public:
160+
static const QMetaObject staticMetaObject;
161+
159162
public:
160163

161164
enum CrsType

‎python/core/auto_generated/qgsdatasourceuri.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ class QgsDataSourceUri
1616
%TypeHeaderCode
1717
#include "qgsdatasourceuri.h"
1818
%End
19+
public:
20+
static const QMetaObject staticMetaObject;
21+
1922
public:
2023
enum SslMode
2124
{

‎python/core/auto_generated/qgsdefaultvalue.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ not set, the default value will only be used when a feature is created.
3636
%TypeHeaderCode
3737
#include "qgsdefaultvalue.h"
3838
%End
39+
public:
40+
static const QMetaObject staticMetaObject;
41+
3942
public:
4043

4144
explicit QgsDefaultValue( const QString &expression = QString(), bool applyOnUpdate = false );

‎python/core/auto_generated/qgsfeature.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ geometry and a list of field/values attributes.
3333
#define sipType_QVariant ((sipWrapperType *) sipTypeAsPyTypeObject (sipType_QVariant))
3434
#endif
3535
%End
36+
public:
37+
static const QMetaObject staticMetaObject;
38+
3639
public:
3740

3841
SIP_PYOBJECT __iter__();

‎python/core/auto_generated/qgsfield.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ length, and if applicable, precision.
2727
%TypeHeaderCode
2828
#include "qgsfield.h"
2929
%End
30+
public:
31+
static const QMetaObject staticMetaObject;
32+
3033
public:
3134

3235
QgsField( const QString &name = QString(),

‎python/core/auto_generated/qgsfieldconstraints.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ Stores information about constraints which may be present on a field.
2121
%TypeHeaderCode
2222
#include "qgsfieldconstraints.h"
2323
%End
24+
public:
25+
static const QMetaObject staticMetaObject;
26+
2427
public:
2528

2629
enum Constraint

‎python/core/auto_generated/qgspointxy.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ supports Z and M values.
2727
%TypeHeaderCode
2828
#include "qgspointxy.h"
2929
%End
30+
public:
31+
static const QMetaObject staticMetaObject;
32+
3033
public:
3134
QgsPointXY();
3235

‎python/core/auto_generated/qgsrelation.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ class QgsRelation
1717
%TypeHeaderCode
1818
#include "qgsrelation.h"
1919
%End
20+
public:
21+
static const QMetaObject staticMetaObject;
22+
2023
public:
2124

2225
enum RelationStrength

‎python/core/auto_generated/qgssnappingconfig.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ This is a container for configuration of the snapping of the project
2121
%TypeHeaderCode
2222
#include "qgssnappingconfig.h"
2323
%End
24+
public:
25+
static const QMetaObject staticMetaObject;
26+
2427
public:
2528

2629
enum SnappingMode

‎python/core/auto_generated/qgstolerance.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ This is the class is providing tolerance value in map unit values.
1919
%TypeHeaderCode
2020
#include "qgstolerance.h"
2121
%End
22+
public:
23+
static const QMetaObject staticMetaObject;
24+
2225
public:
2326

2427
enum UnitType

‎python/core/auto_generated/qgsunittypes.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ class QgsUnitTypes
2222
%TypeHeaderCode
2323
#include "qgsunittypes.h"
2424
%End
25+
public:
26+
static const QMetaObject staticMetaObject;
27+
2528
public:
2629
enum DistanceUnit
2730
{

‎python/core/auto_generated/qgsvectorsimplifymethod.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ This class contains information how to simplify geometries fetched from a vector
2020
%TypeHeaderCode
2121
#include "qgsvectorsimplifymethod.h"
2222
%End
23+
public:
24+
static const QMetaObject staticMetaObject;
25+
2326
public:
2427
QgsVectorSimplifyMethod();
2528
%Docstring

‎python/core/auto_generated/raster/qgsrasterprojector.sip.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ which are used to calculate affine transformation matrices.
2424
%TypeHeaderCode
2525
#include "qgsrasterprojector.h"
2626
%End
27+
public:
28+
static const QMetaObject staticMetaObject;
29+
2730
public:
2831

2932
enum Precision

‎scripts/sipify.pl

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,8 +599,16 @@ sub detect_non_method_member{
599599
if ( $LINE =~ m/^\s*friend class \w+/ ){
600600
next;
601601
}
602-
# Skip Q_OBJECT, Q_PROPERTY, Q_ENUM, Q_GADGET etc.
603-
if ($LINE =~ m/^\s*Q_(OBJECT|ENUMS|ENUM|FLAG|PROPERTY|GADGET|DECLARE_METATYPE|DECLARE_TYPEINFO|NOWARN_DEPRECATED_(PUSH|POP))\b.*?$/){
602+
603+
# insert metaoject for Q_GADGET
604+
if ($LINE =~ m/^\s*Q_GADGET\b.*?$/){
605+
write_output("HCE", " public:\n");
606+
write_output("HCE", " static const QMetaObject staticMetaObject;\n\n");
607+
next;
608+
}
609+
610+
# Skip Q_OBJECT, Q_PROPERTY, Q_ENUM etc.
611+
if ($LINE =~ m/^\s*Q_(OBJECT|ENUMS|ENUM|FLAG|PROPERTY|DECLARE_METATYPE|DECLARE_TYPEINFO|NOWARN_DEPRECATED_(PUSH|POP))\b.*?$/){
604612
next;
605613
}
606614

0 commit comments

Comments
 (0)
Please sign in to comment.