Commit c91ac5d6 authored by Frederik Schwarzer's avatar Frederik Schwarzer

Fix initialization order.

parent e32df1d2
......@@ -28,7 +28,7 @@ const int KReversiGame::DX[KReversiGame::DIRECTIONS_COUNT] = {0, 0, 1, 1, 1, -1,
const int KReversiGame::DY[KReversiGame::DIRECTIONS_COUNT] = {1, -1, 1, 0, -1, 1, 0, -1};
KReversiGame::KReversiGame(KReversiPlayer *blackPlayer, KReversiPlayer *whitePlayer)
: m_curPlayer(Black), m_delay(300)
: m_delay(300), m_curPlayer(Black)
{
m_isReady[White] = m_isReady[Black] = false;
......
......@@ -25,10 +25,14 @@
#include <colorscheme.h>
#include <QStandardPaths>
KReversiView::KReversiView(KReversiGame* game, QWidget *parent, KgThemeProvider *provider) :
KgDeclarativeView(parent), m_delay(ANIMATION_SPEED_NORMAL), m_game(0),
m_showLastMove(false), m_showLegalMoves(false),
m_showLabels(false), m_provider(provider)
KReversiView::KReversiView(KReversiGame* game, QWidget *parent, KgThemeProvider *provider)
: KgDeclarativeView(parent),
m_provider(provider),
m_delay(ANIMATION_SPEED_NORMAL),
m_game(0),
m_showLastMove(false),
m_showLegalMoves(false),
m_showLabels(false)
{
m_provider->setDeclarativeEngine(QStringLiteral("themeProvider"), engine());
......
......@@ -43,10 +43,16 @@ static const int WHITE_STATUSBAR_ID = 2;
static const int COMMON_STATUSBAR_ID = 0;
KReversiMainWindow::KReversiMainWindow(QWidget* parent, bool startDemo)
: KXmlGuiWindow(parent), m_view(0), m_game(0),
m_historyDock(0), m_historyView(0),
m_firstShow(true), m_startInDemoMode(startDemo),
m_undoAct(0), m_hintAct(0), m_startDialog(0)
: KXmlGuiWindow(parent),
m_startDialog(0),
m_view(0),
m_game(0),
m_historyDock(0),
m_historyView(0),
m_firstShow(true),
m_startInDemoMode(startDemo),
m_undoAct(0),
m_hintAct(0)
{
memset(m_player, 0, sizeof(m_player));
......
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