aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/profilewidget2.cpp
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2014-12-18 08:47:51 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-12-18 07:22:39 -0800
commit8571268d21deced25ac2cd332f3976f67f953e94 (patch)
treea2cbe1e5ea62db87488c8b783447181b9146bf95 /qt-ui/profile/profilewidget2.cpp
parentbdea7dd0d6bdcbd7aaeedaa366fab72cbabb6762 (diff)
downloadsubsurface-8571268d21deced25ac2cd332f3976f67f953e94.tar.gz
Have ProfileWidget2 delete its allocated data
This creates a destructor for ProfileWidget2 that deletetes its new'ed objects on exit. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/profilewidget2.cpp')
-rw-r--r--qt-ui/profile/profilewidget2.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 649bda0d6..6713d5bcb 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -141,6 +141,37 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent),
#endif
}
+
+ProfileWidget2::~ProfileWidget2()
+{
+ delete background;
+ delete toolTipItem;
+ delete profileYAxis;
+ delete gasYAxis;
+ delete temperatureAxis;
+ delete timeAxis;
+ delete diveProfileItem;
+ delete temperatureItem;
+ delete cylinderPressureAxis;
+ delete gasPressureItem;
+ delete meanDepth;
+ delete diveComputerText;
+ delete diveCeiling;
+ delete reportedCeiling;
+ delete pn2GasItem;
+ delete pheGasItem;
+ delete po2GasItem;
+ delete heartBeatAxis;
+ delete heartBeatItem;
+ delete percentageAxis;
+ delete ambPressureItem;
+ delete gflineItem;
+ delete mouseFollowerVertical;
+ delete mouseFollowerHorizontal;
+ delete rulerItem;
+ delete tankItem;
+}
+
#define SUBSURFACE_OBJ_DATA 1
#define SUBSURFACE_OBJ_DC_TEXT 0x42