diff options
-rw-r--r-- | profile-widget/profilewidget2.cpp | 5 | ||||
-rw-r--r-- | profile-widget/profilewidget2.h | 1 | ||||
-rw-r--r-- | profile-widget/tankitem.cpp | 5 | ||||
-rw-r--r-- | profile-widget/tankitem.h | 1 | ||||
-rw-r--r-- | qt-models/diveplotdatamodel.cpp | 5 | ||||
-rw-r--r-- | qt-models/diveplotdatamodel.h | 1 |
6 files changed, 18 insertions, 0 deletions
diff --git a/profile-widget/profilewidget2.cpp b/profile-widget/profilewidget2.cpp index b778f982c..e065361d3 100644 --- a/profile-widget/profilewidget2.cpp +++ b/profile-widget/profilewidget2.cpp @@ -178,6 +178,11 @@ ProfileWidget2::ProfileWidget2(QWidget *parent) : QGraphicsView(parent), #endif } +ProfileWidget2::~ProfileWidget2() +{ + free_plot_info_data(&plotInfo); +} + #ifndef SUBSURFACE_MOBILE void ProfileWidget2::addActionShortcut(const Qt::Key shortcut, void (ProfileWidget2::*slot)()) { diff --git a/profile-widget/profilewidget2.h b/profile-widget/profilewidget2.h index a5895da63..d2b813e35 100644 --- a/profile-widget/profilewidget2.h +++ b/profile-widget/profilewidget2.h @@ -73,6 +73,7 @@ public: }; ProfileWidget2(QWidget *parent = 0); + ~ProfileWidget2(); void resetZoom(); void scale(qreal sx, qreal sy); void plotDive(const struct dive *d = 0, bool force = false, bool clearPictures = false, bool instant = false); diff --git a/profile-widget/tankitem.cpp b/profile-widget/tankitem.cpp index ea50dd9cf..f40baa357 100644 --- a/profile-widget/tankitem.cpp +++ b/profile-widget/tankitem.cpp @@ -32,6 +32,11 @@ TankItem::TankItem(QObject *parent) : hAxis = nullptr; } +TankItem::~TankItem() +{ + free(pInfoEntry); +} + void TankItem::setData(DivePlotDataModel *model, struct plot_info *plotInfo, struct dive *d) { // If there is nothing to plot, quit early. diff --git a/profile-widget/tankitem.h b/profile-widget/tankitem.h index 73994444b..ff86f787d 100644 --- a/profile-widget/tankitem.h +++ b/profile-widget/tankitem.h @@ -15,6 +15,7 @@ class TankItem : public QObject, public QGraphicsRectItem public: explicit TankItem(QObject *parent = 0); + ~TankItem(); void setHorizontalAxis(DiveCartesianAxis *horizontal); void setData(DivePlotDataModel *model, struct plot_info *plotInfo, struct dive *d); diff --git a/qt-models/diveplotdatamodel.cpp b/qt-models/diveplotdatamodel.cpp index d89ab6f31..164cd04a4 100644 --- a/qt-models/diveplotdatamodel.cpp +++ b/qt-models/diveplotdatamodel.cpp @@ -14,6 +14,11 @@ DivePlotDataModel::DivePlotDataModel(QObject *parent) : memset(&plot_deco_state, 0, sizeof(struct deco_state)); } +DivePlotDataModel::~DivePlotDataModel() +{ + free_plot_info_data(&pInfo); +} + int DivePlotDataModel::columnCount(const QModelIndex&) const { return COLUMNS; diff --git a/qt-models/diveplotdatamodel.h b/qt-models/diveplotdatamodel.h index 87c31198d..6267d3705 100644 --- a/qt-models/diveplotdatamodel.h +++ b/qt-models/diveplotdatamodel.h @@ -73,6 +73,7 @@ public: COLUMNS }; explicit DivePlotDataModel(QObject *parent = 0); + ~DivePlotDataModel(); int columnCount(const QModelIndex &parent = QModelIndex()) const override; QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override; QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; |