more diveplanner.cpp improvements

* Move variable members construction to the initializer lists.

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:34:35 +01:00 committed by Dirk Hohndel
parent 9ffb459ff3
commit d48910b711

View file

@ -905,10 +905,11 @@ void Ruler::setColor(const QColor& color)
setPen(defaultPen);
}
Button::Button(QObject* parent, QGraphicsItem *itemParent): QObject(parent), QGraphicsRectItem(itemParent)
Button::Button(QObject* parent, QGraphicsItem *itemParent) : QObject(parent),
QGraphicsRectItem(itemParent),
icon(new QGraphicsPixmapItem(this)),
text(new QGraphicsSimpleTextItem(this))
{
icon = new QGraphicsPixmapItem(this);
text = new QGraphicsSimpleTextItem(this);
icon->setPos(0,0);
text->setPos(0,0);
setFlag(ItemIgnoresTransformations);