From f84c50243365f1a0d3cb3b70c2a5b4dbc4e31257 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Thu, 31 Mar 2016 22:12:00 +0200 Subject: QScrollerTimer: fix a memory leak The QScrollerTimer instance allocated by QScrollerPrivate was never freed. I've absolutely no idea why QScroller has such a messy d-pointer handling, so go for the easiest approach: exploit the fact that QScrollerPrivate is a QObject and parent the QScrollerTimer to it. Change-Id: I500edc9d0d14b2fb9eec02712229970eb2b9fe81 Task-number: QTBUG-52280 Reviewed-by: Friedemann Kleint --- src/widgets/util/qscroller.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets') diff --git a/src/widgets/util/qscroller.cpp b/src/widgets/util/qscroller.cpp index 92a9dd7202..270f1c5890 100644 --- a/src/widgets/util/qscroller.cpp +++ b/src/widgets/util/qscroller.cpp @@ -187,7 +187,7 @@ class QScrollTimer : public QAbstractAnimation { public: QScrollTimer(QScrollerPrivate *_d) - : d(_d), ignoreUpdate(false), skip(0) + : QAbstractAnimation(_d), d(_d), ignoreUpdate(false), skip(0) { } int duration() const Q_DECL_OVERRIDE -- cgit v1.2.3