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

Use Q_DECLARE_OVERRIDE

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