summaryrefslogtreecommitdiffstats
path: root/qt-ui/simplewidgets.h
diff options
context:
space:
mode:
authorGravatar Thiago Macieira <thiago@macieira.org>2013-11-30 09:18:02 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-30 09:25:11 -0800
commitba88a3358d2e8ed6b5486fff4c11bbef785ee959 (patch)
treeb550e7dc2354edfe298bf7e8182d167102ae87d2 /qt-ui/simplewidgets.h
parent58d37e02001d7f54baf35b72dd1323b8886153d9 (diff)
downloadsubsurface-ba88a3358d2e8ed6b5486fff4c11bbef785ee959.tar.gz
Fix memory leak of the MinMaxAvgWidgetPrivate
Found by Dr. Memory, run by Lubomir: Error #63: LEAK 24 direct bytes 0x344f42e8-0x344f4300 + 0 indirect bytes # 0 replace_operator_new [d:\drmemory_package\common\alloc_replace.c:2421] # 1 MinMaxAvgWidget::MinMaxAvgWidget() [qt-ui/simplewidgets.cpp:64] Signed-off-by: Thiago Macieira <thiago@macieira.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/simplewidgets.h')
-rw-r--r--qt-ui/simplewidgets.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/simplewidgets.h b/qt-ui/simplewidgets.h
index 70d61ca59..c924370c5 100644
--- a/qt-ui/simplewidgets.h
+++ b/qt-ui/simplewidgets.h
@@ -17,6 +17,7 @@ class MinMaxAvgWidget : public QWidget{
Q_PROPERTY(double average READ average WRITE setAverage)
public:
MinMaxAvgWidget(QWidget *parent);
+ ~MinMaxAvgWidget();
double minimum() const;
double maximum() const;
double average() const;
@@ -28,7 +29,7 @@ public:
void setAverage(const QString& average);
void clear();
private:
- MinMaxAvgWidgetPrivate *d;
+ QScopedPointer<MinMaxAvgWidgetPrivate> d;
};
class RenumberDialog : public QDialog {