diff options
Diffstat (limited to 'examples/widgets/tools/undoframework')
-rw-r--r-- | examples/widgets/tools/undoframework/commands.h | 16 | ||||
-rw-r--r-- | examples/widgets/tools/undoframework/diagramitem.h | 2 | ||||
-rw-r--r-- | examples/widgets/tools/undoframework/diagramscene.h | 4 |
3 files changed, 11 insertions, 11 deletions
diff --git a/examples/widgets/tools/undoframework/commands.h b/examples/widgets/tools/undoframework/commands.h index f15e586e91..0e68c5f533 100644 --- a/examples/widgets/tools/undoframework/commands.h +++ b/examples/widgets/tools/undoframework/commands.h @@ -54,10 +54,10 @@ public: MoveCommand(DiagramItem *diagramItem, const QPointF &oldPos, QUndoCommand *parent = 0); - void undo(); - void redo(); - bool mergeWith(const QUndoCommand *command); - int id() const { return Id; } + void undo() Q_DECL_OVERRIDE; + void redo() Q_DECL_OVERRIDE; + bool mergeWith(const QUndoCommand *command) Q_DECL_OVERRIDE; + int id() const Q_DECL_OVERRIDE { return Id; } private: DiagramItem *myDiagramItem; @@ -72,8 +72,8 @@ class DeleteCommand : public QUndoCommand public: explicit DeleteCommand(QGraphicsScene *graphicsScene, QUndoCommand *parent = 0); - void undo(); - void redo(); + void undo() Q_DECL_OVERRIDE; + void redo() Q_DECL_OVERRIDE; private: DiagramItem *myDiagramItem; @@ -89,8 +89,8 @@ public: QUndoCommand *parent = 0); ~AddCommand(); - void undo(); - void redo(); + void undo() Q_DECL_OVERRIDE; + void redo() Q_DECL_OVERRIDE; private: DiagramItem *myDiagramItem; diff --git a/examples/widgets/tools/undoframework/diagramitem.h b/examples/widgets/tools/undoframework/diagramitem.h index 2c115c3b20..44495fc57e 100644 --- a/examples/widgets/tools/undoframework/diagramitem.h +++ b/examples/widgets/tools/undoframework/diagramitem.h @@ -61,7 +61,7 @@ public: DiagramType diagramType() const { return polygon() == boxPolygon ? Box : Triangle; } - int type() const { return Type; } + int type() const Q_DECL_OVERRIDE { return Type; } private: QPolygonF boxPolygon; diff --git a/examples/widgets/tools/undoframework/diagramscene.h b/examples/widgets/tools/undoframework/diagramscene.h index 6ad9647df5..925ab450d2 100644 --- a/examples/widgets/tools/undoframework/diagramscene.h +++ b/examples/widgets/tools/undoframework/diagramscene.h @@ -62,8 +62,8 @@ signals: void itemMoved(DiagramItem *movedItem, const QPointF &movedFromPosition); protected: - void mousePressEvent(QGraphicsSceneMouseEvent *event); - void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE; + void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE; private: QGraphicsItem *movingItem; |