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
This commit is contained in:
Denis Rouzaud 2018-05-16 14:25:01 -04:00
parent 95ecea897a
commit 2abcfa23b8
4 changed files with 6 additions and 7 deletions

View File

@ -48,4 +48,3 @@ QgsProcessingOutputLayerDefinition.__repr__ = processing_output_layer_repr
QgsProject.blockDirtying = ProjectDirtyBlocker
QgsReadWriteContext.enterCategory = ReadWriteContextEnterCategory
QgsTask.fromFunction = fromFunction
QgsTolerance.UnitType.parentClass = QgsTolerance

View File

@ -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 );

View File

@ -602,8 +602,10 @@ while ($LINE_IDX < $LINE_COUNT){
# 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;
}

View File

@ -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 )