diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-01-19 23:33:48 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-01-20 09:05:16 +0000 |
commit | e10b4acd4a60182d175b06b461f7b6aef15567dd (patch) | |
tree | e1c874ecc12fc13650710dd43ef5db392217a803 /src/quicktemplates2/qquickscrollbar_p.h | |
parent | fdd41317118cd14fdab472a60ac67516d9d4d937 (diff) |
ScrollBar: fix memory leak when attached to a non-Flickable
We must pass the attachee QObject as a parent instead of passing
a qobject_casted QQuickFlickable, which may be a null pointer.
Change-Id: If3c785beac76ad989d12579e6d41062f4754ba2e
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickscrollbar_p.h')
-rw-r--r-- | src/quicktemplates2/qquickscrollbar_p.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickscrollbar_p.h b/src/quicktemplates2/qquickscrollbar_p.h index 9709f183..512e0b06 100644 --- a/src/quicktemplates2/qquickscrollbar_p.h +++ b/src/quicktemplates2/qquickscrollbar_p.h @@ -144,7 +144,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollBarAttached : public QObject Q_PROPERTY(QQuickScrollBar *vertical READ vertical WRITE setVertical NOTIFY verticalChanged FINAL) public: - explicit QQuickScrollBarAttached(QQuickFlickable *flickable); + explicit QQuickScrollBarAttached(QObject *parent = nullptr); ~QQuickScrollBarAttached(); QQuickScrollBar *horizontal() const; |