diff options
Diffstat (limited to 'core/subsurface-qt/DiveObjectHelper.cpp')
-rw-r--r-- | core/subsurface-qt/DiveObjectHelper.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/core/subsurface-qt/DiveObjectHelper.cpp b/core/subsurface-qt/DiveObjectHelper.cpp index 6d625473e..ec4c8d65f 100644 --- a/core/subsurface-qt/DiveObjectHelper.cpp +++ b/core/subsurface-qt/DiveObjectHelper.cpp @@ -60,20 +60,13 @@ DiveObjectHelper::DiveObjectHelper(struct dive *d) : { if (!m_dive) qWarning("Creating DiveObjectHelper from NULL dive"); - m_cyls.clear(); for (int i = 0; i < MAX_CYLINDERS; i++) { //Don't add blank cylinders, only those that have been defined. if (m_dive->cylinder[i].type.description) - m_cyls.append(new CylinderObjectHelper(&m_dive->cylinder[i])); + m_cyls.append(CylinderObjectHelper(&m_dive->cylinder[i])); } } -DiveObjectHelper::~DiveObjectHelper() -{ -while (!m_cyls.isEmpty()) - delete m_cyls.takeFirst(); -} - int DiveObjectHelper::number() const { return m_dive->number; @@ -316,7 +309,7 @@ QString DiveObjectHelper::cylinder(int idx) const return getFormattedCylinder(m_dive, idx); } -QList<CylinderObjectHelper*> DiveObjectHelper::cylinderObjects() const +QVector<CylinderObjectHelper> DiveObjectHelper::cylinderObjects() const { return m_cyls; } |