From 064f0d3d23097cb181166c3e966287490773f23c Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Fri, 9 Nov 2018 12:25:01 +0100 Subject: Fix leaking textures and animation resources by software backend QQuickStyleItem1::updatePaintNode assumes every instance of QSGNinePathNode (QSGSoftwareNinePatchNode for software backend) to own new texture object on setTexture. Instance of QQuickAnimationController is also assumed to be deleted by render loop on window destroy. Fixes: QTBUG-69290 Change-Id: Ibd22229108c986c1c115600280482cea01bf4160 Reviewed-by: Andy Nichols --- .../scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp | 7 ++++--- .../scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp | 3 +++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp index 1463681fa3..68341ebb3e 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp @@ -144,10 +144,11 @@ void QSGSoftwareNinePatchNode::setTexture(QSGTexture *texture) QSGSoftwarePixmapTexture *pt = qobject_cast(texture); if (!pt) { qWarning() << "Image used with invalid texture format."; - return; + } else { + m_pixmap = pt->pixmap(); + markDirty(DirtyMaterial); } - m_pixmap = pt->pixmap(); - markDirty(DirtyMaterial); + delete texture; } void QSGSoftwareNinePatchNode::setBounds(const QRectF &bounds) diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp index b400473128..f5a41410ee 100644 --- a/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp +++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp @@ -45,6 +45,7 @@ #include #include +#include #include #include #include @@ -98,6 +99,8 @@ void QSGSoftwareRenderLoop::windowDestroyed(QQuickWindow *window) if (m_windows.size() == 0) { rc->invalidate(); } + + delete d->animationController; } void QSGSoftwareRenderLoop::renderWindow(QQuickWindow *window, bool isNewExpose) -- cgit v1.2.3 From e746e55f2451a800744ccfcbc9f83fdc3a16337c Mon Sep 17 00:00:00 2001 From: Kirill Burtsev Date: Tue, 13 Nov 2018 13:38:15 +0100 Subject: Fix leaking resources by OpenVG scene graph backend Change-Id: I4e67c639d8343e39673ef5ea08bda7af033fb19f Reviewed-by: Andy Nichols --- src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp | 17 ++++++++++++----- src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h | 1 + src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp | 3 +++ 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp b/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp index e45b79706b..b5f6b39c60 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp +++ b/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp @@ -174,7 +174,7 @@ void QSGOpenVGRectangleNode::render() } -QSGOpenVGImageNode::QSGOpenVGImageNode() +QSGOpenVGImageNode::QSGOpenVGImageNode() : m_texture(nullptr), m_owns(false) { // Set Dummy material and geometry to avoid asserts setMaterial((QSGMaterial*)1); @@ -184,9 +184,8 @@ QSGOpenVGImageNode::QSGOpenVGImageNode() QSGOpenVGImageNode::~QSGOpenVGImageNode() { - if (m_owns) { - m_texture->deleteLater(); - } + if (m_owns) + delete m_texture; } void QSGOpenVGImageNode::setRect(const QRectF &rect) @@ -212,6 +211,8 @@ QRectF QSGOpenVGImageNode::sourceRect() const void QSGOpenVGImageNode::setTexture(QSGTexture *texture) { + if (m_owns) + delete m_texture; m_texture = texture; markDirty(DirtyMaterial); } @@ -321,7 +322,7 @@ void QSGOpenVGImageNode::render() } -QSGOpenVGNinePatchNode::QSGOpenVGNinePatchNode() +QSGOpenVGNinePatchNode::QSGOpenVGNinePatchNode() : m_texture(nullptr) { // Set Dummy material and geometry to avoid asserts setMaterial((QSGMaterial*)1); @@ -329,8 +330,14 @@ QSGOpenVGNinePatchNode::QSGOpenVGNinePatchNode() } +QSGOpenVGNinePatchNode::~QSGOpenVGNinePatchNode() +{ + delete m_texture; +} + void QSGOpenVGNinePatchNode::setTexture(QSGTexture *texture) { + delete m_texture; m_texture = texture; markDirty(DirtyMaterial); } diff --git a/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h b/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h index 8e12c27824..e1cd3063a1 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h +++ b/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h @@ -118,6 +118,7 @@ class QSGOpenVGNinePatchNode : public QSGNinePatchNode, public QSGOpenVGRenderab { public: QSGOpenVGNinePatchNode(); + ~QSGOpenVGNinePatchNode(); void setTexture(QSGTexture *texture) override; void setBounds(const QRectF &bounds) override; diff --git a/src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp b/src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp index 9493920100..c41dfd7400 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp +++ b/src/plugins/scenegraph/openvg/qsgopenvgrenderloop.cpp @@ -43,6 +43,7 @@ #include #include +#include #include #include @@ -94,6 +95,8 @@ void QSGOpenVGRenderLoop::windowDestroyed(QQuickWindow *window) } else if (vg && window == vg->window()) { vg->doneCurrent(); } + + delete d->animationController; } void QSGOpenVGRenderLoop::exposureChanged(QQuickWindow *window) -- cgit v1.2.3 From e3c0bb7811407bad1f65ea55639a4b1d1d39be15 Mon Sep 17 00:00:00 2001 From: Antti Kokko Date: Fri, 16 Nov 2018 09:22:25 +0200 Subject: Add changes file for Qt 5.11.3 Change-Id: Ieff361efbedf364469657cc0d1b917560dab1b8c Reviewed-by: Shawn Rutledge --- dist/changes-5.11.3 | 58 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 dist/changes-5.11.3 diff --git a/dist/changes-5.11.3 b/dist/changes-5.11.3 new file mode 100644 index 0000000000..8701cdeed4 --- /dev/null +++ b/dist/changes-5.11.3 @@ -0,0 +1,58 @@ +Qt 5.11.3 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.11.0 through 5.11.2. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +http://doc.qt.io/qt-5/index.html + +The Qt version 5.11 series is binary compatible with the 5.10.x series. +Applications compiled for 5.10 will continue to run with 5.11. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* Qt 5.11.3 Changes * +**************************************************************************** + +**************************************************************************** +* QtQml * +**************************************************************************** + + - [QTBUG-69973] Fixed QML comma operator property lookup failure. + - [QTBUG-70350] Fixed allocation of multi-page executable memory for + INTEGRITY. + - [QTBUG-69996] Fixed undefined behavior in MASM on 64bit architectures. + - [QTBUG-70460] Fixed deadlock in qmlplugindump. + +**************************************************************************** +* QtQuick * +**************************************************************************** + + - Accessibility: The StaticText role for Text items is now only used if + there is no explicit role set. + - Scene Graph: Fixed Leaking of resources in the OpenVG backend. + - [QTBUG-69290] Fixed leaking of textures and animation resources in + software backend. + - [QTBUG-58924] Added a warning message for the case of too many tiles in + a BorderImage. + - [QTBUG-70898] Fixed a crash on nested delivery of mouse or touch presses. + - [QTBUG-64402] Fixed a crash in QQuickAnimatorProxyJob. + - [QTBUG-69059][QTBUG-61144] Fixed confusion about mouse grabbing when + delivering pointer events to a QQuickWindow. + - [QTBUG-59620] Prevented PathView's parent from stealing mouse grabs + during double-flick. + +**************************************************************************** +* Building * +**************************************************************************** + + - [QTBUG-70414] Disabled building of XmlListModel if the "qml-network" + feature is unavailable. + - Enabled building without the "filesystemwatcher" feature. -- cgit v1.2.3