mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-04-03 01:49:59 +02:00
Modernize-use-override refactors code
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5009 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -27,10 +27,10 @@ class AddElementTextCommand : public QUndoCommand
|
||||
{
|
||||
public:
|
||||
AddElementTextCommand(Element *element, DynamicElementTextItem *deti, QUndoCommand *parent = nullptr);
|
||||
virtual ~AddElementTextCommand();
|
||||
~AddElementTextCommand() override;
|
||||
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
private:
|
||||
Element *m_element = nullptr;
|
||||
|
||||
@@ -32,10 +32,10 @@ class ChangeElementInformationCommand : public QUndoCommand
|
||||
public:
|
||||
ChangeElementInformationCommand(Element *elmt, DiagramContext &old_info, DiagramContext &new_info, QUndoCommand *parent = nullptr);
|
||||
|
||||
virtual int id() const {return 1;}
|
||||
virtual bool mergeWith(const QUndoCommand *other);
|
||||
virtual void undo();
|
||||
virtual void redo();
|
||||
int id() const override {return 1;}
|
||||
bool mergeWith(const QUndoCommand *other) override;
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
private:
|
||||
Element *m_element;
|
||||
|
||||
@@ -27,13 +27,13 @@ class DeleteQGraphicsItemCommand : public QUndoCommand
|
||||
{
|
||||
public:
|
||||
DeleteQGraphicsItemCommand(Diagram *diagram, const DiagramContent &content, QUndoCommand * parent = nullptr);
|
||||
virtual ~DeleteQGraphicsItemCommand() override;
|
||||
~DeleteQGraphicsItemCommand() override;
|
||||
private:
|
||||
DeleteQGraphicsItemCommand(const DeleteQGraphicsItemCommand &);
|
||||
|
||||
public:
|
||||
virtual void undo() override;
|
||||
virtual void redo() override;
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
// attributes
|
||||
private:
|
||||
|
||||
@@ -33,8 +33,8 @@ class LinkElementCommand : public QUndoCommand
|
||||
public:
|
||||
LinkElementCommand(Element *element_, QUndoCommand *parent = nullptr);
|
||||
|
||||
virtual int id() const {return 2;}
|
||||
virtual bool mergeWith(const QUndoCommand *other);
|
||||
int id() const override {return 2;}
|
||||
bool mergeWith(const QUndoCommand *other) override;
|
||||
|
||||
static bool isLinkable (Element *element_a, Element *element_b, bool already_linked = false);
|
||||
|
||||
@@ -45,8 +45,8 @@ class LinkElementCommand : public QUndoCommand
|
||||
void unlink (QList<Element *> element_list);
|
||||
void unlinkAll ();
|
||||
|
||||
void undo();
|
||||
void redo();
|
||||
void undo() override;
|
||||
void redo() override;
|
||||
|
||||
private:
|
||||
void setUpNewLink (const QList<Element *> &element_list, bool already_link);
|
||||
|
||||
Reference in New Issue
Block a user