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

Q_DECL_OVERRIDE -> override.

parent e17627fc
......@@ -39,7 +39,7 @@ public:
const AttackFleetList &standingOrders );
AttackFleetList *uncheckedFleets();
QSize sizeHint() const Q_DECL_OVERRIDE;
QSize sizeHint() const override;
private:
void update();
......
......@@ -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);
return m_players.count();
}
int columnCount(const QModelIndex&) const Q_DECL_OVERRIDE
int columnCount(const QModelIndex&) const override
{
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())
{
......@@ -130,7 +130,7 @@ public:
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)
{
......@@ -140,7 +140,7 @@ public:
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;
if (index.isValid())
......@@ -216,7 +216,7 @@ public:
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;
}
......@@ -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)
return new QLineEdit(parent);
......@@ -286,7 +286,7 @@ public:
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) {
QComboBox *cbox = static_cast<QComboBox*>(editor);
......@@ -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) {
QComboBox *cbox = static_cast<QComboBox*>(editor);
......
......@@ -107,8 +107,8 @@ signals:
// Event Handlers
//***************************************************************
protected:
void keyPressEvent( QKeyEvent * ) Q_DECL_OVERRIDE;
void resizeEvent ( QResizeEvent * event ) Q_DECL_OVERRIDE;
void keyPressEvent( QKeyEvent * ) override;
void resizeEvent ( QResizeEvent * event ) override;
private slots:
void gameOver();
......
......@@ -28,8 +28,8 @@ class LocalGame : public Game
public:
explicit LocalGame(QObject *parent = 0);
void start() Q_DECL_OVERRIDE;
void stop() Q_DECL_OVERRIDE;
void start() override;
void stop() override;
signals:
public slots:
......@@ -37,7 +37,7 @@ public slots:
void playerIsDone();
protected:
void buildMachine() Q_DECL_OVERRIDE;
void buildMachine() override;
};
#endif // LOCALGAME_H
......@@ -41,7 +41,7 @@ public:
MainWindow();
~MainWindow();
QSize sizeHint() const Q_DECL_OVERRIDE;
QSize sizeHint() const override;
private:
void setupActions();
......
......@@ -38,13 +38,13 @@ public:
explicit PlanetItem(MapScene *scene, Sector *sector, Game *game);
~PlanetItem() {}
QRectF boundingRect() const Q_DECL_OVERRIDE;
QRectF boundingRect() const override;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget) Q_DECL_OVERRIDE;
QWidget *widget) override;
void hoverEnterEvent ( QGraphicsSceneHoverEvent *event ) Q_DECL_OVERRIDE;
void hoverLeaveEvent ( QGraphicsSceneHoverEvent *event ) Q_DECL_OVERRIDE;
void mousePressEvent ( QGraphicsSceneMouseEvent *event ) Q_DECL_OVERRIDE;
void hoverEnterEvent ( QGraphicsSceneHoverEvent *event ) override;
void hoverLeaveEvent ( QGraphicsSceneHoverEvent *event ) override;
void mousePressEvent ( QGraphicsSceneMouseEvent *event ) override;
void unselect ();
void select ();
Sector *sector () { return m_sector; }
......@@ -78,11 +78,11 @@ public:
explicit PlanetInfoItem(Game*);
~PlanetInfoItem() {}
QRectF boundingRect() const Q_DECL_OVERRIDE;
QRectF boundingRect() const override;
void setPlanet (Planet *planet);
Planet *planet () { return m_planet; }
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
QWidget *widget) Q_DECL_OVERRIDE;
QWidget *widget) override;
private:
Game *m_game;
......
......@@ -63,7 +63,7 @@ class MapScene: public QGraphicsScene
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:
explicit MapView( MapScene* scene, QWidget *parent = 0 );
private:
void resizeEvent( QResizeEvent* ) Q_DECL_OVERRIDE;
QSize sizeHint() const Q_DECL_OVERRIDE;
void resizeEvent( QResizeEvent* ) override;
QSize sizeHint() const override;
MapScene* m_scene;
};
......
......@@ -52,8 +52,8 @@ signals:
void sectorSelected(const Coordinate &coord);
protected:
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
void mousePressEvent(QMouseEvent *event) override;
void paintEvent(QPaintEvent *event) override;
private:
void CalculateOffsets(float &, float &, float &);
......
......@@ -33,7 +33,7 @@ class AiBecai : public ComputerPlayer
public:
explicit AiBecai(Game *game, const QString &newName, const QColor &color);
void play() Q_DECL_OVERRIDE;
void play() override;
private:
int getMinimumDefenceFleetSize(Planet *planet, int minimumBaseDefenceFleetSize, double averageOwnKillPercentage, double averageOwnProduction);
......
......@@ -26,7 +26,7 @@ class AiBecaiGui : public PlayerGui
{
public:
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
......@@ -34,7 +34,7 @@ protected:
AiLevel aiLevel() const { return m_level; }
void play() Q_DECL_OVERRIDE;
void play() override;
signals:
......
......@@ -26,7 +26,7 @@ class AiDefaultHardGui : public PlayerGui
{
public:
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
......@@ -26,7 +26,7 @@ class AiDefaultNormalGui : public PlayerGui
{
public:
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
......@@ -26,7 +26,7 @@ class AiDefaultWeakGui : public PlayerGui
{
public:
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
......@@ -33,8 +33,8 @@ class ComputerPlayer : public Player
protected:
explicit ComputerPlayer(Game *game, const QString &newName, const QColor &color);
bool isAiPlayer() Q_DECL_OVERRIDE;
void play() Q_DECL_OVERRIDE = 0;
bool isAiPlayer() override;
void play() override = 0;
signals:
......
......@@ -31,7 +31,7 @@ class LocalPlayer : public Player
public:
explicit LocalPlayer(Game *game, const QString &newName, const QColor &color);
void play() Q_DECL_OVERRIDE;
void play() override;
void done();
signals:
......
......@@ -26,7 +26,7 @@ class LocalPlayerGui : public PlayerGui
{
public:
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
......@@ -38,12 +38,12 @@ class NeutralPlayer : public Player
public:
explicit NeutralPlayer(Game *game);
bool isDead() Q_DECL_OVERRIDE;
bool isDead() override;
bool isNeutral() Q_DECL_OVERRIDE;
bool isNeutral() override;
protected:
void play() Q_DECL_OVERRIDE;
void play() override;
signals:
......
......@@ -78,8 +78,8 @@ public:
protected:
virtual void play() = 0;
void onEntry (QEvent *event) Q_DECL_OVERRIDE;
void onExit (QEvent *event) Q_DECL_OVERRIDE;
void onEntry (QEvent *event) override;
void onExit (QEvent *event) override;
Game *m_game;
signals:
......
......@@ -37,8 +37,8 @@ class SpectatorPlayer : public LocalPlayer
public:
explicit SpectatorPlayer(Game *game, const QString &newName, const QColor &color);
bool isDead() Q_DECL_OVERRIDE;
bool isSpectator() Q_DECL_OVERRIDE;
bool isDead() override;
bool isSpectator() override;
signals:
......
......@@ -26,7 +26,7 @@ class SpectatorPlayerGui : public PlayerGui
{
public:
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
......@@ -40,7 +40,7 @@ public:
explicit StandingsWidget(QWidget *parent, const QList<Player *> players);
~StandingsWidget();
QSize sizeHint() const Q_DECL_OVERRIDE;
QSize sizeHint() const override;
void update(const QList<Player *> players);
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