Commit fbb61319 authored by Laurent Montel's avatar Laurent Montel 😁

Use Q_DECLARE_OVERRIDE

parent 1183c9b8
...@@ -30,7 +30,7 @@ public: ...@@ -30,7 +30,7 @@ public:
ExtManager(); ExtManager();
private: private:
virtual QString gameTypeLabel(uint gameTye, LabelType) const; QString gameTypeLabel(uint gameTye, LabelType) const Q_DECL_OVERRIDE;
QStringList m_typeLabels; QStringList m_typeLabels;
}; };
......
...@@ -80,7 +80,7 @@ class HighscoresList : public ScoresList ...@@ -80,7 +80,7 @@ class HighscoresList : public ScoresList
void load(const ItemArray &, int highlight); void load(const ItemArray &, int highlight);
protected: protected:
QString itemText(const ItemContainer &, uint row) const; QString itemText(const ItemContainer &, uint row) const Q_DECL_OVERRIDE;
}; };
class HighscoresWidget : public QWidget class HighscoresWidget : public QWidget
...@@ -134,8 +134,8 @@ public: ...@@ -134,8 +134,8 @@ public:
LastMultipleScoresList(const QVector<Score> &, QWidget *parent); LastMultipleScoresList(const QVector<Score> &, QWidget *parent);
private: private:
void addLineItem(const ItemArray &, uint index, QTreeWidgetItem *line); void addLineItem(const ItemArray &, uint index, QTreeWidgetItem *line) Q_DECL_OVERRIDE;
QString itemText(const ItemContainer &, uint row) const; QString itemText(const ItemContainer &, uint row) const Q_DECL_OVERRIDE;
private: private:
const QVector<Score> &_scores; const QVector<Score> &_scores;
...@@ -148,8 +148,8 @@ public: ...@@ -148,8 +148,8 @@ public:
TotalMultipleScoresList(const QVector<Score> &, QWidget *parent); TotalMultipleScoresList(const QVector<Score> &, QWidget *parent);
private: private:
void addLineItem(const ItemArray &, uint index, QTreeWidgetItem *line); void addLineItem(const ItemArray &, uint index, QTreeWidgetItem *line) Q_DECL_OVERRIDE;
QString itemText(const ItemContainer &, uint row) const; QString itemText(const ItemContainer &, uint row) const Q_DECL_OVERRIDE;
private: private:
const QVector<Score> &_scores; const QVector<Score> &_scores;
...@@ -167,7 +167,7 @@ class ConfigDialog : public QDialog ...@@ -167,7 +167,7 @@ class ConfigDialog : public QDialog
private slots: private slots:
void modifiedSlot(); void modifiedSlot();
void removeSlot(); void removeSlot();
void accept(); void accept() Q_DECL_OVERRIDE;
void slotApply() { save(); } void slotApply() { save(); }
void nickNameChanged(const QString &); void nickNameChanged(const QString &);
......
...@@ -231,7 +231,7 @@ class ScoreNameItem : public NameItem ...@@ -231,7 +231,7 @@ class ScoreNameItem : public NameItem
ScoreNameItem(const ScoreInfos &score, const PlayerInfos &infos) ScoreNameItem(const ScoreInfos &score, const PlayerInfos &infos)
: _score(score), _infos(infos) {} : _score(score), _infos(infos) {}
QString pretty(uint i, const QVariant &v) const { QString pretty(uint i, const QVariant &v) const Q_DECL_OVERRIDE {
uint id = _score.item(QStringLiteral( "id" ))->read(i).toUInt(); uint id = _score.item(QStringLiteral( "id" ))->read(i).toUInt();
if ( id==0 ) return NameItem::pretty(i, v); if ( id==0 ) return NameItem::pretty(i, v);
return _infos.prettyName(id-1); return _infos.prettyName(id-1);
......
...@@ -54,8 +54,8 @@ class RankItem : public Item ...@@ -54,8 +54,8 @@ class RankItem : public Item
RankItem() RankItem()
: Item((uint)0, i18n("Rank"), Qt::AlignRight) {} : Item((uint)0, i18n("Rank"), Qt::AlignRight) {}
QVariant read(uint i, const QVariant &value) const { Q_UNUSED(value); return i; } QVariant read(uint i, const QVariant &value) const Q_DECL_OVERRIDE { Q_UNUSED(value); return i; }
QString pretty(uint i, const QVariant &value) const QString pretty(uint i, const QVariant &value) const Q_DECL_OVERRIDE
{ Q_UNUSED(value); return QString::number(i+1); } { Q_UNUSED(value); return QString::number(i+1); }
}; };
...@@ -171,7 +171,7 @@ class ScoreInfos : public ItemArray ...@@ -171,7 +171,7 @@ class ScoreInfos : public ItemArray
public: public:
ScoreInfos(uint maxNbEntries, const PlayerInfos &infos); ScoreInfos(uint maxNbEntries, const PlayerInfos &infos);
uint nbEntries() const; uint nbEntries() const Q_DECL_OVERRIDE;
uint maxNbEntries() const { return _maxNbEntries; } uint maxNbEntries() const { return _maxNbEntries; }
private: private:
...@@ -194,7 +194,7 @@ class PlayerInfos : public ItemArray ...@@ -194,7 +194,7 @@ class PlayerInfos : public ItemArray
bool isNewPlayer() const { return _newPlayer; } bool isNewPlayer() const { return _newPlayer; }
bool isOldLocalPlayer() const { return _oldLocalPlayer; } bool isOldLocalPlayer() const { return _oldLocalPlayer; }
uint nbEntries() const; uint nbEntries() const Q_DECL_OVERRIDE;
QString name() const { return item(QStringLiteral( "name" ))->read(_id).toString(); } QString name() const { return item(QStringLiteral( "name" ))->read(_id).toString(); }
bool isAnonymous() const; bool isAnonymous() const;
QString prettyName() const { return prettyName(_id); } QString prettyName() const { return prettyName(_id); }
......
...@@ -77,7 +77,7 @@ class StatisticsTab : public AdditionalTab ...@@ -77,7 +77,7 @@ class StatisticsTab : public AdditionalTab
public: public:
explicit StatisticsTab(QWidget *parent); explicit StatisticsTab(QWidget *parent);
void load(); void load() Q_DECL_OVERRIDE;
private: private:
enum Count { Total = 0, Won, Lost, Draw, Nb_Counts }; enum Count { Total = 0, Won, Lost, Draw, Nb_Counts };
...@@ -92,7 +92,7 @@ class StatisticsTab : public AdditionalTab ...@@ -92,7 +92,7 @@ class StatisticsTab : public AdditionalTab
QLabel *_nbs[Nb_Counts], *_percents[Nb_Counts], *_trends[Nb_Trends]; QLabel *_nbs[Nb_Counts], *_percents[Nb_Counts], *_trends[Nb_Trends];
QString percent(const Data &, Count) const; QString percent(const Data &, Count) const;
void display(uint i); void display(uint i) Q_DECL_OVERRIDE;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -102,14 +102,14 @@ class HistogramTab : public AdditionalTab ...@@ -102,14 +102,14 @@ class HistogramTab : public AdditionalTab
public: public:
HistogramTab(QWidget *parent); HistogramTab(QWidget *parent);
void load(); void load() Q_DECL_OVERRIDE;
private: private:
QVector<uint> _counts; QVector<uint> _counts;
QVector<uint> _data; QVector<uint> _data;
QTreeWidget *_list; QTreeWidget *_list;
void display(uint i); void display(uint i) Q_DECL_OVERRIDE;
}; };
} // namespace } // namespace
......
...@@ -44,10 +44,10 @@ public: ...@@ -44,10 +44,10 @@ public:
/** /**
* Overridden slots from @see KReversiPlayer * Overridden slots from @see KReversiPlayer
*/ */
void prepare(KReversiGame *game); void prepare(KReversiGame *game) Q_DECL_OVERRIDE;
void takeTurn(); void takeTurn() Q_DECL_OVERRIDE;
void skipTurn(); void skipTurn() Q_DECL_OVERRIDE;
void gameOver(); void gameOver() Q_DECL_OVERRIDE;
/** /**
* Sets computer skill * Sets computer skill
......
...@@ -43,10 +43,10 @@ public: ...@@ -43,10 +43,10 @@ public:
/** /**
* Overridden slots from @see KReversiPlayer * Overridden slots from @see KReversiPlayer
*/ */
void prepare(KReversiGame *game); void prepare(KReversiGame *game) Q_DECL_OVERRIDE;
void takeTurn(); void takeTurn() Q_DECL_OVERRIDE;
void skipTurn(); void skipTurn() Q_DECL_OVERRIDE;
void gameOver(); void gameOver() Q_DECL_OVERRIDE;
signals: signals:
......
...@@ -63,7 +63,7 @@ public slots: ...@@ -63,7 +63,7 @@ public slots:
void slotHighscores(); void slotHighscores();
void slotDialogReady(); void slotDialogReady();
private: private:
virtual void showEvent(QShowEvent*); void showEvent(QShowEvent*) Q_DECL_OVERRIDE;
void setupActionsInit(); void setupActionsInit();
void setupActionsStart(); void setupActionsStart();
void setupActionsGame(); void setupActionsGame();
......
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