Skip to content

Commit

Permalink
Do not define in child class a member variable existing in parent class
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault authored and nyalldawson committed Mar 6, 2021
1 parent ae01f67 commit 351b73a
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/gui/qgsmaptoolidentifyfeature.cpp
Expand Up @@ -20,7 +20,6 @@

QgsMapToolIdentifyFeature::QgsMapToolIdentifyFeature( QgsMapCanvas *canvas, QgsVectorLayer *vl )
: QgsMapToolIdentify( canvas )
, mCanvas( canvas )
, mLayer( vl )
{
mToolName = tr( "Identify feature" );
Expand Down
1 change: 0 additions & 1 deletion src/gui/qgsmaptoolidentifyfeature.h
Expand Up @@ -51,7 +51,6 @@ class GUI_EXPORT QgsMapToolIdentifyFeature : public QgsMapToolIdentify
void keyPressEvent( QKeyEvent *e ) override;

private:
QgsMapCanvas *mCanvas = nullptr;
QgsVectorLayer *mLayer = nullptr;
};

Expand Down
4 changes: 0 additions & 4 deletions src/plugins/grass/qgsgrassmoduleinput.cpp
Expand Up @@ -786,7 +786,6 @@ QgsGrassModuleInput::QgsGrassModuleInput( QgsGrassModule *module,
, mModuleStandardOptions( options )
, mUpdate( false )
, mUsesRegion( false )
, mRequired( false )
{
mGeometryTypeMask = GV_POINT | GV_LINE | GV_AREA;

Expand All @@ -796,9 +795,6 @@ QgsGrassModuleInput::QgsGrassModuleInput( QgsGrassModule *module,
}
adjustTitle();

// Check if this parameter is required
mRequired = gnode.toElement().attribute( QStringLiteral( "required" ) ) == QLatin1String( "yes" );

QDomNode promptNode = gnode.namedItem( QStringLiteral( "gisprompt" ) );
QDomElement promptElem = promptNode.toElement();
QString element = promptElem.attribute( QStringLiteral( "element" ) );
Expand Down
3 changes: 0 additions & 3 deletions src/plugins/grass/qgsgrassmoduleinput.h
Expand Up @@ -350,9 +350,6 @@ class QgsGrassModuleInput : public QgsGrassModuleGroupBoxItem
//! Uses region
bool mUsesRegion;

//! Required field
bool mRequired;

QgsGrassModuleInput( const QgsGrassModuleInput & ) = delete;
QgsGrassModuleInput &operator = ( const QgsGrassModuleInput & ) = delete;
};
Expand Down
3 changes: 0 additions & 3 deletions src/plugins/grass/qgsgrassmoduleparam.cpp
Expand Up @@ -790,9 +790,6 @@ QgsGrassModuleGdalInput::QgsGrassModuleGdalInput(
}
adjustTitle();

// Check if this parameter is required
mRequired = gnode.toElement().attribute( QStringLiteral( "required" ) ) == QLatin1String( "yes" );

// Read "layeroption" is defined
QString opt = qdesc.attribute( QStringLiteral( "layeroption" ) );
if ( ! opt.isNull() )
Expand Down
3 changes: 0 additions & 3 deletions src/plugins/grass/qgsgrassmoduleparam.h
Expand Up @@ -421,9 +421,6 @@ class QgsGrassModuleGdalInput : public QgsGrassModuleGroupBoxItem

//! Ogr where clauses
QStringList mOgrWheres;

//! Required field
bool mRequired;
};


Expand Down

0 comments on commit 351b73a

Please sign in to comment.