Commit b158b5ca authored by Andrius Štikonas's avatar Andrius Štikonas

Q_DECL_OVERRIDE -> override.

parent e17627fc
...@@ -39,7 +39,7 @@ public: ...@@ -39,7 +39,7 @@ public:
const AttackFleetList &standingOrders ); const AttackFleetList &standingOrders );
AttackFleetList *uncheckedFleets(); AttackFleetList *uncheckedFleets();
QSize sizeHint() const Q_DECL_OVERRIDE; QSize sizeHint() const override;
private: private:
void update(); void update();
......
...@@ -93,18 +93,18 @@ public: ...@@ -93,18 +93,18 @@ public:
} }
} }
int rowCount(const QModelIndex &index = QModelIndex()) const Q_DECL_OVERRIDE int rowCount(const QModelIndex &index = QModelIndex()) const override
{ {
Q_UNUSED(index); Q_UNUSED(index);
return m_players.count(); return m_players.count();
} }
int columnCount(const QModelIndex&) const Q_DECL_OVERRIDE int columnCount(const QModelIndex&) const override
{ {
return 2; return 2;
} }
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE QVariant data(const QModelIndex &index, int role) const override
{ {
if (index.isValid()) if (index.isValid())
{ {
...@@ -130,7 +130,7 @@ public: ...@@ -130,7 +130,7 @@ public:
return QVariant(); return QVariant();
} }
QVariant headerData(int section, Qt::Orientation orientation, int role) const Q_DECL_OVERRIDE QVariant headerData(int section, Qt::Orientation orientation, int role) const override
{ {
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) if (orientation == Qt::Horizontal && role == Qt::DisplayRole)
{ {
...@@ -140,7 +140,7 @@ public: ...@@ -140,7 +140,7 @@ public:
return QVariant(); return QVariant();
} }
bool setData(const QModelIndex &index, const QVariant &value, int) Q_DECL_OVERRIDE bool setData(const QModelIndex &index, const QVariant &value, int) override
{ {
bool result = false; bool result = false;
if (index.isValid()) if (index.isValid())
...@@ -216,7 +216,7 @@ public: ...@@ -216,7 +216,7 @@ public:
return player; return player;
} }
Qt::ItemFlags flags(const QModelIndex &) const Q_DECL_OVERRIDE Qt::ItemFlags flags(const QModelIndex &) const override
{ {
return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable; return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
} }
...@@ -278,7 +278,7 @@ public: ...@@ -278,7 +278,7 @@ public:
{ {
} }
QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &index) const Q_DECL_OVERRIDE QWidget * createEditor(QWidget *parent, const QStyleOptionViewItem &, const QModelIndex &index) const override
{ {
if (index.column() == 0) if (index.column() == 0)
return new QLineEdit(parent); return new QLineEdit(parent);
...@@ -286,7 +286,7 @@ public: ...@@ -286,7 +286,7 @@ public:
return new QComboBox(parent); return new QComboBox(parent);
} }
void setEditorData(QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE void setEditorData(QWidget *editor, const QModelIndex &index) const override
{ {
if (index.column() != 0) { if (index.column() != 0) {
QComboBox *cbox = static_cast<QComboBox*>(editor); QComboBox *cbox = static_cast<QComboBox*>(editor);
...@@ -302,7 +302,7 @@ public: ...@@ -302,7 +302,7 @@ public:
} }
} }
void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const Q_DECL_OVERRIDE void setModelData(QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
{ {
if (index.column() != 0) { if (index.column() != 0) {
QComboBox *cbox = static_cast<QComboBox*>(editor); QComboBox *cbox = static_cast<QComboBox*>(editor);
......
...@@ -107,8 +107,8 @@ signals: ...@@ -107,8 +107,8 @@ signals:
// Event Handlers // Event Handlers
//*************************************************************** //***************************************************************
protected: protected:
void keyPressEvent( QKeyEvent * ) Q_DECL_OVERRIDE; void keyPressEvent( QKeyEvent * ) override;
void resizeEvent ( QResizeEvent * event ) Q_DECL_OVERRIDE; void resizeEvent ( QResizeEvent * event ) override;
private slots: private slots:
void gameOver(); void gameOver();
......
...@@ -28,8 +28,8 @@ class LocalGame : public Game ...@@ -28,8 +28,8 @@ class LocalGame : public Game
public: public:
explicit LocalGame(QObject *parent = 0); explicit LocalGame(QObject *parent = 0);
void start() Q_DECL_OVERRIDE; void start() override;
void stop() Q_DECL_OVERRIDE; void stop() override;
signals: signals:
public slots: public slots:
...@@ -37,7 +37,7 @@ public slots: ...@@ -37,7 +37,7 @@ public slots:
void playerIsDone(); void playerIsDone();
protected: protected:
void buildMachine() Q_DECL_OVERRIDE; void buildMachine() override;
}; };
#endif // LOCALGAME_H #endif // LOCALGAME_H
...@@ -41,7 +41,7 @@ public: ...@@ -41,7 +41,7 @@ public:
MainWindow(); MainWindow();
~MainWindow(); ~MainWindow();
QSize sizeHint() const Q_DECL_OVERRIDE; QSize sizeHint() const override;
private: private:
void setupActions(); void setupActions();
......
...@@ -38,13 +38,13 @@ public: ...@@ -38,13 +38,13 @@ public:
explicit PlanetItem(MapScene *scene, Sector *sector, Game *game); explicit PlanetItem(MapScene *scene, Sector *sector, Game *game);
~PlanetItem() {} ~PlanetItem() {}
QRectF boundingRect() const Q_DECL_OVERRIDE; QRectF boundingRect() const override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget) Q_DECL_OVERRIDE; QWidget *widget) override;
void hoverEnterEvent ( QGraphicsSceneHoverEvent *event ) Q_DECL_OVERRIDE; void hoverEnterEvent ( QGraphicsSceneHoverEvent *event ) override;
void hoverLeaveEvent ( QGraphicsSceneHoverEvent *event ) Q_DECL_OVERRIDE; void hoverLeaveEvent ( QGraphicsSceneHoverEvent *event ) override;
void mousePressEvent ( QGraphicsSceneMouseEvent *event ) Q_DECL_OVERRIDE; void mousePressEvent ( QGraphicsSceneMouseEvent *event ) override;
void unselect (); void unselect ();
void select (); void select ();
Sector *sector () { return m_sector; } Sector *sector () { return m_sector; }
...@@ -78,11 +78,11 @@ public: ...@@ -78,11 +78,11 @@ public:
explicit PlanetInfoItem(Game*); explicit PlanetInfoItem(Game*);
~PlanetInfoItem() {} ~PlanetInfoItem() {}
QRectF boundingRect() const Q_DECL_OVERRIDE; QRectF boundingRect() const override;
void setPlanet (Planet *planet); void setPlanet (Planet *planet);
Planet *planet () { return m_planet; } Planet *planet () { return m_planet; }
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget) Q_DECL_OVERRIDE; QWidget *widget) override;
private: private:
Game *m_game; Game *m_game;
......
...@@ -63,7 +63,7 @@ class MapScene: public QGraphicsScene ...@@ -63,7 +63,7 @@ class MapScene: public QGraphicsScene
void displayPlanetInfo(Planet *planet); void displayPlanetInfo(Planet *planet);
void drawBackground( QPainter * painter, const QRectF & rect ) Q_DECL_OVERRIDE; void drawBackground( QPainter * painter, const QRectF & rect ) override;
/** /**
......
...@@ -33,8 +33,8 @@ public: ...@@ -33,8 +33,8 @@ public:
explicit MapView( MapScene* scene, QWidget *parent = 0 ); explicit MapView( MapScene* scene, QWidget *parent = 0 );
private: private:
void resizeEvent( QResizeEvent* ) Q_DECL_OVERRIDE; void resizeEvent( QResizeEvent* ) override;
QSize sizeHint() const Q_DECL_OVERRIDE; QSize sizeHint() const override;
MapScene* m_scene; MapScene* m_scene;
}; };
......
...@@ -52,8 +52,8 @@ signals: ...@@ -52,8 +52,8 @@ signals:
void sectorSelected(const Coordinate &coord); void sectorSelected(const Coordinate &coord);
protected: protected:
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE; void mousePressEvent(QMouseEvent *event) override;
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE; void paintEvent(QPaintEvent *event) override;
private: private:
void CalculateOffsets(float &, float &, float &); void CalculateOffsets(float &, float &, float &);
......
...@@ -33,7 +33,7 @@ class AiBecai : public ComputerPlayer ...@@ -33,7 +33,7 @@ class AiBecai : public ComputerPlayer
public: public:
explicit AiBecai(Game *game, const QString &newName, const QColor &color); explicit AiBecai(Game *game, const QString &newName, const QColor &color);
void play() Q_DECL_OVERRIDE; void play() override;
private: private:
int getMinimumDefenceFleetSize(Planet *planet, int minimumBaseDefenceFleetSize, double averageOwnKillPercentage, double averageOwnProduction); int getMinimumDefenceFleetSize(Planet *planet, int minimumBaseDefenceFleetSize, double averageOwnKillPercentage, double averageOwnProduction);
......
...@@ -26,7 +26,7 @@ class AiBecaiGui : public PlayerGui ...@@ -26,7 +26,7 @@ class AiBecaiGui : public PlayerGui
{ {
public: public:
explicit AiBecaiGui(); explicit AiBecaiGui();
Player* createInstance(Game *game, const QString &newName, const QColor &color) const Q_DECL_OVERRIDE; Player* createInstance(Game *game, const QString &newName, const QColor &color) const override;
}; };
#endif // AI_BECAI_GUI_H #endif // AI_BECAI_GUI_H
...@@ -34,7 +34,7 @@ protected: ...@@ -34,7 +34,7 @@ protected:
AiLevel aiLevel() const { return m_level; } AiLevel aiLevel() const { return m_level; }
void play() Q_DECL_OVERRIDE; void play() override;
signals: signals:
......
...@@ -26,7 +26,7 @@ class AiDefaultHardGui : public PlayerGui ...@@ -26,7 +26,7 @@ class AiDefaultHardGui : public PlayerGui
{ {
public: public:
explicit AiDefaultHardGui(); explicit AiDefaultHardGui();
Player* createInstance(Game *game, const QString &newName, const QColor &color) const Q_DECL_OVERRIDE; Player* createInstance(Game *game, const QString &newName, const QColor &color) const override;
}; };
#endif // AI_DEFAULT_HARD_GUI_H #endif // AI_DEFAULT_HARD_GUI_H
...@@ -26,7 +26,7 @@ class AiDefaultNormalGui : public PlayerGui ...@@ -26,7 +26,7 @@ class AiDefaultNormalGui : public PlayerGui
{ {
public: public:
explicit AiDefaultNormalGui(); explicit AiDefaultNormalGui();
Player* createInstance(Game *game, const QString &newName, const QColor &color) const Q_DECL_OVERRIDE; Player* createInstance(Game *game, const QString &newName, const QColor &color) const override;
}; };
#endif // AI_DEFAULT_NORMAL_GUI_H #endif // AI_DEFAULT_NORMAL_GUI_H
...@@ -26,7 +26,7 @@ class AiDefaultWeakGui : public PlayerGui ...@@ -26,7 +26,7 @@ class AiDefaultWeakGui : public PlayerGui
{ {
public: public:
explicit AiDefaultWeakGui(); explicit AiDefaultWeakGui();
Player* createInstance(Game *game, const QString &newName, const QColor &color) const Q_DECL_OVERRIDE; Player* createInstance(Game *game, const QString &newName, const QColor &color) const override;
}; };
#endif // AI_DEFAULT_WEAK_GUI_H #endif // AI_DEFAULT_WEAK_GUI_H
...@@ -33,8 +33,8 @@ class ComputerPlayer : public Player ...@@ -33,8 +33,8 @@ class ComputerPlayer : public Player
protected: protected:
explicit ComputerPlayer(Game *game, const QString &newName, const QColor &color); explicit ComputerPlayer(Game *game, const QString &newName, const QColor &color);
bool isAiPlayer() Q_DECL_OVERRIDE; bool isAiPlayer() override;
void play() Q_DECL_OVERRIDE = 0; void play() override = 0;
signals: signals:
......
...@@ -31,7 +31,7 @@ class LocalPlayer : public Player ...@@ -31,7 +31,7 @@ class LocalPlayer : public Player
public: public:
explicit LocalPlayer(Game *game, const QString &newName, const QColor &color); explicit LocalPlayer(Game *game, const QString &newName, const QColor &color);
void play() Q_DECL_OVERRIDE; void play() override;
void done(); void done();
signals: signals:
......
...@@ -26,7 +26,7 @@ class LocalPlayerGui : public PlayerGui ...@@ -26,7 +26,7 @@ class LocalPlayerGui : public PlayerGui
{ {
public: public:
explicit LocalPlayerGui(); explicit LocalPlayerGui();
Player* createInstance(Game *game, const QString &newName, const QColor &color) const Q_DECL_OVERRIDE; Player* createInstance(Game *game, const QString &newName, const QColor &color) const override;
}; };
#endif // LOCAL_PLAYER_GUI_H #endif // LOCAL_PLAYER_GUI_H
...@@ -38,12 +38,12 @@ class NeutralPlayer : public Player ...@@ -38,12 +38,12 @@ class NeutralPlayer : public Player
public: public:
explicit NeutralPlayer(Game *game); explicit NeutralPlayer(Game *game);
bool isDead() Q_DECL_OVERRIDE; bool isDead() override;
bool isNeutral() Q_DECL_OVERRIDE; bool isNeutral() override;
protected: protected:
void play() Q_DECL_OVERRIDE; void play() override;
signals: signals:
......
...@@ -78,8 +78,8 @@ public: ...@@ -78,8 +78,8 @@ public:
protected: protected:
virtual void play() = 0; virtual void play() = 0;
void onEntry (QEvent *event) Q_DECL_OVERRIDE; void onEntry (QEvent *event) override;
void onExit (QEvent *event) Q_DECL_OVERRIDE; void onExit (QEvent *event) override;
Game *m_game; Game *m_game;
signals: signals:
......
...@@ -37,8 +37,8 @@ class SpectatorPlayer : public LocalPlayer ...@@ -37,8 +37,8 @@ class SpectatorPlayer : public LocalPlayer
public: public:
explicit SpectatorPlayer(Game *game, const QString &newName, const QColor &color); explicit SpectatorPlayer(Game *game, const QString &newName, const QColor &color);
bool isDead() Q_DECL_OVERRIDE; bool isDead() override;
bool isSpectator() Q_DECL_OVERRIDE; bool isSpectator() override;
signals: signals:
......
...@@ -26,7 +26,7 @@ class SpectatorPlayerGui : public PlayerGui ...@@ -26,7 +26,7 @@ class SpectatorPlayerGui : public PlayerGui
{ {
public: public:
explicit SpectatorPlayerGui(); explicit SpectatorPlayerGui();
Player* createInstance(Game *game, const QString &newName, const QColor &color) const Q_DECL_OVERRIDE; Player* createInstance(Game *game, const QString &newName, const QColor &color) const override;
}; };
#endif // SPECTATOR_PLAYER_GUI_H #endif // SPECTATOR_PLAYER_GUI_H
...@@ -40,7 +40,7 @@ public: ...@@ -40,7 +40,7 @@ public:
explicit StandingsWidget(QWidget *parent, const QList<Player *> players); explicit StandingsWidget(QWidget *parent, const QList<Player *> players);
~StandingsWidget(); ~StandingsWidget();
QSize sizeHint() const Q_DECL_OVERRIDE; QSize sizeHint() const override;
void update(const QList<Player *> players); void update(const QList<Player *> players);
private: private:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment