Skip to content

Commit

Permalink
do not add static QMetaObject to QgsDefaultValue
Browse files Browse the repository at this point in the history
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 2abcfa2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion python/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,3 @@
QgsProject.blockDirtying = ProjectDirtyBlocker
QgsReadWriteContext.enterCategory = ReadWriteContextEnterCategory
QgsTask.fromFunction = fromFunction
QgsTolerance.UnitType.parentClass = QgsTolerance
3 changes: 0 additions & 3 deletions python/core/auto_generated/qgsdefaultvalue.sip.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
Expand Down
6 changes: 4 additions & 2 deletions scripts/sipify.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
3 changes: 2 additions & 1 deletion src/core/qgsdefaultvalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#define QGSDEFAULTVALUE_H

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

#include <QString>
#include <QObject>
Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit 2abcfa2

Please sign in to comment.