Commit 3a2a7837 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECLARE_OVERRIDE

parent 75af57e4
......@@ -33,7 +33,7 @@
class AI_Kepler : public AI_Base
{
public:
QString whoami() { return QString ("Kepler"); } // IDW test.
QString whoami() Q_DECL_OVERRIDE { return QString ("Kepler"); } // IDW test.
/**
* The Kepler AI constructor.
......@@ -60,7 +60,7 @@ public:
*/
int assessCube (const int index, const Player player,
const int neighbors [4], const Player owners[],
const int values[], const int maxValues[]) const;
const int values[], const int maxValues[]) const Q_DECL_OVERRIDE;
};
#endif // AI_KEPLER_H
......@@ -38,7 +38,7 @@ public:
: m_ai (ai)
{ }
virtual void run() {
void run() Q_DECL_OVERRIDE {
int index = m_ai->computeMove();
emit done (index);
}
......
......@@ -33,7 +33,7 @@
class AI_Newton : public AI_Base
{
public:
QString whoami() { return QString ("Newton"); } // IDW test.
QString whoami() Q_DECL_OVERRIDE { return QString ("Newton"); } // IDW test.
/**
* The Newton AI constructor.
......@@ -60,7 +60,7 @@ public:
*/
int assessCube (const int index, const Player player,
const int neighbors [4], const Player owners[],
const int values[], const int maxValues[]) const;
const int values[], const int maxValues[]) const Q_DECL_OVERRIDE;
};
#endif // AI_NEWTON_H
......@@ -79,10 +79,10 @@ signals:
void mouseClick (int x, int y);
protected:
virtual QSize sizeHint() const;
QSize sizeHint() const Q_DECL_OVERRIDE;
virtual void initCubes();
virtual void paintEvent (QPaintEvent * event);
virtual void resizeEvent (QResizeEvent * event);
void paintEvent (QPaintEvent * event) Q_DECL_OVERRIDE;
void resizeEvent (QResizeEvent * event) Q_DECL_OVERRIDE;
private:
enum AnimationType {None, ComputerMove, Darken, RapidBlink, Scatter};
......
......@@ -79,10 +79,10 @@ signals:
protected:
/** checks, if mouseclick was inside this cube*/
virtual void mouseReleaseEvent(QMouseEvent*);
void mouseReleaseEvent(QMouseEvent*) Q_DECL_OVERRIDE;
/** refreshes the contents of the Cube */
virtual void paintEvent(QPaintEvent*);
void paintEvent(QPaintEvent*) Q_DECL_OVERRIDE;
private:
int m_row;
......
......@@ -51,7 +51,7 @@ public slots:
protected:
/// To make sure all activity ceases before closing.
bool queryClose();
bool queryClose() Q_DECL_OVERRIDE;
private:
Game * m_game;
......
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