From 1e359b07c9a67daa3c98dc93424e884e91f8265f Mon Sep 17 00:00:00 2001 From: Siraj Razick Date: Tue, 13 Mar 2007 00:32:17 +0000 Subject: [PATCH] a possible fix for the memleak svn path=/trunk/KDE/kdebase/workspace/plasma/lib/; revision=641985 --- widgets/checkbox.h | 2 +- widgets/pushbutton.cpp | 3 ++- widgets/pushbutton.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/widgets/checkbox.h b/widgets/checkbox.h index d94434b4f..88edd17bd 100644 --- a/widgets/checkbox.h +++ b/widgets/checkbox.h @@ -42,7 +42,7 @@ class KDE_EXPORT CheckBox : public DataVisualization,public QGraphicsItem public: CheckBox(QGraphicsItem *parent = 0); - ~CheckBox(); + virtual ~CheckBox(); void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); QRectF boundingRect() const; diff --git a/widgets/pushbutton.cpp b/widgets/pushbutton.cpp index 220c2206a..459c24e1b 100644 --- a/widgets/pushbutton.cpp +++ b/widgets/pushbutton.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 by Siraj Razick siraj@kdemail.net + * Copyright (C) 2007 by Siraj Razick siraj@kde.org * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License version 2 as @@ -79,6 +79,7 @@ PushButton::PushButton(QGraphicsItem *parent) PushButton::~PushButton() { +delete d; } QRectF PushButton::boundingRect() const diff --git a/widgets/pushbutton.h b/widgets/pushbutton.h index 7f324b207..2d690e033 100644 --- a/widgets/pushbutton.h +++ b/widgets/pushbutton.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2007 by Siraj Razick siraj@kdemail.net + * Copyright (C) 2007 by Siraj Razick siraj@kde.org * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Library General Public License version 2 as @@ -40,7 +40,7 @@ class KDE_EXPORT PushButton : public DataVisualization,public QGraphicsItem, pub typedef enum {NONE,HOVER,PRESSED,RELEASED} ButtonState; PushButton(QGraphicsItem *parent = 0); - ~PushButton(); + virtual ~PushButton(); void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0); QRectF boundingRect() const;