mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-04 04:23:55 -07:00
add missing override and explicit specifiers to all classes in src/game (#5511)
This commit is contained in:
parent
af161f00b7
commit
66e2e7a473
27 changed files with 140 additions and 137 deletions
|
|
@ -24,17 +24,17 @@ protected:
|
|||
bool targetLocked;
|
||||
QColor color;
|
||||
bool fullColor;
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mousePressEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
|
||||
public:
|
||||
ArrowItem(Player *_player, int _id, ArrowTarget *_startItem, ArrowTarget *_targetItem, const QColor &color);
|
||||
~ArrowItem();
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
||||
QRectF boundingRect() const
|
||||
~ArrowItem() override;
|
||||
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override;
|
||||
QRectF boundingRect() const override
|
||||
{
|
||||
return path.boundingRect();
|
||||
}
|
||||
QPainterPath shape() const
|
||||
QPainterPath shape() const override
|
||||
{
|
||||
return path;
|
||||
}
|
||||
|
|
@ -83,8 +83,8 @@ public:
|
|||
void addChildArrow(ArrowDragItem *childArrow);
|
||||
|
||||
protected:
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
};
|
||||
|
||||
class ArrowAttachItem : public ArrowItem
|
||||
|
|
@ -96,12 +96,12 @@ private:
|
|||
void attachCards(CardItem *startCard, const CardItem *targetCard);
|
||||
|
||||
public:
|
||||
ArrowAttachItem(ArrowTarget *_startItem);
|
||||
explicit ArrowAttachItem(ArrowTarget *_startItem);
|
||||
void addChildArrow(ArrowAttachItem *childArrow);
|
||||
|
||||
protected:
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
|
||||
void mouseMoveEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) override;
|
||||
};
|
||||
|
||||
#endif // ARROWITEM_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue