Make sure some class members are initialized (bugs reported by Coverity)

This commit is contained in:
Olivier Teulière 2012-10-11 23:21:32 +02:00
parent 3b466d7254
commit f6ced69c9e
4 changed files with 5 additions and 4 deletions

View file

@ -155,7 +155,7 @@ void BestResults::clear()
PercentResults::PercentResults(float iPercent)
: m_percent(iPercent)
: m_percent(iPercent), m_bestScore(0), m_minScore(0)
{
}

View file

@ -46,7 +46,8 @@ INIT_LOGGER(qt, HistoryWidget);
HistoryWidget::HistoryWidget(QWidget *parent)
: QTreeView(parent), m_history(NULL), m_forPlayer(false), m_isFreeGame(false)
: QTreeView(parent), m_history(NULL), m_game(NULL),
m_forPlayer(false), m_isFreeGame(false)
{
m_colTurn = 0;
m_colRack = 1;

View file

@ -202,7 +202,7 @@ void PlayerWidget::helperChangePass(QString inputLetters)
PlayerTabWidget::PlayerTabWidget(CoordModel &iCoordModel, QWidget *parent)
: QTabWidget(parent), m_coordModel(iCoordModel)
: QTabWidget(parent), m_game(NULL), m_coordModel(iCoordModel)
{
QObject::connect(this, SIGNAL(currentChanged(int)),
this, SLOT(changeCurrentPlayer(int)));

View file

@ -35,7 +35,7 @@ INIT_LOGGER(qt, RackWidget);
RackWidget::RackWidget(QWidget *parent)
: QFrame(parent), m_showOnlyLastTurn(false)
: QFrame(parent), m_game(NULL), m_showOnlyLastTurn(false)
{
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);