aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Boris Barbulovski <bbarbulovski@gmail.com>2014-02-09 18:13:34 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-09 14:41:49 -0800
commit2d3e48f4ae0c0137030988451e3fcb42c2320a8d (patch)
tree50fade133ef4860de59bac970e8958d0b2b1e93e /qt-ui
parent9eb47602dd86e3233ee7a0ce1a10e5021c282489 (diff)
downloadsubsurface-2d3e48f4ae0c0137030988451e3fcb42c2320a8d.tar.gz
diveplanner.cpp cleanup
* Add missing DivePlannerPointsModel::tempDive to the constructor initialize list. * ExpanderGraphics class: Construct pointer-variable members into initialize list, Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/diveplanner.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 4e1865fc6..85703bf54 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -1117,7 +1117,7 @@ int DivePlannerPointsModel::rowCount(const QModelIndex& parent) const
return divepoints.count();
}
-DivePlannerPointsModel::DivePlannerPointsModel(QObject* parent): QAbstractTableModel(parent), mode(NOTHING), stagingDive(NULL)
+DivePlannerPointsModel::DivePlannerPointsModel(QObject* parent): QAbstractTableModel(parent), mode(NOTHING), tempDive(NULL), stagingDive(NULL)
{
diveplan.dp = NULL;
}
@@ -1508,13 +1508,14 @@ void DivePlannerPointsModel::createPlan()
CylindersModel::instance()->update();
}
-ExpanderGraphics::ExpanderGraphics(QGraphicsItem* parent): QGraphicsRectItem(parent)
+ExpanderGraphics::ExpanderGraphics(QGraphicsItem* parent) : QGraphicsRectItem(parent),
+ icon(new QGraphicsPixmapItem(this)),
+ increaseBtn(new Button(0, this)),
+ decreaseBtn(new Button(0, this)),
+ bg(new QGraphicsPixmapItem(this)),
+ leftWing(new QGraphicsPixmapItem(this)),
+ rightWing(new QGraphicsPixmapItem(this))
{
- icon = new QGraphicsPixmapItem(this);
- bg = new QGraphicsPixmapItem(this);
- leftWing = new QGraphicsPixmapItem(this);
- rightWing = new QGraphicsPixmapItem(this);
-
QPixmap p;
#define CREATE(item, pixmap) \
p = QPixmap(QString( pixmap ));\
@@ -1526,8 +1527,6 @@ ExpanderGraphics::ExpanderGraphics(QGraphicsItem* parent): QGraphicsRectItem(par
CREATE(rightWing, ":right_wing");
#undef CREATE
- decreaseBtn = new Button(0, this);
- increaseBtn = new Button(0, this);
decreaseBtn->setPixmap(QPixmap(":arrow_down"));
increaseBtn->setPixmap(QPixmap(":arrow_up"));