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>bb10
parent
f805d7075a
commit
f84c502433
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue