Skip to content

Commit 2abcfa2

Browse files
committedMay 16, 2018
do not add static QMetaObject to QgsDefaultValue
it has no Q_ENUM so no need for now I do not understand while it doesn't compile though
1 parent 95ecea8 commit 2abcfa2

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed
 

‎python/core/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,3 @@
4848
QgsProject.blockDirtying = ProjectDirtyBlocker
4949
QgsReadWriteContext.enterCategory = ReadWriteContextEnterCategory
5050
QgsTask.fromFunction = fromFunction
51-
QgsTolerance.UnitType.parentClass = QgsTolerance

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ 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-
4239
public:
4340

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

‎scripts/sipify.pl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,8 +602,10 @@ sub detect_non_method_member{
602602

603603
# insert metaoject for Q_GADGET
604604
if ($LINE =~ m/^\s*Q_GADGET\b.*?$/){
605-
write_output("HCE", " public:\n");
606-
write_output("HCE", " static const QMetaObject staticMetaObject;\n\n");
605+
if ($LINE !~ m/SIP_SKIP/){
606+
write_output("HCE", " public:\n");
607+
write_output("HCE", " static const QMetaObject staticMetaObject;\n\n");
608+
}
607609
next;
608610
}
609611

‎src/core/qgsdefaultvalue.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#define QGSDEFAULTVALUE_H
1818

1919
#include "qgis_core.h"
20+
#include "qgis_sip.h"
2021

2122
#include <QString>
2223
#include <QObject>
@@ -46,7 +47,7 @@
4647
*/
4748
class CORE_EXPORT QgsDefaultValue
4849
{
49-
Q_GADGET
50+
Q_GADGET SIP_SKIP
5051

5152
Q_PROPERTY( QString expression READ expression WRITE setExpression )
5253
Q_PROPERTY( bool applyOnUpdate READ applyOnUpdate WRITE setApplyOnUpdate )

0 commit comments

Comments
 (0)
Please sign in to comment.