Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
KReversi
Commits
cb1f4114
Commit
cb1f4114
authored
Jun 24, 2017
by
Andrius Štikonas
Browse files
Q_DECL_OVERRIDE -> override.
parent
eae9aceb
Changes
8
Hide whitespace changes
Inline
Side-by-side
highscores.h
View file @
cb1f4114
...
...
@@ -30,7 +30,7 @@ public:
ExtManager
();
private:
QString
gameTypeLabel
(
uint
gameTye
,
LabelType
)
const
Q_DECL_OVERRIDE
;
QString
gameTypeLabel
(
uint
gameTye
,
LabelType
)
const
override
;
QStringList
m_typeLabels
;
};
...
...
kexthighscore_gui.h
View file @
cb1f4114
...
...
@@ -80,7 +80,7 @@ class HighscoresList : public ScoresList
void
load
(
const
ItemArray
&
,
int
highlight
);
protected:
QString
itemText
(
const
ItemContainer
&
,
uint
row
)
const
Q_DECL_OVERRIDE
;
QString
itemText
(
const
ItemContainer
&
,
uint
row
)
const
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
)
Q_DECL_OVERRIDE
;
QString
itemText
(
const
ItemContainer
&
,
uint
row
)
const
Q_DECL_OVERRIDE
;
void
addLineItem
(
const
ItemArray
&
,
uint
index
,
QTreeWidgetItem
*
line
)
override
;
QString
itemText
(
const
ItemContainer
&
,
uint
row
)
const
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
)
Q_DECL_OVERRIDE
;
QString
itemText
(
const
ItemContainer
&
,
uint
row
)
const
Q_DECL_OVERRIDE
;
void
addLineItem
(
const
ItemArray
&
,
uint
index
,
QTreeWidgetItem
*
line
)
override
;
QString
itemText
(
const
ItemContainer
&
,
uint
row
)
const
override
;
private:
const
QVector
<
Score
>
&
_scores
;
...
...
@@ -167,7 +167,7 @@ class ConfigDialog : public QDialog
private
slots
:
void
modifiedSlot
();
void
removeSlot
();
void
accept
()
Q_DECL_OVERRIDE
;
void
accept
()
override
;
void
slotApply
()
{
save
();
}
void
nickNameChanged
(
const
QString
&
);
...
...
kexthighscore_internal.cpp
View file @
cb1f4114
...
...
@@ -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
Q_DECL_OVERRIDE
{
QString
pretty
(
uint
i
,
const
QVariant
&
v
)
const
override
{
uint
id
=
_score
.
item
(
QStringLiteral
(
"id"
))
->
read
(
i
).
toUInt
();
if
(
id
==
0
)
return
NameItem
::
pretty
(
i
,
v
);
return
_infos
.
prettyName
(
id
-
1
);
...
...
kexthighscore_internal.h
View file @
cb1f4114
...
...
@@ -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_DECL_OVERRIDE
{
Q_UNUSED
(
value
);
return
i
;
}
QString
pretty
(
uint
i
,
const
QVariant
&
value
)
const
Q_DECL_OVERRIDE
QVariant
read
(
uint
i
,
const
QVariant
&
value
)
const
override
{
Q_UNUSED
(
value
);
return
i
;
}
QString
pretty
(
uint
i
,
const
QVariant
&
value
)
const
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
Q_DECL_OVERRIDE
;
uint
nbEntries
()
const
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
Q_DECL_OVERRIDE
;
uint
nbEntries
()
const
override
;
QString
name
()
const
{
return
item
(
QStringLiteral
(
"name"
))
->
read
(
_id
).
toString
();
}
bool
isAnonymous
()
const
;
QString
prettyName
()
const
{
return
prettyName
(
_id
);
}
...
...
kexthighscore_tab.h
View file @
cb1f4114
...
...
@@ -77,7 +77,7 @@ class StatisticsTab : public AdditionalTab
public:
explicit
StatisticsTab
(
QWidget
*
parent
);
void
load
()
Q_DECL_OVERRIDE
;
void
load
()
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
)
Q_DECL_OVERRIDE
;
void
display
(
uint
i
)
override
;
};
//-----------------------------------------------------------------------------
...
...
@@ -102,14 +102,14 @@ class HistogramTab : public AdditionalTab
public:
HistogramTab
(
QWidget
*
parent
);
void
load
()
Q_DECL_OVERRIDE
;
void
load
()
override
;
private:
QVector
<
uint
>
_counts
;
QVector
<
uint
>
_data
;
QTreeWidget
*
_list
;
void
display
(
uint
i
)
Q_DECL_OVERRIDE
;
void
display
(
uint
i
)
override
;
};
}
// namespace
...
...
kreversicomputerplayer.h
View file @
cb1f4114
...
...
@@ -44,10 +44,10 @@ public:
/**
* Overridden slots from @see KReversiPlayer
*/
void
prepare
(
KReversiGame
*
game
)
Q_DECL_OVERRIDE
;
void
takeTurn
()
Q_DECL_OVERRIDE
;
void
skipTurn
()
Q_DECL_OVERRIDE
;
void
gameOver
()
Q_DECL_OVERRIDE
;
void
prepare
(
KReversiGame
*
game
)
override
;
void
takeTurn
()
override
;
void
skipTurn
()
override
;
void
gameOver
()
override
;
/**
* Sets computer skill
...
...
kreversihumanplayer.h
View file @
cb1f4114
...
...
@@ -43,10 +43,10 @@ public:
/**
* Overridden slots from @see KReversiPlayer
*/
void
prepare
(
KReversiGame
*
game
)
Q_DECL_OVERRIDE
;
void
takeTurn
()
Q_DECL_OVERRIDE
;
void
skipTurn
()
Q_DECL_OVERRIDE
;
void
gameOver
()
Q_DECL_OVERRIDE
;
void
prepare
(
KReversiGame
*
game
)
override
;
void
takeTurn
()
override
;
void
skipTurn
()
override
;
void
gameOver
()
override
;
signals:
...
...
mainwindow.h
View file @
cb1f4114
...
...
@@ -63,7 +63,7 @@ public slots:
void
slotHighscores
();
void
slotDialogReady
();
private:
void
showEvent
(
QShowEvent
*
)
Q_DECL_OVERRIDE
;
void
showEvent
(
QShowEvent
*
)
override
;
void
setupActionsInit
();
void
setupActionsStart
();
void
setupActionsGame
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment