summaryrefslogtreecommitdiffstats
path: root/src/widgets
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2016-03-31 22:12:00 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2016-04-02 08:50:56 +0000
commitf84c50243365f1a0d3cb3b70c2a5b4dbc4e31257 (patch)
treeebfa71a6221eafaa22c0b83ff600e410f6784e60 /src/widgets
parentf805d7075a86775eccb3a153ffe7e874b103ee4d (diff)
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 <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/widgets')
-rw-r--r--src/widgets/util/qscroller.cpp2
1 files changed, 1 insertions, 1 deletions
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