ToolTipItem class improvements

* Initialize every ToolTipItem variable member in initialize list.

Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Boris Barbulovski 2014-02-09 19:04:59 +01:00 committed by Dirk Hohndel
parent 9b84f82160
commit 8bb5cd6012

View file

@ -135,12 +135,16 @@ void ToolTipItem::expand()
status = EXPANDED;
}
ToolTipItem::ToolTipItem(QGraphicsItem* parent): QGraphicsPathItem(parent), background(0)
ToolTipItem::ToolTipItem(QGraphicsItem* parent) : QGraphicsPathItem(parent),
background(0),
separator(new QGraphicsLineItem(this)),
title(new QGraphicsSimpleTextItem(tr("Information"), this)),
status(COLLAPSED),
timeAxis(0)
{
title = new QGraphicsSimpleTextItem(tr("Information"), this);
separator = new QGraphicsLineItem(this);
memset(&pInfo, 0, sizeof(pInfo));
setFlags(ItemIgnoresTransformations | ItemIsMovable | ItemClipsChildrenToShape);
status = COLLAPSED;
updateTitlePosition();
setZValue(99);
}