From c9499baf2225a0c0584c57b6c47eff53c40249b1 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 16 Jan 2015 18:12:02 -0200 Subject: Fix memleak of QGraphicsRectItem We used to create a new QGraphicsRectItem everytime a Pixmap changed. Since I'm pretty sure I deleted every bit of the PictureItem before setting a new one, no leak was due, but this version is safer. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/profile/divepixmapitem.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qt-ui/profile/divepixmapitem.h') diff --git a/qt-ui/profile/divepixmapitem.h b/qt-ui/profile/divepixmapitem.h index 963e641e8..02c1523f7 100644 --- a/qt-ui/profile/divepixmapitem.h +++ b/qt-ui/profile/divepixmapitem.h @@ -31,6 +31,8 @@ protected: void mousePressEvent(QGraphicsSceneMouseEvent *event); private: QString fileUrl; + QGraphicsRectItem *canvas; + QGraphicsRectItem *shadow; }; class DiveButtonItem : public DivePixmapItem { -- cgit v1.2.3-70-g09d2