summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-06-01 22:52:10 +0200
committerMontel Laurent <[email protected]>2017-06-01 22:52:10 +0200
commitfbb6131978ec1fbc20917a6ee498818c7f8bf394 (patch)
tree1b13cd81ecf14feedfbd96e3e5e18aa8d36dc641
parent1183c9b837827ff7c3a1cf3cc97b73f57edf0ca3 (diff)
Use Q_DECLARE_OVERRIDE
-rw-r--r--highscores.h2
-rw-r--r--kexthighscore_gui.h12
-rw-r--r--kexthighscore_internal.cpp2
-rw-r--r--kexthighscore_internal.h8
-rw-r--r--kexthighscore_tab.h8
-rw-r--r--kreversicomputerplayer.h8
-rw-r--r--kreversihumanplayer.h8
-rw-r--r--mainwindow.h2
8 files changed, 25 insertions, 25 deletions
diff --git a/highscores.h b/highscores.h
index 4b9b6a7..742cb06 100644
--- a/highscores.h
+++ b/highscores.h
@@ -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;
};
diff --git a/kexthighscore_gui.h b/kexthighscore_gui.h
index 4e38e27..f1ee4d1 100644
--- a/kexthighscore_gui.h
+++ b/kexthighscore_gui.h
@@ -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 &);
diff --git a/kexthighscore_internal.cpp b/kexthighscore_internal.cpp
index 6d6563d..b719e7d 100644
--- a/kexthighscore_internal.cpp
+++ b/kexthighscore_internal.cpp
@@ -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);
diff --git a/kexthighscore_internal.h b/kexthighscore_internal.h
index 6fe4303..16251e7 100644
--- a/kexthighscore_internal.h
+++ b/kexthighscore_internal.h
@@ -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); }
diff --git a/kexthighscore_tab.h b/kexthighscore_tab.h
index 4cff254..4f84def 100644
--- a/kexthighscore_tab.h
+++ b/kexthighscore_tab.h
@@ -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
diff --git a/kreversicomputerplayer.h b/kreversicomputerplayer.h
index 73d2558..b304da9 100644
--- a/kreversicomputerplayer.h
+++ b/kreversicomputerplayer.h
@@ -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
diff --git a/kreversihumanplayer.h b/kreversihumanplayer.h
index 3605f73..4fb5a31 100644
--- a/kreversihumanplayer.h
+++ b/kreversihumanplayer.h
@@ -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:
diff --git a/mainwindow.h b/mainwindow.h
index 9741778..c5f8ea1 100644
--- a/mainwindow.h
+++ b/mainwindow.h
@@ -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();