summaryrefslogtreecommitdiffstats
path: root/qt-ui/profile/divepixmapitem.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2015-01-16 18:12:02 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-01-17 10:41:07 +1300
commitc9499baf2225a0c0584c57b6c47eff53c40249b1 (patch)
treea838a3bd1246e5ce77caad49d5c6cdb550881956 /qt-ui/profile/divepixmapitem.h
parent947010991da4b44cbbf1a2e7c63d3f6a65c41404 (diff)
downloadsubsurface-c9499baf2225a0c0584c57b6c47eff53c40249b1.tar.gz
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 <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profile/divepixmapitem.h')
-rw-r--r--qt-ui/profile/divepixmapitem.h2
1 files changed, 2 insertions, 0 deletions
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 {