diff options
author | Boris Barbulovski <bbarbulovski@gmail.com> | 2014-02-09 19:34:35 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-09 14:42:07 -0800 |
commit | d48910b711166548d4106ec7c659f9df7cb8ca99 (patch) | |
tree | e59d55c9a45d7fd5df0796eb5efa81130b74469f | |
parent | 9ffb459ff365ce1c09e6b7775c486559e39350da (diff) | |
download | subsurface-d48910b711166548d4106ec7c659f9df7cb8ca99.tar.gz |
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>
-rw-r--r-- | qt-ui/diveplanner.cpp | 7 |
1 files 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); |