Skip to content

Commit

Permalink
Merge pull request #5870 from nyalldawson/virtual
Browse files Browse the repository at this point in the history
Drop redundant virtual keywords on overrides
  • Loading branch information
nyalldawson committed Dec 16, 2017
2 parents 978d927 + 71a39cb commit 9d25119
Show file tree
Hide file tree
Showing 910 changed files with 3,544 additions and 2,724 deletions.
2 changes: 0 additions & 2 deletions python/analysis/network/qgsgraphdirector.sip
Expand Up @@ -32,8 +32,6 @@ using "builder" design patter.
%End
public:

virtual ~QgsGraphDirector();

virtual void makeGraph( QgsGraphBuilderInterface *builder,
const QVector< QgsPointXY > &additionalPoints,
QVector< QgsPointXY > &snappedPoints /Out/,
Expand Down
1 change: 1 addition & 0 deletions python/analysis/network/qgsnetworkdistancestrategy.sip
Expand Up @@ -22,6 +22,7 @@ used for finding shortest path between two points.
%End
public:
virtual QVariant cost( double distance, const QgsFeature & ) const;

};

/************************************************************************
Expand Down
2 changes: 0 additions & 2 deletions python/analysis/network/qgsvectorlayerdirector.sip
Expand Up @@ -48,8 +48,6 @@ Default constructor
attribute value is not set or does not equal to the given values
%End

virtual ~QgsVectorLayerDirector();

virtual void makeGraph( QgsGraphBuilderInterface *builder,
const QVector< QgsPointXY > &additionalPoints,
QVector< QgsPointXY> &snappedPoints /Out/,
Expand Down
8 changes: 4 additions & 4 deletions python/analysis/raster/qgsderivativefilter.sip
Expand Up @@ -20,10 +20,10 @@ Adds the ability to calculate derivatives in x- and y-directions. Needs to be su
%End
public:
QgsDerivativeFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
virtual ~QgsDerivativeFilter();
virtual float processNineCellWindow( float *x11, float *x21, float *x31,
float *x12, float *x22, float *x32,
float *x13, float *x23, float *x33 ) = 0;

virtual float processNineCellWindow( float *x11, float *x21, float *x31,
float *x12, float *x22, float *x32,
float *x13, float *x23, float *x33 ) = 0;

protected:
float calcFirstDerX( float *x11, float *x21, float *x31, float *x12, float *x22, float *x32, float *x13, float *x23, float *x33 );
Expand Down
1 change: 0 additions & 1 deletion python/analysis/raster/qgsruggednessfilter.sip
Expand Up @@ -21,7 +21,6 @@ Algorithm from Riley et al. 1999: A terrain ruggedness index that quantifies top
%End
public:
QgsRuggednessFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
~QgsRuggednessFilter();

protected:

Expand Down
1 change: 0 additions & 1 deletion python/analysis/raster/qgsslopefilter.sip
Expand Up @@ -20,7 +20,6 @@ Calculates slope values in a window of 3x3 cells based on first order derivative
%End
public:
QgsSlopeFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
~QgsSlopeFilter();

virtual float processNineCellWindow( float *x11, float *x21, float *x31,
float *x12, float *x22, float *x32,
Expand Down
1 change: 0 additions & 1 deletion python/analysis/raster/qgstotalcurvaturefilter.sip
Expand Up @@ -20,7 +20,6 @@ Calculates total curvature as described by Wilson, Gallant (2000): terrain analy
%End
public:
QgsTotalCurvatureFilter( const QString &inputFile, const QString &outputFile, const QString &outputFormat );
~QgsTotalCurvatureFilter();

protected:

Expand Down
4 changes: 2 additions & 2 deletions python/core/annotations/qgshtmlannotation.sip
Expand Up @@ -30,8 +30,6 @@ An annotation item that embeds HTML content.
Constructor for QgsHtmlAnnotation.
%End

~QgsHtmlAnnotation();

virtual QgsHtmlAnnotation *clone() const /Factory/;


Expand All @@ -55,8 +53,10 @@ Returns the file path for the source HTML file.
%End

virtual void writeXml( QDomElement &elem, QDomDocument &doc, const QgsReadWriteContext &context ) const;

virtual void readXml( const QDomElement &itemElem, const QgsReadWriteContext &context );


virtual void setAssociatedFeature( const QgsFeature &feature );


Expand Down
2 changes: 2 additions & 0 deletions python/core/annotations/qgssvgannotation.sip
Expand Up @@ -31,8 +31,10 @@ Constructor for QgsSvgAnnotation.


virtual void writeXml( QDomElement &elem, QDomDocument &doc, const QgsReadWriteContext &context ) const;

virtual void readXml( const QDomElement &itemElem, const QgsReadWriteContext &context );


void setFilePath( const QString &file );
%Docstring
Sets the file path for the source SVG file.
Expand Down
2 changes: 2 additions & 0 deletions python/core/annotations/qgstextannotation.sip
Expand Up @@ -49,8 +49,10 @@ within the annotation. Ownership is not transferred.
%End

virtual void writeXml( QDomElement &elem, QDomDocument &doc, const QgsReadWriteContext &context ) const;

virtual void readXml( const QDomElement &itemElem, const QgsReadWriteContext &context );


static QgsTextAnnotation *create() /Factory/;
%Docstring
Returns a new QgsTextAnnotation object.
Expand Down
5 changes: 5 additions & 0 deletions python/core/composer/qgscomposerattributetablemodelv2.sip
Expand Up @@ -37,12 +37,15 @@ Constructor for QgsComposerAttributeTableColumnModel.
%End

virtual int rowCount( const QModelIndex &parent = QModelIndex() ) const;

virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;

virtual QVariant data( const QModelIndex &index, int role ) const;

virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;

virtual bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole );

virtual Qt::ItemFlags flags( const QModelIndex &index ) const;

virtual bool removeRows( int row, int count, const QModelIndex &parent = QModelIndex() );
Expand Down Expand Up @@ -176,12 +179,14 @@ Constructor for QgsComposerTableSortColumnsProxyModel.
virtual int columnCount( const QModelIndex &parent = QModelIndex() ) const;

virtual QVariant data( const QModelIndex &index, int role ) const;

virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;

virtual Qt::ItemFlags flags( const QModelIndex &index ) const;

virtual bool setData( const QModelIndex &index, const QVariant &value, int role = Qt::EditRole );


QgsComposerTableColumn *columnFromRow( int row );
%Docstring
Returns the QgsComposerTableColumn corresponding to a row in the proxy model.
Expand Down
5 changes: 5 additions & 0 deletions python/core/composer/qgscomposerattributetablev2.sip
Expand Up @@ -68,7 +68,9 @@ A table that displays attributes from a vector layer

virtual QString displayName() const;


virtual bool writeXml( QDomElement &elem, QDomDocument &doc, bool ignoreFrames = false ) const;

%Docstring
Writes properties specific to attribute tables
:param elem: an existing QDomElement in which to store the attribute table's properties.
Expand All @@ -81,6 +83,7 @@ Writes properties specific to attribute tables
%End

virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc, bool ignoreFrames = false );

%Docstring
Reads the properties specific to an attribute table from xml.
:param itemElem: a QDomElement holding the attribute table's desired properties.
Expand All @@ -94,6 +97,7 @@ Reads the properties specific to an attribute table from xml.

virtual void addFrame( QgsComposerFrame *frame /Transfer/, bool recalcFrameSizes = true );


void setSource( const ContentSource source );
%Docstring
Sets the source for attributes to show in table body.
Expand Down Expand Up @@ -393,6 +397,7 @@ be replaced by a line break.

virtual QgsExpressionContext createExpressionContext() const;


};

/************************************************************************
Expand Down
1 change: 1 addition & 0 deletions python/core/composer/qgscomposereffect.sip
Expand Up @@ -27,6 +27,7 @@ Constructor for QgsComposerEffect.

protected:
virtual void draw( QPainter *painter );

%Docstring
Called whenever source needs to be drawn
%End
Expand Down
2 changes: 2 additions & 0 deletions python/core/composer/qgscomposerframe.sip
Expand Up @@ -41,6 +41,7 @@ Returns the parent multiframe for the frame.

virtual QString displayName() const;


virtual void setSceneRect( const QRectF &rectangle );


Expand Down Expand Up @@ -131,6 +132,7 @@ Returns whether the frame is empty

virtual QgsExpressionContext createExpressionContext() const;


};

/************************************************************************
Expand Down
2 changes: 2 additions & 0 deletions python/core/composer/qgscomposerhtml.sip
Expand Up @@ -265,6 +265,7 @@ Returns whether user stylesheets are enabled for the HTML content.
%End

virtual QString displayName() const;

virtual QSizeF totalSize() const;

virtual void render( QPainter *p, const QRectF &renderExtent, const int frameIndex );
Expand Down Expand Up @@ -301,6 +302,7 @@ Recalculates the frame sizes for the current viewport dimensions

virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = 0 );


};

/************************************************************************
Expand Down
4 changes: 3 additions & 1 deletion python/core/composer/qgscomposeritem.sip
Expand Up @@ -96,7 +96,7 @@ Constructor with box position and composer object
:param composition: parent composition
:param manageZValue: true if the z-Value of this object should be managed by mComposition*
%End
virtual ~QgsComposerItem();
~QgsComposerItem();

virtual int type() const;
%Docstring
Expand Down Expand Up @@ -746,6 +746,7 @@ Sets the current layer to draw for exporting
%End

virtual QgsExpressionContext createExpressionContext() const;

%Docstring
Creates an expression context relating to the item's current state. The context includes
scopes for global, project, composition, atlas and item properties.
Expand Down Expand Up @@ -799,6 +800,7 @@ around item center. If false, rotation occurs around item origin


virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = 0 );

%Docstring
Refreshes a data defined property for the item by reevaluating the property's value
and redrawing the item with this new value.
Expand Down
1 change: 1 addition & 0 deletions python/core/composer/qgscomposeritemgroup.sip
Expand Up @@ -55,6 +55,7 @@ corresponds to 1 scene size unit*

virtual void setVisibility( const bool visible );


virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const;

%Docstring
Expand Down
3 changes: 3 additions & 0 deletions python/core/composer/qgscomposerlabel.sip
Expand Up @@ -198,6 +198,7 @@ Sets state from Dom document

virtual QString displayName() const;


virtual QRectF boundingRect() const;

%Docstring
Expand All @@ -208,11 +209,13 @@ label's frame
%End

virtual void setFrameEnabled( const bool drawFrame );

%Docstring
Reimplemented to call prepareGeometryChange after toggling frame
%End

virtual void setFrameStrokeWidth( const double strokeWidth );

%Docstring
Reimplemented to call prepareGeometryChange after changing stroke width
%End
Expand Down
3 changes: 3 additions & 0 deletions python/core/composer/qgscomposerlegend.sip
Expand Up @@ -110,6 +110,7 @@ Find out whether legend items are filtered to show just the ones visible in the
%End

virtual void updateItem();

%Docstring
Update() overloading. Use it rather than update()

Expand Down Expand Up @@ -418,6 +419,7 @@ Sets state from Dom document

virtual QString displayName() const;


const QgsLegendSettings &legendSettings() const;
%Docstring
Returns the legend's renderer settings object.
Expand All @@ -440,6 +442,7 @@ Sets mCompositionMap to 0 if the map is deleted
virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = 0 );



};


Expand Down
7 changes: 6 additions & 1 deletion python/core/composer/qgscomposermap.sip
Expand Up @@ -28,7 +28,7 @@ Constructor.
%Docstring
Constructor. Settings are read from project.
%End
virtual ~QgsComposerMap();
~QgsComposerMap();

virtual int type() const;
%Docstring
Expand Down Expand Up @@ -96,6 +96,7 @@ Move content of map
%End

virtual void zoomContent( const double factor, const QPointF point, const ZoomMode mode = QgsComposerItem::Zoom );

%Docstring
Zoom content of item. Does nothing per default (but implemented in composer map)
:param factor: zoom factor, where > 1 results in a zoom in and < 1 results in a zoom out
Expand Down Expand Up @@ -444,6 +445,7 @@ In case of annotations, the bounding rectangle can be larger than the map item r
%End

virtual void setFrameStrokeWidth( const double strokeWidth );

%Docstring
reimplement setFrameStrokeWidth, so that updateBoundingRect() is called after setting the frame width */
%End
Expand Down Expand Up @@ -619,6 +621,7 @@ clockwise, starting at the top-left point

virtual QString displayName() const;


QPolygonF transformedMapPolygon() const;
%Docstring
Returns extent that considers rotation and shift with mOffsetX / mOffsetY
Expand All @@ -642,6 +645,7 @@ Calculates the extent to request and the yShift of the top-left point in case of

virtual QgsExpressionContext createExpressionContext() const;


signals:
void extentChanged();

Expand Down Expand Up @@ -679,6 +683,7 @@ Updates the bounding rect of this item. Call this function before doing any chan

virtual void refreshDataDefinedProperty( const QgsComposerObject::DataDefinedProperty property = QgsComposerObject::AllProperties, const QgsExpressionContext *context = 0 );


};


Expand Down
3 changes: 2 additions & 1 deletion python/core/composer/qgscomposermapgrid.sip
Expand Up @@ -284,7 +284,7 @@ Constructor for QgsComposerMapGrid.
:param map: QgsComposerMap the grid is attached to
%End

virtual ~QgsComposerMapGrid();
~QgsComposerMapGrid();

virtual void draw( QPainter *painter );

Expand Down Expand Up @@ -1089,6 +1089,7 @@ Retrieves the second fill color for the grid frame.

virtual QgsExpressionContext createExpressionContext() const;


public:
};

Expand Down
2 changes: 2 additions & 0 deletions python/core/composer/qgscomposermapitem.sip
Expand Up @@ -34,6 +34,7 @@ Draws the item on to a painter
%End

virtual bool writeXml( QDomElement &elem, QDomDocument &doc ) const;

%Docstring
Stores map item state in DOM element
:param elem: is DOM element corresponding to a 'ComposerMap' tag
Expand All @@ -45,6 +46,7 @@ Stores map item state in DOM element
%End

virtual bool readXml( const QDomElement &itemElem, const QDomDocument &doc );

%Docstring
Sets map item state from a DOM document
:param itemElem: is DOM node corresponding to a 'ComposerMapGrid' tag
Expand Down
2 changes: 1 addition & 1 deletion python/core/composer/qgscomposermapoverview.sip
Expand Up @@ -173,7 +173,7 @@ Constructor for QgsComposerMapOverview.
:param map: QgsComposerMap the overview is attached to
%End

virtual ~QgsComposerMapOverview();
~QgsComposerMapOverview();

virtual void draw( QPainter *painter );

Expand Down
2 changes: 2 additions & 0 deletions python/core/composer/qgscomposermodel.sip
Expand Up @@ -67,7 +67,9 @@ Constructor
virtual Qt::DropActions supportedDropActions() const;

virtual QStringList mimeTypes() const;

virtual QMimeData *mimeData( const QModelIndexList &indexes ) const;

virtual bool dropMimeData( const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent );

virtual bool removeRows( int row, int count, const QModelIndex &parent = QModelIndex() );
Expand Down

0 comments on commit 9d25119

Please sign in to comment.