mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 06:15:26 +00:00
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>
This commit is contained in:
parent
bdea7dd0d6
commit
8571268d21
2 changed files with 32 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -120,6 +120,7 @@ slots: // Necessary to call from QAction's signals.
|
|||
void divePlannerHandlerClicked();
|
||||
void divePlannerHandlerReleased();
|
||||
protected:
|
||||
virtual ~ProfileWidget2();
|
||||
virtual void resizeEvent(QResizeEvent *event);
|
||||
virtual void wheelEvent(QWheelEvent *event);
|
||||
virtual void mouseMoveEvent(QMouseEvent *event);
|
||||
|
|
Loading…
Add table
Reference in a new issue