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

USe const'ref + nullptr

parent 6a787fa5
......@@ -35,7 +35,7 @@ class ColorScheme : public QQuickItem
Q_PROPERTY(QColor foreground READ foreground NOTIFY placeHolder)
Q_PROPERTY(QColor border READ border NOTIFY placeHolder)
public:
ColorScheme(QQuickItem *parent = 0);
explicit ColorScheme(QQuickItem *parent = nullptr);
QColor background() const;
QColor foreground() const;
......
......@@ -23,7 +23,7 @@
#include "kreversihumanplayer.h"
KReversiHumanPlayer::KReversiHumanPlayer(ChipColor color, QString name):
KReversiHumanPlayer::KReversiHumanPlayer(ChipColor color, const QString &name):
KReversiPlayer(color, name, true, true)
{
}
......
......@@ -38,7 +38,7 @@ public:
/**
* Constructs Human player with specified @p color and @p name
*/
explicit KReversiHumanPlayer(ChipColor color, QString name);
explicit KReversiHumanPlayer(ChipColor color, const QString &name);
/**
* Overridden slots from @see KReversiPlayer
......
......@@ -28,7 +28,7 @@ KReversiView::KReversiView(KReversiGame* game, QWidget *parent, KgThemeProvider
: KgDeclarativeView(parent),
m_provider(provider),
m_delay(ANIMATION_SPEED_NORMAL),
m_game(0),
m_game(nullptr),
m_showLastMove(false),
m_showLegalMoves(false),
m_showLabels(false)
......@@ -118,7 +118,7 @@ void KReversiView::setAnimationSpeed(int speed)
KReversiView::~KReversiView()
{
setGame(0);
setGame(nullptr);
}
void KReversiView::updateBoard()
......
......@@ -45,15 +45,15 @@ static const int COMMON_STATUSBAR_ID = 0;
KReversiMainWindow::KReversiMainWindow(QWidget* parent, bool startDemo)
: KXmlGuiWindow(parent),
m_startDialog(0),
m_view(0),
m_game(0),
m_historyDock(0),
m_historyView(0),
m_startDialog(nullptr),
m_view(nullptr),
m_game(nullptr),
m_historyDock(nullptr),
m_historyView(nullptr),
m_firstShow(true),
m_startInDemoMode(startDemo),
m_undoAct(0),
m_hintAct(0)
m_undoAct(nullptr),
m_hintAct(nullptr)
{
memset(m_player, 0, sizeof(m_player));
......@@ -392,7 +392,7 @@ void KReversiMainWindow::clearPlayers()
if (m_player[i]) {
m_player[i]->disconnect();
delete m_player[i];
m_player[i] = 0;
m_player[i] = nullptr;
}
}
......
......@@ -49,7 +49,7 @@ class KReversiMainWindow : public KXmlGuiWindow
{
Q_OBJECT
public:
explicit KReversiMainWindow(QWidget* parent = 0, bool startDemo = false);
explicit KReversiMainWindow(QWidget* parent = nullptr, bool startDemo = false);
~KReversiMainWindow();
public slots:
void slotNewGame();
......
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