Skip to content
Permalink
Browse files

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
  • Loading branch information
3nids committed May 16, 2018
1 parent 95ecea8 commit 2abcfa23b8b0948bacd9ba427bb8df76aad1d7f6
@@ -48,4 +48,3 @@
QgsProject.blockDirtying = ProjectDirtyBlocker
QgsReadWriteContext.enterCategory = ReadWriteContextEnterCategory
QgsTask.fromFunction = fromFunction
QgsTolerance.UnitType.parentClass = QgsTolerance
@@ -36,9 +36,6 @@ not set, the default value will only be used when a feature is created.
%TypeHeaderCode
#include "qgsdefaultvalue.h"
%End
public:
static const QMetaObject staticMetaObject;

public:

explicit QgsDefaultValue( const QString &expression = QString(), bool applyOnUpdate = false );
@@ -602,8 +602,10 @@ sub detect_non_method_member{

# insert metaoject for Q_GADGET
if ($LINE =~ m/^\s*Q_GADGET\b.*?$/){
write_output("HCE", " public:\n");
write_output("HCE", " static const QMetaObject staticMetaObject;\n\n");
if ($LINE !~ m/SIP_SKIP/){
write_output("HCE", " public:\n");
write_output("HCE", " static const QMetaObject staticMetaObject;\n\n");
}
next;
}

@@ -17,6 +17,7 @@
#define QGSDEFAULTVALUE_H

#include "qgis_core.h"
#include "qgis_sip.h"

#include <QString>
#include <QObject>
@@ -46,7 +47,7 @@
*/
class CORE_EXPORT QgsDefaultValue
{
Q_GADGET
Q_GADGET SIP_SKIP

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

0 comments on commit 2abcfa2

Please sign in to comment.
You can’t perform that action at this time.