Skip to content

Commit

Permalink
Add some missing overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 25, 2017
1 parent 213064a commit 30a83e1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/layout/qgslayoutitem.h
Expand Up @@ -85,7 +85,7 @@ class CORE_EXPORT QgsLayoutItem : public QgsLayoutObject, public QGraphicsRectIt
* Return correct graphics item type
* \see stringType()
*/
virtual int type() const = 0;
virtual int type() const override = 0;

/**
* Return the item type as a string.
Expand Down
4 changes: 2 additions & 2 deletions src/core/layout/qgslayoutitemregistry.h
Expand Up @@ -271,9 +271,9 @@ class TestLayoutItem : public QgsLayoutItem
~TestLayoutItem() {}

//implement pure virtual methods
int type() const { return QgsLayoutItemRegistry::LayoutItem + 102; }
int type() const override { return QgsLayoutItemRegistry::LayoutItem + 102; }
QString stringType() const override { return QStringLiteral( "ItemTest" ); }
void draw( QgsRenderContext &context, const QStyleOptionGraphicsItem *itemStyle = nullptr );
void draw( QgsRenderContext &context, const QStyleOptionGraphicsItem *itemStyle = nullptr ) override;

private:
QColor mColor;
Expand Down

0 comments on commit 30a83e1

Please sign in to comment.