Skip to content
Permalink
Browse files

initialize variables on declaration

instead of initializing them on every constructor.
it's mShowLinkButton and mShowUnlinkButton
  • Loading branch information
signedav committed Apr 3, 2018
1 parent e0a539a commit fe0834791344ba3005eff8b8c16303b9ac89ea0e
Showing with 2 additions and 10 deletions.
  1. +2 −10 src/core/qgsattributeeditorelement.h
@@ -322,8 +322,6 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement
Q_DECL_DEPRECATED QgsAttributeEditorRelation( const QString &name, const QString &relationId, QgsAttributeEditorElement *parent )
: QgsAttributeEditorElement( AeTypeRelation, name, parent )
, mRelationId( relationId )
, mShowLinkButton( true )
, mShowUnlinkButton( true )
{}

/**
@@ -333,8 +331,6 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement
: QgsAttributeEditorElement( AeTypeRelation, name, parent )
, mRelationId( relation.id() )
, mRelation( relation )
, mShowLinkButton( true )
, mShowUnlinkButton( true )
{}

/**
@@ -346,8 +342,6 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement
QgsAttributeEditorRelation( const QString &relationId, QgsAttributeEditorElement *parent )
: QgsAttributeEditorElement( AeTypeRelation, relationId, parent )
, mRelationId( relationId )
, mShowLinkButton( true )
, mShowUnlinkButton( true )
{}

/**
@@ -360,8 +354,6 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement
: QgsAttributeEditorElement( AeTypeRelation, relation.id(), parent )
, mRelationId( relation.id() )
, mRelation( relation )
, mShowLinkButton( true )
, mShowUnlinkButton( true )
{}


@@ -416,8 +408,8 @@ class CORE_EXPORT QgsAttributeEditorRelation : public QgsAttributeEditorElement
QString typeIdentifier() const override;
QString mRelationId;
QgsRelation mRelation;
bool mShowLinkButton;
bool mShowUnlinkButton;
bool mShowLinkButton = true;
bool mShowUnlinkButton = true;
};


0 comments on commit fe08347

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