From d48910b711166548d4106ec7c659f9df7cb8ca99 Mon Sep 17 00:00:00 2001 From: Boris Barbulovski Date: Sun, 9 Feb 2014 19:34:35 +0100 Subject: more diveplanner.cpp improvements * Move variable members construction to the initializer lists. Signed-off-by: Boris Barbulovski Signed-off-by: Dirk Hohndel --- qt-ui/diveplanner.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 6c2395272..d75e065b8 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -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); -- cgit v1.2.3-70-g09d2