diff --git a/.gitignore b/.gitignore index 1a8e302..0a5ddbd 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ /qtdeclarative-everywhere-opensource-src-5.15.8.tar.xz /qtdeclarative-everywhere-opensource-src-5.15.9.tar.xz /qtdeclarative-everywhere-opensource-src-5.15.10.tar.xz +/qtdeclarative-everywhere-opensource-src-5.15.11.tar.xz diff --git a/0001-Remove-unused-QPointer-QQuickPointerMask.patch b/0001-Remove-unused-QPointer-QQuickPointerMask.patch index c3b8815..a7d74c4 100644 --- a/0001-Remove-unused-QPointer-QQuickPointerMask.patch +++ b/0001-Remove-unused-QPointer-QQuickPointerMask.patch @@ -1,7 +1,7 @@ -From 7a8bd4c2b3213919343359d5933914ffe1d535e0 Mon Sep 17 00:00:00 2001 +From 72c7590b4ede25b2a4fe90847a6c4350e21c6fe9 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Thu, 17 Jun 2021 16:32:28 +0200 -Subject: [PATCH 01/26] Remove unused QPointer +Subject: [PATCH 01/30] Remove unused QPointer Change-Id: I009fa6bbd8599dc3bb2e810176fe20e70ed50851 Reviewed-by: Shawn Rutledge @@ -31,5 +31,5 @@ index fba383e268..0d63618622 100644 QPointF targetStartPos; QPointF lastPos; -- -2.40.1 +2.41.0 diff --git a/0002-QQmlDelegateModel-Refresh-the-view-when-a-column-is-.patch b/0002-QQmlDelegateModel-Refresh-the-view-when-a-column-is-.patch index e199846..53f937d 100644 --- a/0002-QQmlDelegateModel-Refresh-the-view-when-a-column-is-.patch +++ b/0002-QQmlDelegateModel-Refresh-the-view-when-a-column-is-.patch @@ -1,7 +1,7 @@ -From 28c1d895c5220d7f5c49d18ae839feaac0f6e69f Mon Sep 17 00:00:00 2001 +From 51b5565f2647e4c0f298c75e7566252d230e1ba6 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Thu, 23 Sep 2021 03:43:04 +0200 -Subject: [PATCH 02/26] QQmlDelegateModel: Refresh the view when a column is +Subject: [PATCH 02/30] QQmlDelegateModel: Refresh the view when a column is added at 0 It can happen that a model reports n>0 rows but columns=0 (See @@ -174,5 +174,5 @@ index 35f1e2c94d..1722447830 100644 #include "tst_qqmldelegatemodel.moc" -- -2.40.1 +2.41.0 diff --git a/0003-Fix-TapHandler-so-that-it-actually-registers-a-tap.patch b/0003-Fix-TapHandler-so-that-it-actually-registers-a-tap.patch index 5a90797..c232abc 100644 --- a/0003-Fix-TapHandler-so-that-it-actually-registers-a-tap.patch +++ b/0003-Fix-TapHandler-so-that-it-actually-registers-a-tap.patch @@ -1,7 +1,7 @@ -From ac46066b113c8c8b93277f717dd2f90207ed0e85 Mon Sep 17 00:00:00 2001 +From e3e008d519effe76dc0706ce6a9546ee302644f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Arve=20S=C3=A6ther?= Date: Thu, 3 Sep 2020 10:51:01 +0200 -Subject: [PATCH 03/26] Fix TapHandler so that it actually registers a tap +Subject: [PATCH 03/30] Fix TapHandler so that it actually registers a tap This bug caused all quick examples that used the shared\LauncherList.qml to be broken. @@ -69,5 +69,5 @@ index d785d8c0ca..a508de455d 100644 void QQuickSinglePointHandler::handlePointerEventImpl(QQuickPointerEvent *event) -- -2.40.1 +2.41.0 diff --git a/0004-Revert-Fix-TapHandler-so-that-it-actually-registers-.patch b/0004-Revert-Fix-TapHandler-so-that-it-actually-registers-.patch index 503825c..4406c2a 100644 --- a/0004-Revert-Fix-TapHandler-so-that-it-actually-registers-.patch +++ b/0004-Revert-Fix-TapHandler-so-that-it-actually-registers-.patch @@ -1,7 +1,7 @@ -From d6514d71fe897493e76bd5e38bccf9b9159c4880 Mon Sep 17 00:00:00 2001 +From e58a94011ac612496b48b76684f8271d11b98ff0 Mon Sep 17 00:00:00 2001 From: Albert Astals Cid Date: Tue, 16 Nov 2021 22:43:37 +0100 -Subject: [PATCH 04/26] Revert "Fix TapHandler so that it actually registers a +Subject: [PATCH 04/30] Revert "Fix TapHandler so that it actually registers a tap" This reverts commit 36e8ccd434f948e4f11a8f9d59139ec072e41ff5. @@ -57,5 +57,5 @@ index a508de455d..d785d8c0ca 100644 void QQuickSinglePointHandler::handlePointerEventImpl(QQuickPointerEvent *event) -- -2.40.1 +2.41.0 diff --git a/0005-Make-sure-QQuickWidget-and-its-offscreen-window-s-sc.patch b/0005-Make-sure-QQuickWidget-and-its-offscreen-window-s-sc.patch index 2d6de0b..1178f12 100644 --- a/0005-Make-sure-QQuickWidget-and-its-offscreen-window-s-sc.patch +++ b/0005-Make-sure-QQuickWidget-and-its-offscreen-window-s-sc.patch @@ -1,7 +1,7 @@ -From b02c8610176e1d1ceb65ac5d832d3a21c5a79d47 Mon Sep 17 00:00:00 2001 +From 1a7956f606047d4ec669f5759f88d7f34a912589 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sat, 29 Jan 2022 21:59:33 +0200 -Subject: [PATCH 05/26] Make sure QQuickWidget and its offscreen window's +Subject: [PATCH 05/30] Make sure QQuickWidget and its offscreen window's screens are always in sync By default, the offscreen window is placed on the primary screen. @@ -20,7 +20,7 @@ Reviewed-by: Laszlo Agocs 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp -index 39780f8de3..223d91f579 100644 +index cf021d9a7c..c791f209cf 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -106,6 +106,7 @@ void QQuickWidgetPrivate::init(QQmlEngine* e) @@ -42,7 +42,7 @@ index 39780f8de3..223d91f579 100644 QOpenGLContext *shareContext = qt_gl_global_share_context(); if (!shareContext) shareContext = QWidgetPrivate::get(q->window())->shareContext(); -@@ -1520,19 +1519,16 @@ bool QQuickWidget::event(QEvent *e) +@@ -1527,19 +1526,16 @@ bool QQuickWidget::event(QEvent *e) d->handleWindowChange(); break; @@ -70,7 +70,7 @@ index 39780f8de3..223d91f579 100644 if (d->useSoftwareRenderer #if QT_CONFIG(opengl) -@@ -1545,7 +1541,7 @@ bool QQuickWidget::event(QEvent *e) +@@ -1552,7 +1548,7 @@ bool QQuickWidget::event(QEvent *e) d->render(true); } break; @@ -80,5 +80,5 @@ index 39780f8de3..223d91f579 100644 case QEvent::Move: d->updatePosition(); -- -2.40.1 +2.41.0 diff --git a/0006-QQuickItem-Guard-against-cycles-in-nextPrevItemInTab.patch b/0006-QQuickItem-Guard-against-cycles-in-nextPrevItemInTab.patch index 9e5b865..a2e8f91 100644 --- a/0006-QQuickItem-Guard-against-cycles-in-nextPrevItemInTab.patch +++ b/0006-QQuickItem-Guard-against-cycles-in-nextPrevItemInTab.patch @@ -1,7 +1,7 @@ -From d1d910545103549912d1b51383a5ace872dfb1f8 Mon Sep 17 00:00:00 2001 +From 8fd89860de65760e082e5b9cb2bbfabfe5df309b Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Wed, 4 May 2022 09:10:54 +0200 -Subject: [PATCH 06/26] QQuickItem: Guard against cycles in +Subject: [PATCH 06/30] QQuickItem: Guard against cycles in nextPrevItemInTabFocusChain MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -118,5 +118,5 @@ index c8f251dbe1..c8ef36ee68 100644 { if (!qt_tab_all_widgets()) -- -2.40.1 +2.41.0 diff --git a/0007-Don-t-convert-QByteArray-in-startDrag.patch b/0007-Don-t-convert-QByteArray-in-startDrag.patch index 9071a18..638f6d9 100644 --- a/0007-Don-t-convert-QByteArray-in-startDrag.patch +++ b/0007-Don-t-convert-QByteArray-in-startDrag.patch @@ -1,7 +1,7 @@ -From 70a38e3c897e3ba72b50413d0f994c9f5ebaffd8 Mon Sep 17 00:00:00 2001 +From c416839e41ac65cd559176617525a3fb26ca6e2a Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Tue, 1 Nov 2022 22:35:24 +0800 -Subject: [PATCH 07/26] Don't convert QByteArray in `startDrag` +Subject: [PATCH 07/30] Don't convert QByteArray in `startDrag` QMimeData::setData expects the provided data to contain the correctly encoded QByteArray, so if the variant contains a QByteArray, then take @@ -56,5 +56,5 @@ index 8321fcfeed..3b50370355 100644 drag->setMimeData(mimeData); if (pixmapLoader.isReady()) { -- -2.40.1 +2.41.0 diff --git a/0008-Fix-build-after-95290f66b806a307b8da1f72f8fc2c698019.patch b/0008-Fix-build-after-95290f66b806a307b8da1f72f8fc2c698019.patch index f770d7d..7b8c087 100644 --- a/0008-Fix-build-after-95290f66b806a307b8da1f72f8fc2c698019.patch +++ b/0008-Fix-build-after-95290f66b806a307b8da1f72f8fc2c698019.patch @@ -1,7 +1,7 @@ -From 63d011a519c1fee2a0f5dbcc204def9e950a168b Mon Sep 17 00:00:00 2001 +From 21b1f493febf597b5a4c268970a5285436435466 Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Sat, 5 Nov 2022 18:48:41 +0100 -Subject: [PATCH 08/26] Fix build after +Subject: [PATCH 08/30] Fix build after 95290f66b806a307b8da1f72f8fc2c69801933d0 --- @@ -22,5 +22,5 @@ index 3b50370355..383078b3b9 100644 else mimeData->setData(it.key(), it.value().toString().toUtf8()); -- -2.40.1 +2.41.0 diff --git a/0009-Implement-accessibility-for-QQuickWidget.patch b/0009-Implement-accessibility-for-QQuickWidget.patch index 79a625c..8931c80 100644 --- a/0009-Implement-accessibility-for-QQuickWidget.patch +++ b/0009-Implement-accessibility-for-QQuickWidget.patch @@ -1,7 +1,7 @@ -From 95f4632430db5668fa022983c76e4f6bde74c33d Mon Sep 17 00:00:00 2001 +From e88fbf0d32d56eea40c8aec75e81b40f21c581a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Fri, 7 May 2021 10:07:50 +0200 -Subject: [PATCH 09/26] Implement accessibility for QQuickWidget +Subject: [PATCH 09/30] Implement accessibility for QQuickWidget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -469,7 +469,7 @@ index 0000000000..8c63b09f81 + +#endif diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp -index 223d91f579..9c97b43518 100644 +index c791f209cf..b0117683f7 100644 --- a/src/quickwidgets/qquickwidget.cpp +++ b/src/quickwidgets/qquickwidget.cpp @@ -39,6 +39,7 @@ @@ -561,5 +561,5 @@ index 2438e577ae..f46deb54ac 100644 load(qt_module) -- -2.40.1 +2.41.0 diff --git a/0010-Send-ObjectShow-event-for-visible-components-after-i.patch b/0010-Send-ObjectShow-event-for-visible-components-after-i.patch index e6df5cd..4e4c486 100644 --- a/0010-Send-ObjectShow-event-for-visible-components-after-i.patch +++ b/0010-Send-ObjectShow-event-for-visible-components-after-i.patch @@ -1,7 +1,7 @@ -From ffa3c975270c5026be40912451a289492956f01c Mon Sep 17 00:00:00 2001 +From 1d44e89e1ec8a8b9d68035b0cb379dc698673c41 Mon Sep 17 00:00:00 2001 From: Fushan Wen Date: Sat, 5 Nov 2022 01:44:30 +0800 -Subject: [PATCH 10/26] Send ObjectShow event for visible components after +Subject: [PATCH 10/30] Send ObjectShow event for visible components after initialized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -42,5 +42,5 @@ index ec55fb2998..499fb61d1b 100644 QQuickStateGroup *QQuickItemPrivate::_states() -- -2.40.1 +2.41.0 diff --git a/0011-QQuickItem-avoid-emitting-signals-during-destruction.patch b/0011-QQuickItem-avoid-emitting-signals-during-destruction.patch index d035109..ac36fc8 100644 --- a/0011-QQuickItem-avoid-emitting-signals-during-destruction.patch +++ b/0011-QQuickItem-avoid-emitting-signals-during-destruction.patch @@ -1,7 +1,7 @@ -From 2384b04415045b2203894b24a3743b03eeadbc88 Mon Sep 17 00:00:00 2001 +From 5e53b663378216edbaef243d4e91eaaf45d39e61 Mon Sep 17 00:00:00 2001 From: Volker Hilsheimer Date: Wed, 9 Nov 2022 15:34:11 +0100 -Subject: [PATCH 11/26] QQuickItem: avoid emitting signals during destruction +Subject: [PATCH 11/30] QQuickItem: avoid emitting signals during destruction If a QQuickItem is in the QQuickItem destructor, then it is both unsafe and unnecessary to emit property change notifications. Connected code @@ -109,5 +109,5 @@ index 841d91bb40..ade8fb61f2 100644 enum DirtyType { TransformOrigin = 0x00000001, -- -2.40.1 +2.41.0 diff --git a/0012-a11y-track-item-enabled-state.patch b/0012-a11y-track-item-enabled-state.patch index 74392fd..05eed64 100644 --- a/0012-a11y-track-item-enabled-state.patch +++ b/0012-a11y-track-item-enabled-state.patch @@ -1,7 +1,7 @@ -From 5b6faa5cc115d5be8b2300e059592f8dd1a84ac8 Mon Sep 17 00:00:00 2001 +From 3fcbf3c50d392401060d4ea65e9bc2f4760ebda3 Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Mon, 28 Nov 2022 14:59:33 +0100 -Subject: [PATCH 12/26] a11y: track item enabled state +Subject: [PATCH 12/30] a11y: track item enabled state MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -53,5 +53,5 @@ index 5ee2a440a3..c370d6e5c3 100644 } -- -2.40.1 +2.41.0 diff --git a/0013-Make-QaccessibleQuickWidget-private-API.patch b/0013-Make-QaccessibleQuickWidget-private-API.patch index 8e3d079..8d3e8c9 100644 --- a/0013-Make-QaccessibleQuickWidget-private-API.patch +++ b/0013-Make-QaccessibleQuickWidget-private-API.patch @@ -1,7 +1,7 @@ -From 3d4ff545a998066f563d03bd0e0da6aee81e811d Mon Sep 17 00:00:00 2001 +From 4623a7384e6c16b2b5493cbdb9e9d5fcd39a36a5 Mon Sep 17 00:00:00 2001 From: Fabian Kosmale Date: Tue, 1 Jun 2021 16:40:44 +0200 -Subject: [PATCH 13/26] Make QaccessibleQuickWidget private API +Subject: [PATCH 13/30] Make QaccessibleQuickWidget private API Its base class is private API, so it should be private API, too. @@ -83,5 +83,5 @@ index f46deb54ac..85d156b8a3 100644 SOURCES += \ -- -2.40.1 +2.41.0 diff --git a/0014-Qml-Don-t-crash-when-as-casting-to-type-with-errors.patch b/0014-Qml-Don-t-crash-when-as-casting-to-type-with-errors.patch index 91a02b0..ecba269 100644 --- a/0014-Qml-Don-t-crash-when-as-casting-to-type-with-errors.patch +++ b/0014-Qml-Don-t-crash-when-as-casting-to-type-with-errors.patch @@ -1,7 +1,7 @@ -From 0d21fc0cb74c01368107bf2779c34e5734b5e5ae Mon Sep 17 00:00:00 2001 +From 63fbc2eac56cc0df72bbe4287e777e8db334db96 Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Tue, 30 Nov 2021 14:39:48 +0100 -Subject: [PATCH 14/26] Qml: Don't crash when as-casting to type with errors +Subject: [PATCH 14/30] Qml: Don't crash when as-casting to type with errors Such types don't have a compilation unit, but we still know their names. @@ -39,10 +39,10 @@ index 175de8b936..a6ba4b8cb3 100644 myQmlType = qenginepriv->metaObjectForType(myTypeId); } diff --git a/src/qml/types/qqmlconnections.cpp b/src/qml/types/qqmlconnections.cpp -index 29ed62cd39..aba930dfe1 100644 +index 4a4e6ce12c..a5889b7396 100644 --- a/src/qml/types/qqmlconnections.cpp +++ b/src/qml/types/qqmlconnections.cpp -@@ -338,7 +338,7 @@ void QQmlConnections::connectSignalsToMethods() +@@ -341,7 +341,7 @@ void QQmlConnections::connectSignalsToMethods() && propName.at(2).isUpper()) { qmlWarning(this) << tr("Detected function \"%1\" in Connections element. " "This is probably intended to be a signal handler but no " @@ -75,18 +75,18 @@ index 0000000000..bd88d14c76 + property var selfAsBroken: self as Broken +} diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp -index bffb62c59e..97cc64991f 100644 +index 1be1533b63..dfc82011c6 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp -@@ -336,6 +336,7 @@ private slots: +@@ -337,6 +337,7 @@ private slots: void bareInlineComponent(); void hangOnWarning(); + void objectAsBroken(); void ambiguousContainingType(); - -@@ -5876,6 +5877,21 @@ void tst_qqmllanguage::ambiguousContainingType() + void staticConstexprMembers(); +@@ -5939,6 +5940,21 @@ void tst_qqmllanguage::bindingAliasToComponentUrl() } } @@ -109,5 +109,5 @@ index bffb62c59e..97cc64991f 100644 #include "tst_qqmllanguage.moc" -- -2.40.1 +2.41.0 diff --git a/0015-Fix-missing-glyphs-when-using-NativeRendering.patch b/0015-Fix-missing-glyphs-when-using-NativeRendering.patch deleted file mode 100644 index c55fdb3..0000000 --- a/0015-Fix-missing-glyphs-when-using-NativeRendering.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 4f645419ab8def41d1bdddddc5976b2ff5620bff Mon Sep 17 00:00:00 2001 -From: Eskil Abrahamsen Blomfeldt -Date: Mon, 19 Dec 2022 10:05:33 +0100 -Subject: [PATCH 15/26] Fix missing glyphs when using NativeRendering - -When we look up glyphs with subpixel positions in the glyph cache, -we use the calculated subpixel position (from a set of predefined -subpixel positions) as key. In some very rare cases, we could end -up with different subpixel positions when looking up an on-screen -position than when we entered it into the cache, due to numerical -differences when doing the calculation. - -The reason for this was that when entering the glyph into the -cache, we used the 16.6 fixed point representation, whereas when -looking up, we used the unmodified float. In some cases, the -converted fixed point approximation might snap to a different -predefined subpixel position than the floating point equivalent. - -To avoid this, we reuse the converted fixed point positions when -looking up the glyphs in the cache. - -[ChangeLog][Text] Fixed an issue where text using NativeRendering -would sometimes be missing glyphs. - -Pick-to: 5.15 6.2 6.4 6.5 -Fixes: QTBUG-108713 -Change-Id: Iecc264eb3d27e875c24257eaefcfb18a1a5fb5be -Reviewed-by: Qt CI Bot -Reviewed-by: Lars Knoll -(cherry picked from commit 4bad329985b75090c68a70cceee7edadc172d7ab) ---- - src/quick/scenegraph/qsgdefaultglyphnode_p.cpp | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp -index f912da5799..fd128aa06e 100644 ---- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp -+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp -@@ -839,9 +839,11 @@ void QSGTextMaskMaterial::populate(const QPointF &p, - bool supportsSubPixelPositions = fontD->fontEngine->supportsSubPixelPositions(); - for (int i=0; ifontEngine->subPixelPositionForX(QFixed::fromReal(glyphPosition.x())); -+ subPixelPosition = fontD->fontEngine->subPixelPositionForX(QFixed::fromReal(fixedPointPosition.x.toReal() * glyphCacheScaleX)); - - QTextureGlyphCache::GlyphAndSubPixelPosition glyph(glyphIndexes.at(i), subPixelPosition); - const QTextureGlyphCache::Coord &c = cache->coords.value(glyph); --- -2.40.1 - diff --git a/0015-QQmlImportDatabase-Make-sure-the-newly-added-import-.patch b/0015-QQmlImportDatabase-Make-sure-the-newly-added-import-.patch new file mode 100644 index 0000000..e1296f9 --- /dev/null +++ b/0015-QQmlImportDatabase-Make-sure-the-newly-added-import-.patch @@ -0,0 +1,57 @@ +From 752b5bfa37c0b059883f52fcec4a41efc78521ad Mon Sep 17 00:00:00 2001 +From: Jaeyoon Jung +Date: Fri, 19 Feb 2021 08:11:57 +0900 +Subject: [PATCH 15/30] QQmlImportDatabase: Make sure the newly added import + path be first + +If it already exists in the import list, move it to the first place. +This is as per the description of QQmlEngine::addImportPath: +| The newly added path will be first in the importPathList(). + +Change-Id: I782d355c46ada2a46cff72e63326208f39028e01 +Reviewed-by: Ulf Hermann +(cherry picked from commit 3e413803c698d21f398daf0450c8f501204eb167) +--- + src/qml/qml/qqmlimport.cpp | 9 ++++++--- + tests/auto/qml/qqmlimport/tst_qqmlimport.cpp | 5 +++++ + 2 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp +index e7263d1850..289f11d006 100644 +--- a/src/qml/qml/qqmlimport.cpp ++++ b/src/qml/qml/qqmlimport.cpp +@@ -2119,9 +2119,12 @@ void QQmlImportDatabase::addImportPath(const QString& path) + cPath.replace(Backslash, Slash); + } + +- if (!cPath.isEmpty() +- && !fileImportPath.contains(cPath)) +- fileImportPath.prepend(cPath); ++ if (!cPath.isEmpty()) { ++ if (fileImportPath.contains(cPath)) ++ fileImportPath.move(fileImportPath.indexOf(cPath), 0); ++ else ++ fileImportPath.prepend(cPath); ++ } + } + + /*! +diff --git a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp +index 9c865b3f73..1f788f7a7f 100644 +--- a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp ++++ b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp +@@ -154,6 +154,11 @@ void tst_QQmlImport::importPathOrder() + engine.addImportPath(QT_QMLTEST_DATADIR); + expectedImportPaths.prepend(QT_QMLTEST_DATADIR); + QCOMPARE(expectedImportPaths, engine.importPathList()); ++ ++ // Add qml2Imports again to make it the first of the list ++ engine.addImportPath(qml2Imports); ++ expectedImportPaths.move(expectedImportPaths.indexOf(qml2Imports), 0); ++ QCOMPARE(expectedImportPaths, engine.importPathList()); + } + + Q_DECLARE_METATYPE(QQmlImports::ImportVersion) +-- +2.41.0 + diff --git a/0016-QQuickState-when-handle-QJSValue-properties-correctl.patch b/0016-QQuickState-when-handle-QJSValue-properties-correctl.patch new file mode 100644 index 0000000..c0e003a --- /dev/null +++ b/0016-QQuickState-when-handle-QJSValue-properties-correctl.patch @@ -0,0 +1,102 @@ +From d790abcf04fde46d1d8ecdf8268a1a71c085c651 Mon Sep 17 00:00:00 2001 +From: Fabian Kosmale +Date: Wed, 20 Jul 2022 11:44:43 +0200 +Subject: [PATCH 16/30] QQuickState::when: handle QJSValue properties correctly + +If one assigns a binding whose evaluation results in a QJSValue, care +must be take to correctly convert it into a bool. Instead of directly +using QVariant::value, one needs to first extract the QJSValue, +and only convert it to bool afterwards. +This is necessary due to the custom binding evaluation we're doing to +avoid state oscillation. +Amends a8c729d83979fb0b9939044d246e73b1d578e65b. + +Fixes: QTBUG-105000 +Pick-to: 6.4 6.3 6.2 5.15 +Change-Id: I4b093b48edecf9e0f09d2b54d10c2ff527f24ac3 +Reviewed-by: Ulf Hermann +(cherry picked from commit 2c31d25a44b1221c151681e1bb68ef78618e0166) +--- + src/quick/util/qquickstategroup.cpp | 10 ++++++++-- + .../quick/qquickstates/data/jsValueWhen.qml | 18 ++++++++++++++++++ + .../quick/qquickstates/tst_qquickstates.cpp | 11 +++++++++++ + 3 files changed, 37 insertions(+), 2 deletions(-) + create mode 100644 tests/auto/quick/qquickstates/data/jsValueWhen.qml + +diff --git a/src/quick/util/qquickstategroup.cpp b/src/quick/util/qquickstategroup.cpp +index 7cb3138618..f732b1eb4a 100644 +--- a/src/quick/util/qquickstategroup.cpp ++++ b/src/quick/util/qquickstategroup.cpp +@@ -381,8 +381,14 @@ bool QQuickStateGroupPrivate::updateAutoState() + const auto potentialWhenBinding = QQmlPropertyPrivate::binding(whenProp); + // if there is a binding, the value in when might not be up-to-date at this point + // so we manually reevaluate the binding +- if (auto abstractBinding = dynamic_cast(potentialWhenBinding)) +- whenValue = abstractBinding->evaluate().toBool(); ++ if (auto abstractBinding = dynamic_cast(potentialWhenBinding)) { ++ QVariant evalResult = abstractBinding->evaluate(); ++ if (evalResult.userType() == qMetaTypeId()) ++ whenValue = evalResult.value().toBool(); ++ else ++ whenValue = evalResult.toBool(); ++ } ++ + if (whenValue) { + if (stateChangeDebug()) + qWarning() << "Setting auto state due to expression"; +diff --git a/tests/auto/quick/qquickstates/data/jsValueWhen.qml b/tests/auto/quick/qquickstates/data/jsValueWhen.qml +new file mode 100644 +index 0000000000..6d5eb1600c +--- /dev/null ++++ b/tests/auto/quick/qquickstates/data/jsValueWhen.qml +@@ -0,0 +1,18 @@ ++import QtQuick 2.15 ++ ++Item { ++ id: root ++ property var prop: null ++ property bool works: false ++ states: [ ++ State { ++ name: "mystate" ++ when: root.prop ++ PropertyChanges { ++ target: root ++ works: "works" ++ } ++ } ++ ] ++ Component.onCompleted: root.prop = new Object ++} +diff --git a/tests/auto/quick/qquickstates/tst_qquickstates.cpp b/tests/auto/quick/qquickstates/tst_qquickstates.cpp +index aa55b42935..26e86672b0 100644 +--- a/tests/auto/quick/qquickstates/tst_qquickstates.cpp ++++ b/tests/auto/quick/qquickstates/tst_qquickstates.cpp +@@ -188,6 +188,7 @@ private slots: + void revertListMemoryLeak(); + void duplicateStateName(); + void trivialWhen(); ++ void jsValueWhen(); + void noStateOsciallation(); + void parentChangeCorrectReversal(); + void revertNullObjectBinding(); +@@ -1734,6 +1735,16 @@ void tst_qquickstates::trivialWhen() + QVERIFY(c.create()); + } + ++void tst_qquickstates::jsValueWhen() ++{ ++ QQmlEngine engine; ++ ++ QQmlComponent c(&engine, testFileUrl("jsValueWhen.qml")); ++ QScopedPointer root(c.create()); ++ QVERIFY(root); ++ QVERIFY(root->property("works").toBool()); ++} ++ + void tst_qquickstates::noStateOsciallation() + { + QQmlEngine engine; +-- +2.41.0 + diff --git a/0016-Revert-Fix-missing-glyphs-when-using-NativeRendering.patch b/0016-Revert-Fix-missing-glyphs-when-using-NativeRendering.patch deleted file mode 100644 index 405403f..0000000 --- a/0016-Revert-Fix-missing-glyphs-when-using-NativeRendering.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 187bb66368921ce4a6522aca78531714485c377c Mon Sep 17 00:00:00 2001 -From: Fushan Wen -Date: Tue, 10 Jan 2023 20:42:04 +0800 -Subject: [PATCH 16/26] Revert "Fix missing glyphs when using NativeRendering" - -This reverts commit da5e53b649f50cd9cdd89dadbba16f05e4070be2. - -It breaks fonts on Wayland when global scale > 100%. ---- - src/quick/scenegraph/qsgdefaultglyphnode_p.cpp | 4 +--- - 1 file changed, 1 insertion(+), 3 deletions(-) - -diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp -index fd128aa06e..f912da5799 100644 ---- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp -+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp -@@ -839,11 +839,9 @@ void QSGTextMaskMaterial::populate(const QPointF &p, - bool supportsSubPixelPositions = fontD->fontEngine->supportsSubPixelPositions(); - for (int i=0; ifontEngine->subPixelPositionForX(QFixed::fromReal(fixedPointPosition.x.toReal() * glyphCacheScaleX)); -+ subPixelPosition = fontD->fontEngine->subPixelPositionForX(QFixed::fromReal(glyphPosition.x())); - - QTextureGlyphCache::GlyphAndSubPixelPosition glyph(glyphIndexes.at(i), subPixelPosition); - const QTextureGlyphCache::Coord &c = cache->coords.value(glyph); --- -2.40.1 - diff --git a/0017-Models-Avoid-crashes-when-deleting-cache-items.patch b/0017-Models-Avoid-crashes-when-deleting-cache-items.patch new file mode 100644 index 0000000..4f4fb81 --- /dev/null +++ b/0017-Models-Avoid-crashes-when-deleting-cache-items.patch @@ -0,0 +1,162 @@ +From 4e9cc24046159483e47142cadbf432ff5d76981d Mon Sep 17 00:00:00 2001 +From: Ulf Hermann +Date: Wed, 29 Mar 2023 16:36:03 +0200 +Subject: [PATCH 17/30] Models: Avoid crashes when deleting cache items + +Pick-to: 6.5 6.2 5.15 +Fixes: QTBUG-91425 +Change-Id: I58cf9ee29922f83fc6621f771b80ed557b31f106 +Reviewed-by: Shawn Rutledge +Reviewed-by: Fabian Kosmale +(cherry picked from commit 0cfdecba54e4f40468c4c9a8a6668cc1bc0eff65) + +* asturmlechner 2023-04-08: Resolve conflict with dev branch commit + c2d490a2385ea6f389340a296acaac0fa198c8b9 (qAsConst to std::as_const) +--- + src/qmlmodels/qqmldelegatemodel.cpp | 23 ++++++--- + .../qml/qqmldelegatemodel/data/deleteRace.qml | 50 +++++++++++++++++++ + .../tst_qqmldelegatemodel.cpp | 12 +++++ + 3 files changed, 78 insertions(+), 7 deletions(-) + create mode 100644 tests/auto/qml/qqmldelegatemodel/data/deleteRace.qml + +diff --git a/src/qmlmodels/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp +index 4157899aa6..5b7e767ae2 100644 +--- a/src/qmlmodels/qqmldelegatemodel.cpp ++++ b/src/qmlmodels/qqmldelegatemodel.cpp +@@ -1883,10 +1883,15 @@ void QQmlDelegateModelPrivate::emitChanges() + for (int i = 1; i < m_groupCount; ++i) + QQmlDelegateModelGroupPrivate::get(m_groups[i])->emitModelUpdated(reset); + +- auto cacheCopy = m_cache; // deliberate; emitChanges may alter m_cache +- for (QQmlDelegateModelItem *cacheItem : qAsConst(cacheCopy)) { +- if (cacheItem->attached) +- cacheItem->attached->emitChanges(); ++ // emitChanges may alter m_cache and delete items ++ QVarLengthArray> attachedObjects; ++ attachedObjects.reserve(m_cache.length()); ++ for (const QQmlDelegateModelItem *cacheItem : qAsConst(m_cache)) ++ attachedObjects.append(cacheItem->attached); ++ ++ for (const QPointer &attached : qAsConst(attachedObjects)) { ++ if (attached && attached->m_cacheItem) ++ attached->emitChanges(); + } + } + +@@ -2707,20 +2712,24 @@ void QQmlDelegateModelAttached::emitChanges() + m_previousGroups = m_cacheItem->groups; + + int indexChanges = 0; +- for (int i = 1; i < m_cacheItem->metaType->groupCount; ++i) { ++ const int groupCount = m_cacheItem->metaType->groupCount; ++ for (int i = 1; i < groupCount; ++i) { + if (m_previousIndex[i] != m_currentIndex[i]) { + m_previousIndex[i] = m_currentIndex[i]; + indexChanges |= (1 << i); + } + } + ++ // Don't access m_cacheItem anymore once we've started sending signals. ++ // We don't own it and someone might delete it. ++ + int notifierId = 0; + const QMetaObject *meta = metaObject(); +- for (int i = 1; i < m_cacheItem->metaType->groupCount; ++i, ++notifierId) { ++ for (int i = 1; i < groupCount; ++i, ++notifierId) { + if (groupChanges & (1 << i)) + QMetaObject::activate(this, meta, notifierId, nullptr); + } +- for (int i = 1; i < m_cacheItem->metaType->groupCount; ++i, ++notifierId) { ++ for (int i = 1; i < groupCount; ++i, ++notifierId) { + if (indexChanges & (1 << i)) + QMetaObject::activate(this, meta, notifierId, nullptr); + } +diff --git a/tests/auto/qml/qqmldelegatemodel/data/deleteRace.qml b/tests/auto/qml/qqmldelegatemodel/data/deleteRace.qml +new file mode 100644 +index 0000000000..23874970e7 +--- /dev/null ++++ b/tests/auto/qml/qqmldelegatemodel/data/deleteRace.qml +@@ -0,0 +1,50 @@ ++import QtQuick 2.15 ++import QtQml.Models 2.15 ++ ++Item { ++ DelegateModel { ++ id: delegateModel ++ model: ListModel { ++ id: sourceModel ++ ++ ListElement { title: "foo" } ++ ListElement { title: "bar" } ++ ++ function clear() { ++ if (count > 0) ++ remove(0, count); ++ } ++ } ++ ++ groups: [ ++ DelegateModelGroup { name: "selectedItems" } ++ ] ++ ++ delegate: Text { ++ height: DelegateModel.inSelectedItems ? implicitHeight * 2 : implicitHeight ++ Component.onCompleted: { ++ if (index === 0) ++ DelegateModel.inSelectedItems = true; ++ } ++ } ++ ++ Component.onCompleted: { ++ items.create(0) ++ items.create(1) ++ } ++ } ++ ++ ListView { ++ anchors.fill: parent ++ model: delegateModel ++ } ++ ++ Timer { ++ running: true ++ interval: 10 ++ onTriggered: sourceModel.clear() ++ } ++ ++ property int count: delegateModel.items.count ++} ++ +diff --git a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp +index 1722447830..f473cff75f 100644 +--- a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp ++++ b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp +@@ -50,6 +50,7 @@ private slots: + void qtbug_86017(); + void contextAccessedByHandler(); + void redrawUponColumnChange(); ++ void deleteRace(); + }; + + class AbstractItemModel : public QAbstractItemModel +@@ -213,6 +214,17 @@ void tst_QQmlDelegateModel::redrawUponColumnChange() + QCOMPARE(item->property("text").toString(), "Coconut"); + } + ++void tst_QQmlDelegateModel::deleteRace() ++{ ++ QQmlEngine engine; ++ QQmlComponent c(&engine, testFileUrl("deleteRace.qml")); ++ QVERIFY2(c.isReady(), qPrintable(c.errorString())); ++ QScopedPointer o(c.create()); ++ QVERIFY(!o.isNull()); ++ QTRY_COMPARE(o->property("count").toInt(), 2); ++ QTRY_COMPARE(o->property("count").toInt(), 0); ++} ++ + QTEST_MAIN(tst_QQmlDelegateModel) + + #include "tst_qqmldelegatemodel.moc" +-- +2.41.0 + diff --git a/0017-QQmlImportDatabase-Make-sure-the-newly-added-import-.patch b/0017-QQmlImportDatabase-Make-sure-the-newly-added-import-.patch deleted file mode 100644 index d141355..0000000 --- a/0017-QQmlImportDatabase-Make-sure-the-newly-added-import-.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 0d217b88c6bf5673464e350e3a62773e69555f98 Mon Sep 17 00:00:00 2001 -From: Jaeyoon Jung -Date: Fri, 19 Feb 2021 08:11:57 +0900 -Subject: [PATCH 17/26] QQmlImportDatabase: Make sure the newly added import - path be first - -If it already exists in the import list, move it to the first place. -This is as per the description of QQmlEngine::addImportPath: -| The newly added path will be first in the importPathList(). - -Change-Id: I782d355c46ada2a46cff72e63326208f39028e01 -Reviewed-by: Ulf Hermann -(cherry picked from commit 3e413803c698d21f398daf0450c8f501204eb167) ---- - src/qml/qml/qqmlimport.cpp | 9 ++++++--- - tests/auto/qml/qqmlimport/tst_qqmlimport.cpp | 5 +++++ - 2 files changed, 11 insertions(+), 3 deletions(-) - -diff --git a/src/qml/qml/qqmlimport.cpp b/src/qml/qml/qqmlimport.cpp -index 10c6c41338..39bfcdc999 100644 ---- a/src/qml/qml/qqmlimport.cpp -+++ b/src/qml/qml/qqmlimport.cpp -@@ -2120,9 +2120,12 @@ void QQmlImportDatabase::addImportPath(const QString& path) - cPath.replace(Backslash, Slash); - } - -- if (!cPath.isEmpty() -- && !fileImportPath.contains(cPath)) -- fileImportPath.prepend(cPath); -+ if (!cPath.isEmpty()) { -+ if (fileImportPath.contains(cPath)) -+ fileImportPath.move(fileImportPath.indexOf(cPath), 0); -+ else -+ fileImportPath.prepend(cPath); -+ } - } - - /*! -diff --git a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp -index 9c865b3f73..1f788f7a7f 100644 ---- a/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp -+++ b/tests/auto/qml/qqmlimport/tst_qqmlimport.cpp -@@ -154,6 +154,11 @@ void tst_QQmlImport::importPathOrder() - engine.addImportPath(QT_QMLTEST_DATADIR); - expectedImportPaths.prepend(QT_QMLTEST_DATADIR); - QCOMPARE(expectedImportPaths, engine.importPathList()); -+ -+ // Add qml2Imports again to make it the first of the list -+ engine.addImportPath(qml2Imports); -+ expectedImportPaths.move(expectedImportPaths.indexOf(qml2Imports), 0); -+ QCOMPARE(expectedImportPaths, engine.importPathList()); - } - - Q_DECLARE_METATYPE(QQmlImports::ImportVersion) --- -2.40.1 - diff --git a/0018-QQuickState-when-handle-QJSValue-properties-correctl.patch b/0018-QQuickState-when-handle-QJSValue-properties-correctl.patch deleted file mode 100644 index 55e33a9..0000000 --- a/0018-QQuickState-when-handle-QJSValue-properties-correctl.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 35608b36b284000f5871deb6a0d58113110e01e8 Mon Sep 17 00:00:00 2001 -From: Fabian Kosmale -Date: Wed, 20 Jul 2022 11:44:43 +0200 -Subject: [PATCH 18/26] QQuickState::when: handle QJSValue properties correctly - -If one assigns a binding whose evaluation results in a QJSValue, care -must be take to correctly convert it into a bool. Instead of directly -using QVariant::value, one needs to first extract the QJSValue, -and only convert it to bool afterwards. -This is necessary due to the custom binding evaluation we're doing to -avoid state oscillation. -Amends a8c729d83979fb0b9939044d246e73b1d578e65b. - -Fixes: QTBUG-105000 -Pick-to: 6.4 6.3 6.2 5.15 -Change-Id: I4b093b48edecf9e0f09d2b54d10c2ff527f24ac3 -Reviewed-by: Ulf Hermann -(cherry picked from commit 2c31d25a44b1221c151681e1bb68ef78618e0166) ---- - src/quick/util/qquickstategroup.cpp | 10 ++++++++-- - .../quick/qquickstates/data/jsValueWhen.qml | 18 ++++++++++++++++++ - .../quick/qquickstates/tst_qquickstates.cpp | 11 +++++++++++ - 3 files changed, 37 insertions(+), 2 deletions(-) - create mode 100644 tests/auto/quick/qquickstates/data/jsValueWhen.qml - -diff --git a/src/quick/util/qquickstategroup.cpp b/src/quick/util/qquickstategroup.cpp -index 7cb3138618..f732b1eb4a 100644 ---- a/src/quick/util/qquickstategroup.cpp -+++ b/src/quick/util/qquickstategroup.cpp -@@ -381,8 +381,14 @@ bool QQuickStateGroupPrivate::updateAutoState() - const auto potentialWhenBinding = QQmlPropertyPrivate::binding(whenProp); - // if there is a binding, the value in when might not be up-to-date at this point - // so we manually reevaluate the binding -- if (auto abstractBinding = dynamic_cast(potentialWhenBinding)) -- whenValue = abstractBinding->evaluate().toBool(); -+ if (auto abstractBinding = dynamic_cast(potentialWhenBinding)) { -+ QVariant evalResult = abstractBinding->evaluate(); -+ if (evalResult.userType() == qMetaTypeId()) -+ whenValue = evalResult.value().toBool(); -+ else -+ whenValue = evalResult.toBool(); -+ } -+ - if (whenValue) { - if (stateChangeDebug()) - qWarning() << "Setting auto state due to expression"; -diff --git a/tests/auto/quick/qquickstates/data/jsValueWhen.qml b/tests/auto/quick/qquickstates/data/jsValueWhen.qml -new file mode 100644 -index 0000000000..6d5eb1600c ---- /dev/null -+++ b/tests/auto/quick/qquickstates/data/jsValueWhen.qml -@@ -0,0 +1,18 @@ -+import QtQuick 2.15 -+ -+Item { -+ id: root -+ property var prop: null -+ property bool works: false -+ states: [ -+ State { -+ name: "mystate" -+ when: root.prop -+ PropertyChanges { -+ target: root -+ works: "works" -+ } -+ } -+ ] -+ Component.onCompleted: root.prop = new Object -+} -diff --git a/tests/auto/quick/qquickstates/tst_qquickstates.cpp b/tests/auto/quick/qquickstates/tst_qquickstates.cpp -index aa55b42935..26e86672b0 100644 ---- a/tests/auto/quick/qquickstates/tst_qquickstates.cpp -+++ b/tests/auto/quick/qquickstates/tst_qquickstates.cpp -@@ -188,6 +188,7 @@ private slots: - void revertListMemoryLeak(); - void duplicateStateName(); - void trivialWhen(); -+ void jsValueWhen(); - void noStateOsciallation(); - void parentChangeCorrectReversal(); - void revertNullObjectBinding(); -@@ -1734,6 +1735,16 @@ void tst_qquickstates::trivialWhen() - QVERIFY(c.create()); - } - -+void tst_qquickstates::jsValueWhen() -+{ -+ QQmlEngine engine; -+ -+ QQmlComponent c(&engine, testFileUrl("jsValueWhen.qml")); -+ QScopedPointer root(c.create()); -+ QVERIFY(root); -+ QVERIFY(root->property("works").toBool()); -+} -+ - void tst_qquickstates::noStateOsciallation() - { - QQmlEngine engine; --- -2.40.1 - diff --git a/0018-qv4function-Fix-crash-due-to-reference-being-invalid.patch b/0018-qv4function-Fix-crash-due-to-reference-being-invalid.patch new file mode 100644 index 0000000..3e4e719 --- /dev/null +++ b/0018-qv4function-Fix-crash-due-to-reference-being-invalid.patch @@ -0,0 +1,35 @@ +From be8e5e55717acafa3c4f3d0368b4a9b1e8f6b862 Mon Sep 17 00:00:00 2001 +From: Maximilian Goldstein +Date: Wed, 9 Jun 2021 15:02:45 +0200 +Subject: [PATCH 18/30] qv4function: Fix crash due to reference being + invalidated + +Function::updateInternalClass creates a reference to a QStringList that is appended to before being used. +This is unsafe and can leads to a segfault if the append() causes a reallocation. + +Fixes: QTBUG-94360 +Pick-to: 5.15 6.1 6.2 +Change-Id: Iac49e8d816cf440ca2b70e133c88314eb8df6b91 +Reviewed-by: Fabian Kosmale +Reviewed-by: Andrei Golubev +(cherry picked from commit 7fa28f98824a94396106eadfc028b329985a0cfc) +--- + src/qml/jsruntime/qv4function.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp +index cf8a53cf9f..223e64271e 100644 +--- a/src/qml/jsruntime/qv4function.cpp ++++ b/src/qml/jsruntime/qv4function.cpp +@@ -136,7 +136,7 @@ void Function::updateInternalClass(ExecutionEngine *engine, const QList -Date: Wed, 29 Mar 2023 16:36:03 +0200 -Subject: [PATCH 19/26] Models: Avoid crashes when deleting cache items - -Pick-to: 6.5 6.2 5.15 -Fixes: QTBUG-91425 -Change-Id: I58cf9ee29922f83fc6621f771b80ed557b31f106 -Reviewed-by: Shawn Rutledge -Reviewed-by: Fabian Kosmale -(cherry picked from commit 0cfdecba54e4f40468c4c9a8a6668cc1bc0eff65) - -* asturmlechner 2023-04-08: Resolve conflict with dev branch commit - c2d490a2385ea6f389340a296acaac0fa198c8b9 (qAsConst to std::as_const) ---- - src/qmlmodels/qqmldelegatemodel.cpp | 23 ++++++--- - .../qml/qqmldelegatemodel/data/deleteRace.qml | 50 +++++++++++++++++++ - .../tst_qqmldelegatemodel.cpp | 12 +++++ - 3 files changed, 78 insertions(+), 7 deletions(-) - create mode 100644 tests/auto/qml/qqmldelegatemodel/data/deleteRace.qml - -diff --git a/src/qmlmodels/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp -index 4157899aa6..5b7e767ae2 100644 ---- a/src/qmlmodels/qqmldelegatemodel.cpp -+++ b/src/qmlmodels/qqmldelegatemodel.cpp -@@ -1883,10 +1883,15 @@ void QQmlDelegateModelPrivate::emitChanges() - for (int i = 1; i < m_groupCount; ++i) - QQmlDelegateModelGroupPrivate::get(m_groups[i])->emitModelUpdated(reset); - -- auto cacheCopy = m_cache; // deliberate; emitChanges may alter m_cache -- for (QQmlDelegateModelItem *cacheItem : qAsConst(cacheCopy)) { -- if (cacheItem->attached) -- cacheItem->attached->emitChanges(); -+ // emitChanges may alter m_cache and delete items -+ QVarLengthArray> attachedObjects; -+ attachedObjects.reserve(m_cache.length()); -+ for (const QQmlDelegateModelItem *cacheItem : qAsConst(m_cache)) -+ attachedObjects.append(cacheItem->attached); -+ -+ for (const QPointer &attached : qAsConst(attachedObjects)) { -+ if (attached && attached->m_cacheItem) -+ attached->emitChanges(); - } - } - -@@ -2707,20 +2712,24 @@ void QQmlDelegateModelAttached::emitChanges() - m_previousGroups = m_cacheItem->groups; - - int indexChanges = 0; -- for (int i = 1; i < m_cacheItem->metaType->groupCount; ++i) { -+ const int groupCount = m_cacheItem->metaType->groupCount; -+ for (int i = 1; i < groupCount; ++i) { - if (m_previousIndex[i] != m_currentIndex[i]) { - m_previousIndex[i] = m_currentIndex[i]; - indexChanges |= (1 << i); - } - } - -+ // Don't access m_cacheItem anymore once we've started sending signals. -+ // We don't own it and someone might delete it. -+ - int notifierId = 0; - const QMetaObject *meta = metaObject(); -- for (int i = 1; i < m_cacheItem->metaType->groupCount; ++i, ++notifierId) { -+ for (int i = 1; i < groupCount; ++i, ++notifierId) { - if (groupChanges & (1 << i)) - QMetaObject::activate(this, meta, notifierId, nullptr); - } -- for (int i = 1; i < m_cacheItem->metaType->groupCount; ++i, ++notifierId) { -+ for (int i = 1; i < groupCount; ++i, ++notifierId) { - if (indexChanges & (1 << i)) - QMetaObject::activate(this, meta, notifierId, nullptr); - } -diff --git a/tests/auto/qml/qqmldelegatemodel/data/deleteRace.qml b/tests/auto/qml/qqmldelegatemodel/data/deleteRace.qml -new file mode 100644 -index 0000000000..23874970e7 ---- /dev/null -+++ b/tests/auto/qml/qqmldelegatemodel/data/deleteRace.qml -@@ -0,0 +1,50 @@ -+import QtQuick 2.15 -+import QtQml.Models 2.15 -+ -+Item { -+ DelegateModel { -+ id: delegateModel -+ model: ListModel { -+ id: sourceModel -+ -+ ListElement { title: "foo" } -+ ListElement { title: "bar" } -+ -+ function clear() { -+ if (count > 0) -+ remove(0, count); -+ } -+ } -+ -+ groups: [ -+ DelegateModelGroup { name: "selectedItems" } -+ ] -+ -+ delegate: Text { -+ height: DelegateModel.inSelectedItems ? implicitHeight * 2 : implicitHeight -+ Component.onCompleted: { -+ if (index === 0) -+ DelegateModel.inSelectedItems = true; -+ } -+ } -+ -+ Component.onCompleted: { -+ items.create(0) -+ items.create(1) -+ } -+ } -+ -+ ListView { -+ anchors.fill: parent -+ model: delegateModel -+ } -+ -+ Timer { -+ running: true -+ interval: 10 -+ onTriggered: sourceModel.clear() -+ } -+ -+ property int count: delegateModel.items.count -+} -+ -diff --git a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp -index 1722447830..f473cff75f 100644 ---- a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp -+++ b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp -@@ -50,6 +50,7 @@ private slots: - void qtbug_86017(); - void contextAccessedByHandler(); - void redrawUponColumnChange(); -+ void deleteRace(); - }; - - class AbstractItemModel : public QAbstractItemModel -@@ -213,6 +214,17 @@ void tst_QQmlDelegateModel::redrawUponColumnChange() - QCOMPARE(item->property("text").toString(), "Coconut"); - } - -+void tst_QQmlDelegateModel::deleteRace() -+{ -+ QQmlEngine engine; -+ QQmlComponent c(&engine, testFileUrl("deleteRace.qml")); -+ QVERIFY2(c.isReady(), qPrintable(c.errorString())); -+ QScopedPointer o(c.create()); -+ QVERIFY(!o.isNull()); -+ QTRY_COMPARE(o->property("count").toInt(), 2); -+ QTRY_COMPARE(o->property("count").toInt(), 0); -+} -+ - QTEST_MAIN(tst_QQmlDelegateModel) - - #include "tst_qqmldelegatemodel.moc" --- -2.40.1 - diff --git a/0019-Quick-Animations-Fix-crash.patch b/0019-Quick-Animations-Fix-crash.patch new file mode 100644 index 0000000..9279f8f --- /dev/null +++ b/0019-Quick-Animations-Fix-crash.patch @@ -0,0 +1,141 @@ +From 9c97a85fbec3d6ad40cdae00a06bac1fc8c06665 Mon Sep 17 00:00:00 2001 +From: Fabian Kosmale +Date: Tue, 29 Mar 2022 10:44:04 +0200 +Subject: [PATCH 19/30] Quick Animations: Fix crash + +SwipeDelegate causes the running animation job to be deleted when +calling swipe.close in swipe.completed. Employ the RETURN_IF_DELETED +check in more places to avoid crashes. + +Fixes: QTBUG-100560 +Task-number: QTBUG-103223 +Pick-to: 6.3 6.2 5.15 +Change-Id: I276eeaa9aed1bdb36449b322a24641fa02c4d5e4 +Reviewed-by: Ulf Hermann +(cherry picked from commit 0238af0bd48b831d72126f2228d5913eccf67bae) + +* asturmlechner 2023-04-09: Resolve conflict with dev branch commit + 4938984f9a779192264757a06e6ca555fc8f5e91 +--- + .../qcontinuinganimationgroupjob.cpp | 4 +- + .../animations/qparallelanimationgroupjob.cpp | 4 +- + .../swipedelegate/CloseOnCompletedWorks.qml | 74 +++++++++++++++++++ + 3 files changed, 78 insertions(+), 4 deletions(-) + create mode 100644 tests/manual/quickcontrols2/swipedelegate/CloseOnCompletedWorks.qml + +diff --git a/src/qml/animations/qcontinuinganimationgroupjob.cpp b/src/qml/animations/qcontinuinganimationgroupjob.cpp +index 88c0e9e60e..61a9dc36f8 100644 +--- a/src/qml/animations/qcontinuinganimationgroupjob.cpp ++++ b/src/qml/animations/qcontinuinganimationgroupjob.cpp +@@ -82,9 +82,9 @@ void QContinuingAnimationGroupJob::updateState(QAbstractAnimationJob::State newS + return; + } + for (QAbstractAnimationJob *animation = firstChild(); animation; animation = animation->nextSibling()) { +- resetUncontrolledAnimationFinishTime(animation); ++ RETURN_IF_DELETED(resetUncontrolledAnimationFinishTime(animation)); + animation->setDirection(m_direction); +- animation->start(); ++ RETURN_IF_DELETED(animation->start()); + } + break; + } +diff --git a/src/qml/animations/qparallelanimationgroupjob.cpp b/src/qml/animations/qparallelanimationgroupjob.cpp +index 420a934ba2..a828d0e234 100644 +--- a/src/qml/animations/qparallelanimationgroupjob.cpp ++++ b/src/qml/animations/qparallelanimationgroupjob.cpp +@@ -144,10 +144,10 @@ void QParallelAnimationGroupJob::updateState(QAbstractAnimationJob::State newSta + animation->stop(); + m_previousLoop = m_direction == Forward ? 0 : m_loopCount - 1; + } +- resetUncontrolledAnimationFinishTime(animation); ++ RETURN_IF_DELETED(resetUncontrolledAnimationFinishTime(animation)); + animation->setDirection(m_direction); + if (shouldAnimationStart(animation, oldState == Stopped)) +- animation->start(); ++ RETURN_IF_DELETED(animation->start()); + } + break; + } +diff --git a/tests/manual/quickcontrols2/swipedelegate/CloseOnCompletedWorks.qml b/tests/manual/quickcontrols2/swipedelegate/CloseOnCompletedWorks.qml +new file mode 100644 +index 0000000000..38dfde41c3 +--- /dev/null ++++ b/tests/manual/quickcontrols2/swipedelegate/CloseOnCompletedWorks.qml +@@ -0,0 +1,74 @@ ++/**************************************************************************** ++** ++** Copyright (C) 2022 The Qt Company Ltd. ++** Contact: https://www.qt.io/licensing/ ++** ++** This file is part of the test suite of the Qt Toolkit. ++** ++** $QT_BEGIN_LICENSE:BSD$ ++** Commercial License Usage ++** Licensees holding valid commercial Qt licenses may use this file in ++** accordance with the commercial license agreement provided with the ++** Software or, alternatively, in accordance with the terms contained in ++** a written agreement between you and The Qt Company. For licensing terms ++** and conditions see https://www.qt.io/terms-conditions. For further ++** information use the contact form at https://www.qt.io/contact-us. ++** ++** BSD License Usage ++** Alternatively, you may use this file under the terms of the BSD license ++** as follows: ++** ++** "Redistribution and use in source and binary forms, with or without ++** modification, are permitted provided that the following conditions are ++** met: ++** * Redistributions of source code must retain the above copyright ++** notice, this list of conditions and the following disclaimer. ++** * Redistributions in binary form must reproduce the above copyright ++** notice, this list of conditions and the following disclaimer in ++** the documentation and/or other materials provided with the ++** distribution. ++** * Neither the name of The Qt Company Ltd nor the names of its ++** contributors may be used to endorse or promote products derived ++** from this software without specific prior written permission. ++** ++** ++** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ++** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT ++** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ++** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT ++** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, ++** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT ++** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, ++** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY ++** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT ++** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE ++** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." ++** ++** $QT_END_LICENSE$ ++** ++****************************************************************************/ ++ ++import QtQuick 2 ++import QtQuick.Controls 2 ++ApplicationWindow { ++ visible: true ++ width: 640 ++ height: 480 ++ ++ ListView { ++ anchors.fill: parent ++ model: 2 ++ ++ delegate: SwipeDelegate { ++ text: "Swipe me left (should not crash)" ++ ++ swipe.right: Label { ++ text: "Release (should not crash)" ++ } ++ ++ swipe.onCompleted: { ++ swipe.close() ++ } ++ } ++ } ++} +-- +2.41.0 + diff --git a/0020-Prevent-crash-when-destroying-asynchronous-Loader.patch b/0020-Prevent-crash-when-destroying-asynchronous-Loader.patch new file mode 100644 index 0000000..dd2ef6b --- /dev/null +++ b/0020-Prevent-crash-when-destroying-asynchronous-Loader.patch @@ -0,0 +1,129 @@ +From 3e199737af8faee64cb940aef904537b658fe375 Mon Sep 17 00:00:00 2001 +From: Joni Poikelin +Date: Thu, 3 Sep 2020 14:22:26 +0300 +Subject: [PATCH 20/30] Prevent crash when destroying asynchronous Loader + +Fixes: QTBUG-86255 +Pick-to: 5.15 +Change-Id: I30488b64d910a1409a43e2e98ee7ab084aec33d2 +Reviewed-by: Ulf Hermann +(cherry picked from commit 149c1dd07b54ee0c027d94a49d52160dc4f4e2ac) + +* asturmlechner 2023-01-06: Resolve conflict with dev branch commits + d51c007ecc8aa6256cb95cf3992e5ac34a70fa3f and + b2a4a61e8cb0839ba293783ac03c72f35c7b1307 +--- + src/qml/qml/qqmlvmemetaobject.cpp | 2 +- + .../quick/qquickgridview/data/qtbug86255.qml | 55 +++++++++++++++++++ + .../qquickgridview/tst_qquickgridview.cpp | 13 +++++ + 3 files changed, 69 insertions(+), 1 deletion(-) + create mode 100644 tests/auto/quick/qquickgridview/data/qtbug86255.qml + +diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp +index 1e0e4e419f..a0532d1794 100644 +--- a/src/qml/qml/qqmlvmemetaobject.cpp ++++ b/src/qml/qml/qqmlvmemetaobject.cpp +@@ -251,7 +251,7 @@ void QQmlVMEMetaObjectEndpoint::tryConnect() + if (!pd) + return; + +- if (pd->notifyIndex() != -1) ++ if (pd->notifyIndex() != -1 && ctxt->engine) + connect(target, pd->notifyIndex(), ctxt->engine); + } + +diff --git a/tests/auto/quick/qquickgridview/data/qtbug86255.qml b/tests/auto/quick/qquickgridview/data/qtbug86255.qml +new file mode 100644 +index 0000000000..20688b1967 +--- /dev/null ++++ b/tests/auto/quick/qquickgridview/data/qtbug86255.qml +@@ -0,0 +1,55 @@ ++import QtQuick 2.15 ++ ++Item { ++ width: 240 ++ height: 320 ++ ++ GridView { ++ id: grid ++ objectName: "view" ++ anchors.fill: parent ++ cellWidth: 64 ++ cellHeight: 64 ++ model: ListModel { ++ id: listModel ++ ++ Component.onCompleted: reload() ++ ++ function reload() { ++ clear(); ++ for (let i = 0; i < 1000; i++) { ++ let magic = Math.random(); ++ append( { magic } ); ++ } ++ } ++ } ++ clip: true ++ delegate: Item { ++ id: d ++ property string val: magic ++ Loader { ++ property alias value: d.val ++ asynchronous: true ++ sourceComponent: cmp ++ } ++ } ++ } ++ ++ Timer { ++ running: true ++ interval: 1000 ++ onTriggered: listModel.reload() ++ } ++ Timer { ++ running: true ++ interval: 500 ++ onTriggered: grid.flick(0, -4000) ++ } ++ ++ Component { ++ id: cmp ++ Text { ++ text: value ++ } ++ } ++} +diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp +index 94ec4f44d5..7d0d9fa7a7 100644 +--- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp ++++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp +@@ -213,6 +213,7 @@ private slots: + void QTBUG_45640(); + void QTBUG_49218(); + void QTBUG_48870_fastModelUpdates(); ++ void QTBUG_86255(); + + void keyNavigationEnabled(); + void resizeDynamicCellWidthRtL(); +@@ -6814,6 +6815,18 @@ void tst_QQuickGridView::resizeDynamicCellWidthRtL() + QTRY_COMPARE(gridview->contentX(), 0.f); + } + ++void tst_QQuickGridView::QTBUG_86255() ++{ ++ QScopedPointer window(createView()); ++ window->setSource(testFileUrl("qtbug86255.qml")); ++ window->show(); ++ QVERIFY(QTest::qWaitForWindowExposed(window.data())); ++ QQuickGridView *view = findItem(window->rootObject(), "view"); ++ QVERIFY(view != nullptr); ++ QTRY_COMPARE(view->isFlicking(), true); ++ QTRY_COMPARE(view->isFlicking(), false); ++} ++ + void tst_QQuickGridView::releaseItems() + { + QScopedPointer view(createView()); +-- +2.41.0 + diff --git a/0020-qv4function-Fix-crash-due-to-reference-being-invalid.patch b/0020-qv4function-Fix-crash-due-to-reference-being-invalid.patch deleted file mode 100644 index 7eb8bb4..0000000 --- a/0020-qv4function-Fix-crash-due-to-reference-being-invalid.patch +++ /dev/null @@ -1,35 +0,0 @@ -From adad56c92c633248f0fe467f8e0c32dc461f6716 Mon Sep 17 00:00:00 2001 -From: Maximilian Goldstein -Date: Wed, 9 Jun 2021 15:02:45 +0200 -Subject: [PATCH 20/26] qv4function: Fix crash due to reference being - invalidated - -Function::updateInternalClass creates a reference to a QStringList that is appended to before being used. -This is unsafe and can leads to a segfault if the append() causes a reallocation. - -Fixes: QTBUG-94360 -Pick-to: 5.15 6.1 6.2 -Change-Id: Iac49e8d816cf440ca2b70e133c88314eb8df6b91 -Reviewed-by: Fabian Kosmale -Reviewed-by: Andrei Golubev -(cherry picked from commit 7fa28f98824a94396106eadfc028b329985a0cfc) ---- - src/qml/jsruntime/qv4function.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp -index aeb4835c40..9082628a1a 100644 ---- a/src/qml/jsruntime/qv4function.cpp -+++ b/src/qml/jsruntime/qv4function.cpp -@@ -136,7 +136,7 @@ void Function::updateInternalClass(ExecutionEngine *engine, const QList +Date: Fri, 18 Nov 2022 14:20:20 +0100 +Subject: [PATCH 21/30] QQuickItem: Fix effective visibility for items without + parent + +Items are visible if they are children of a visible parent, and not +explicitly hidden. The effectiveVisible member stores the state and is +updated when conditions that impact the item visibility changes. + +The old code returned true for items outside a visual hierarchy, which +broke signal emission when items were removed from a parent, e.g. +because the parent got destroyed. With this change, items removed from +a visual hierarchy will emit the visibleChanged signal. + +Note: QQuickItem initializes the effectiveVisible member to true, even +if the item was created without parent item. Visual items are required +to be added to a visual hierarchy via setParentItem. For this reason, +newly created items never emit visibleChanged when they are added to +a parent. + +Adjust the QQuickItem::visible test - it creates an item hierarchy +without window. Such items are never visible, so add a window and +parent the test item hierarchy to the window's content item. + +This fixes the expected failures in the tests. It does introduce an +incompatibility with QGraphicsView and QGraphicsItem, which continue +to return true from QGraphicsItem::isVisible for items that are not +in an item hierarchy. + +[ChangeLog][Qt Quick][QQuickItem] The visible property of Items without +a parent now always returns false, and the visibleChanged signal gets +emitted when the parent item of a visible item becomes null. + +Fixes: QTBUG-108213 +Change-Id: If4b2947cefd1407853f0f29e6c3fdbd49fc9af65 +Reviewed-by: Fabian Kosmale +Reviewed-by: Shawn Rutledge +(cherry picked from commit d1b9a4cacfb966cf0a37983d8f8044f3aedf5de3) + +CCBUG: 467909 +CCBUG: 396359 +--- + src/quick/items/qquickitem.cpp | 6 ++---- + tests/auto/quick/qquickitem/tst_qquickitem.cpp | 2 ++ + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp +index c370d6e5c3..0d421349d7 100644 +--- a/src/quick/items/qquickitem.cpp ++++ b/src/quick/items/qquickitem.cpp +@@ -6081,10 +6081,8 @@ void QQuickItem::setEnabled(bool e) + + bool QQuickItemPrivate::calcEffectiveVisible() const + { +- // XXX todo - Should the effective visible of an element with no parent just be the current +- // effective visible? This would prevent pointless re-processing in the case of an element +- // moving to/from a no-parent situation, but it is different from what graphics view does. +- return explicitVisible && (!parentItem || QQuickItemPrivate::get(parentItem)->effectiveVisible); ++ // An item is visible if it is a child of a visible parent, and not explicitly hidden. ++ return explicitVisible && parentItem && QQuickItemPrivate::get(parentItem)->effectiveVisible; + } + + bool QQuickItemPrivate::setEffectiveVisibleRecur(bool newEffectiveVisible) +diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp +index 42348d8dd1..34eefd85e6 100644 +--- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp ++++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp +@@ -989,7 +989,9 @@ void tst_qquickitem::setParentItem() + + void tst_qquickitem::visible() + { ++ QQuickWindow window; + QQuickItem *root = new QQuickItem; ++ root->setParentItem(window.contentItem()); + + QQuickItem *child1 = new QQuickItem; + child1->setParentItem(root); +-- +2.41.0 + diff --git a/0021-Quick-Animations-Fix-crash.patch b/0021-Quick-Animations-Fix-crash.patch deleted file mode 100644 index 86e8b2b..0000000 --- a/0021-Quick-Animations-Fix-crash.patch +++ /dev/null @@ -1,141 +0,0 @@ -From cc1b9e7d4aac93d0767e83431be5a5aebcdffb59 Mon Sep 17 00:00:00 2001 -From: Fabian Kosmale -Date: Tue, 29 Mar 2022 10:44:04 +0200 -Subject: [PATCH 21/26] Quick Animations: Fix crash - -SwipeDelegate causes the running animation job to be deleted when -calling swipe.close in swipe.completed. Employ the RETURN_IF_DELETED -check in more places to avoid crashes. - -Fixes: QTBUG-100560 -Task-number: QTBUG-103223 -Pick-to: 6.3 6.2 5.15 -Change-Id: I276eeaa9aed1bdb36449b322a24641fa02c4d5e4 -Reviewed-by: Ulf Hermann -(cherry picked from commit 0238af0bd48b831d72126f2228d5913eccf67bae) - -* asturmlechner 2023-04-09: Resolve conflict with dev branch commit - 4938984f9a779192264757a06e6ca555fc8f5e91 ---- - .../qcontinuinganimationgroupjob.cpp | 4 +- - .../animations/qparallelanimationgroupjob.cpp | 4 +- - .../swipedelegate/CloseOnCompletedWorks.qml | 74 +++++++++++++++++++ - 3 files changed, 78 insertions(+), 4 deletions(-) - create mode 100644 tests/manual/quickcontrols2/swipedelegate/CloseOnCompletedWorks.qml - -diff --git a/src/qml/animations/qcontinuinganimationgroupjob.cpp b/src/qml/animations/qcontinuinganimationgroupjob.cpp -index 88c0e9e60e..61a9dc36f8 100644 ---- a/src/qml/animations/qcontinuinganimationgroupjob.cpp -+++ b/src/qml/animations/qcontinuinganimationgroupjob.cpp -@@ -82,9 +82,9 @@ void QContinuingAnimationGroupJob::updateState(QAbstractAnimationJob::State newS - return; - } - for (QAbstractAnimationJob *animation = firstChild(); animation; animation = animation->nextSibling()) { -- resetUncontrolledAnimationFinishTime(animation); -+ RETURN_IF_DELETED(resetUncontrolledAnimationFinishTime(animation)); - animation->setDirection(m_direction); -- animation->start(); -+ RETURN_IF_DELETED(animation->start()); - } - break; - } -diff --git a/src/qml/animations/qparallelanimationgroupjob.cpp b/src/qml/animations/qparallelanimationgroupjob.cpp -index 420a934ba2..a828d0e234 100644 ---- a/src/qml/animations/qparallelanimationgroupjob.cpp -+++ b/src/qml/animations/qparallelanimationgroupjob.cpp -@@ -144,10 +144,10 @@ void QParallelAnimationGroupJob::updateState(QAbstractAnimationJob::State newSta - animation->stop(); - m_previousLoop = m_direction == Forward ? 0 : m_loopCount - 1; - } -- resetUncontrolledAnimationFinishTime(animation); -+ RETURN_IF_DELETED(resetUncontrolledAnimationFinishTime(animation)); - animation->setDirection(m_direction); - if (shouldAnimationStart(animation, oldState == Stopped)) -- animation->start(); -+ RETURN_IF_DELETED(animation->start()); - } - break; - } -diff --git a/tests/manual/quickcontrols2/swipedelegate/CloseOnCompletedWorks.qml b/tests/manual/quickcontrols2/swipedelegate/CloseOnCompletedWorks.qml -new file mode 100644 -index 0000000000..38dfde41c3 ---- /dev/null -+++ b/tests/manual/quickcontrols2/swipedelegate/CloseOnCompletedWorks.qml -@@ -0,0 +1,74 @@ -+/**************************************************************************** -+** -+** Copyright (C) 2022 The Qt Company Ltd. -+** Contact: https://www.qt.io/licensing/ -+** -+** This file is part of the test suite of the Qt Toolkit. -+** -+** $QT_BEGIN_LICENSE:BSD$ -+** Commercial License Usage -+** Licensees holding valid commercial Qt licenses may use this file in -+** accordance with the commercial license agreement provided with the -+** Software or, alternatively, in accordance with the terms contained in -+** a written agreement between you and The Qt Company. For licensing terms -+** and conditions see https://www.qt.io/terms-conditions. For further -+** information use the contact form at https://www.qt.io/contact-us. -+** -+** BSD License Usage -+** Alternatively, you may use this file under the terms of the BSD license -+** as follows: -+** -+** "Redistribution and use in source and binary forms, with or without -+** modification, are permitted provided that the following conditions are -+** met: -+** * Redistributions of source code must retain the above copyright -+** notice, this list of conditions and the following disclaimer. -+** * Redistributions in binary form must reproduce the above copyright -+** notice, this list of conditions and the following disclaimer in -+** the documentation and/or other materials provided with the -+** distribution. -+** * Neither the name of The Qt Company Ltd nor the names of its -+** contributors may be used to endorse or promote products derived -+** from this software without specific prior written permission. -+** -+** -+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -+** -+** $QT_END_LICENSE$ -+** -+****************************************************************************/ -+ -+import QtQuick 2 -+import QtQuick.Controls 2 -+ApplicationWindow { -+ visible: true -+ width: 640 -+ height: 480 -+ -+ ListView { -+ anchors.fill: parent -+ model: 2 -+ -+ delegate: SwipeDelegate { -+ text: "Swipe me left (should not crash)" -+ -+ swipe.right: Label { -+ text: "Release (should not crash)" -+ } -+ -+ swipe.onCompleted: { -+ swipe.close() -+ } -+ } -+ } -+} --- -2.40.1 - diff --git a/0022-Prevent-crash-when-destroying-asynchronous-Loader.patch b/0022-Prevent-crash-when-destroying-asynchronous-Loader.patch deleted file mode 100644 index 48de03e..0000000 --- a/0022-Prevent-crash-when-destroying-asynchronous-Loader.patch +++ /dev/null @@ -1,129 +0,0 @@ -From 3366947eb58c0c5ad8a7e714a6b9667e1c3ff7b8 Mon Sep 17 00:00:00 2001 -From: Joni Poikelin -Date: Thu, 3 Sep 2020 14:22:26 +0300 -Subject: [PATCH 22/26] Prevent crash when destroying asynchronous Loader - -Fixes: QTBUG-86255 -Pick-to: 5.15 -Change-Id: I30488b64d910a1409a43e2e98ee7ab084aec33d2 -Reviewed-by: Ulf Hermann -(cherry picked from commit 149c1dd07b54ee0c027d94a49d52160dc4f4e2ac) - -* asturmlechner 2023-01-06: Resolve conflict with dev branch commits - d51c007ecc8aa6256cb95cf3992e5ac34a70fa3f and - b2a4a61e8cb0839ba293783ac03c72f35c7b1307 ---- - src/qml/qml/qqmlvmemetaobject.cpp | 2 +- - .../quick/qquickgridview/data/qtbug86255.qml | 55 +++++++++++++++++++ - .../qquickgridview/tst_qquickgridview.cpp | 13 +++++ - 3 files changed, 69 insertions(+), 1 deletion(-) - create mode 100644 tests/auto/quick/qquickgridview/data/qtbug86255.qml - -diff --git a/src/qml/qml/qqmlvmemetaobject.cpp b/src/qml/qml/qqmlvmemetaobject.cpp -index aa9f4bc1bd..09503a7e99 100644 ---- a/src/qml/qml/qqmlvmemetaobject.cpp -+++ b/src/qml/qml/qqmlvmemetaobject.cpp -@@ -254,7 +254,7 @@ void QQmlVMEMetaObjectEndpoint::tryConnect() - if (!pd) - return; - -- if (pd->notifyIndex() != -1) -+ if (pd->notifyIndex() != -1 && ctxt->engine) - connect(target, pd->notifyIndex(), ctxt->engine); - } - -diff --git a/tests/auto/quick/qquickgridview/data/qtbug86255.qml b/tests/auto/quick/qquickgridview/data/qtbug86255.qml -new file mode 100644 -index 0000000000..20688b1967 ---- /dev/null -+++ b/tests/auto/quick/qquickgridview/data/qtbug86255.qml -@@ -0,0 +1,55 @@ -+import QtQuick 2.15 -+ -+Item { -+ width: 240 -+ height: 320 -+ -+ GridView { -+ id: grid -+ objectName: "view" -+ anchors.fill: parent -+ cellWidth: 64 -+ cellHeight: 64 -+ model: ListModel { -+ id: listModel -+ -+ Component.onCompleted: reload() -+ -+ function reload() { -+ clear(); -+ for (let i = 0; i < 1000; i++) { -+ let magic = Math.random(); -+ append( { magic } ); -+ } -+ } -+ } -+ clip: true -+ delegate: Item { -+ id: d -+ property string val: magic -+ Loader { -+ property alias value: d.val -+ asynchronous: true -+ sourceComponent: cmp -+ } -+ } -+ } -+ -+ Timer { -+ running: true -+ interval: 1000 -+ onTriggered: listModel.reload() -+ } -+ Timer { -+ running: true -+ interval: 500 -+ onTriggered: grid.flick(0, -4000) -+ } -+ -+ Component { -+ id: cmp -+ Text { -+ text: value -+ } -+ } -+} -diff --git a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp -index 94ec4f44d5..7d0d9fa7a7 100644 ---- a/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp -+++ b/tests/auto/quick/qquickgridview/tst_qquickgridview.cpp -@@ -213,6 +213,7 @@ private slots: - void QTBUG_45640(); - void QTBUG_49218(); - void QTBUG_48870_fastModelUpdates(); -+ void QTBUG_86255(); - - void keyNavigationEnabled(); - void resizeDynamicCellWidthRtL(); -@@ -6814,6 +6815,18 @@ void tst_QQuickGridView::resizeDynamicCellWidthRtL() - QTRY_COMPARE(gridview->contentX(), 0.f); - } - -+void tst_QQuickGridView::QTBUG_86255() -+{ -+ QScopedPointer window(createView()); -+ window->setSource(testFileUrl("qtbug86255.qml")); -+ window->show(); -+ QVERIFY(QTest::qWaitForWindowExposed(window.data())); -+ QQuickGridView *view = findItem(window->rootObject(), "view"); -+ QVERIFY(view != nullptr); -+ QTRY_COMPARE(view->isFlicking(), true); -+ QTRY_COMPARE(view->isFlicking(), false); -+} -+ - void tst_QQuickGridView::releaseItems() - { - QScopedPointer view(createView()); --- -2.40.1 - diff --git a/0022-Revert-QQuickItem-Fix-effective-visibility-for-items.patch b/0022-Revert-QQuickItem-Fix-effective-visibility-for-items.patch new file mode 100644 index 0000000..edadc7b --- /dev/null +++ b/0022-Revert-QQuickItem-Fix-effective-visibility-for-items.patch @@ -0,0 +1,51 @@ +From 75d7d0370a3a19615e9aab6a23519eb529e4de87 Mon Sep 17 00:00:00 2001 +From: Fushan Wen +Date: Fri, 21 Apr 2023 23:38:04 +0800 +Subject: [PATCH 22/30] Revert "QQuickItem: Fix effective visibility for items + without parent" + +This breaks applications that use QQmlPropertyList to store QQuickItem +and don't set a parentItem for them. + +Ref: https://github.com/musescore/MuseScore/issues/17276 + +This reverts commit 45c22a0221937682f4496801a495458a00f76d3a. +--- + src/quick/items/qquickitem.cpp | 6 ++++-- + tests/auto/quick/qquickitem/tst_qquickitem.cpp | 2 -- + 2 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp +index 0d421349d7..c370d6e5c3 100644 +--- a/src/quick/items/qquickitem.cpp ++++ b/src/quick/items/qquickitem.cpp +@@ -6081,8 +6081,10 @@ void QQuickItem::setEnabled(bool e) + + bool QQuickItemPrivate::calcEffectiveVisible() const + { +- // An item is visible if it is a child of a visible parent, and not explicitly hidden. +- return explicitVisible && parentItem && QQuickItemPrivate::get(parentItem)->effectiveVisible; ++ // XXX todo - Should the effective visible of an element with no parent just be the current ++ // effective visible? This would prevent pointless re-processing in the case of an element ++ // moving to/from a no-parent situation, but it is different from what graphics view does. ++ return explicitVisible && (!parentItem || QQuickItemPrivate::get(parentItem)->effectiveVisible); + } + + bool QQuickItemPrivate::setEffectiveVisibleRecur(bool newEffectiveVisible) +diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp +index 34eefd85e6..42348d8dd1 100644 +--- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp ++++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp +@@ -989,9 +989,7 @@ void tst_qquickitem::setParentItem() + + void tst_qquickitem::visible() + { +- QQuickWindow window; + QQuickItem *root = new QQuickItem; +- root->setParentItem(window.contentItem()); + + QQuickItem *child1 = new QQuickItem; + child1->setParentItem(root); +-- +2.41.0 + diff --git a/0023-Accessibility-respect-value-in-attached-Accessible-i.patch b/0023-Accessibility-respect-value-in-attached-Accessible-i.patch new file mode 100644 index 0000000..d5e2a91 --- /dev/null +++ b/0023-Accessibility-respect-value-in-attached-Accessible-i.patch @@ -0,0 +1,111 @@ +From be69e9b1443cff30d241100bafc91d447cc0b2f5 Mon Sep 17 00:00:00 2001 +From: Volker Hilsheimer +Date: Tue, 18 Apr 2023 22:05:36 +0200 +Subject: [PATCH 23/30] Accessibility: respect value in attached Accessible in + controls +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +QQuickItemPrivate::accessibleRole is virtual and called by the framework +to determine the role of an item. The default implementation checks and +respects a possible Accessible attached object. However, subclasses that +override the virtual don't, so the attached properties are ignored, and +the class-specific implementation wins. This makes it impossible to +change the role of e.g. a checkable button. + +To fix that, move the code respecting the attached object into a non- +virtual function that the framework calls instead, and only call the +virtual member if there is no attached object, or if that object is not +initialized with a role. Replace calls to the virtual from the +framework with calls to the non-virtual wrapper. + +Do this for both QQuickItem and for QQuickPopup, and adjust the logic +in QQuickControl types that create an attached object and initialize +it's role when accessibility becomes active. Use the non-overridable +effective role value for that as well. + +Add a test case, and to avoid any new framework calls to the virtual, +make it private. + +Fixes: QTBUG-110114 +Pick-to: 6.5 6.2 +Change-Id: Ia709cecbd181b6d8ee3297a4af60c1e7db9a2c51 +Reviewed-by: Qt CI Bot +Reviewed-by: Jan Arve Sæther +(cherry picked from commit 3c08d08ae2bbd449cc0579a1b3cb499383c7a60c) +--- + src/quick/accessible/qaccessiblequickitem.cpp | 2 +- + src/quick/items/qquickitem.cpp | 17 ++++++++++++----- + src/quick/items/qquickitem_p.h | 3 +++ + 3 files changed, 16 insertions(+), 6 deletions(-) + +diff --git a/src/quick/accessible/qaccessiblequickitem.cpp b/src/quick/accessible/qaccessiblequickitem.cpp +index a8df58d450..99e6eff7c3 100644 +--- a/src/quick/accessible/qaccessiblequickitem.cpp ++++ b/src/quick/accessible/qaccessiblequickitem.cpp +@@ -230,7 +230,7 @@ QAccessible::Role QAccessibleQuickItem::role() const + + QAccessible::Role role = QAccessible::NoRole; + if (item()) +- role = QQuickItemPrivate::get(item())->accessibleRole(); ++ role = QQuickItemPrivate::get(item())->effectiveAccessibleRole(); + if (role == QAccessible::NoRole) { + if (qobject_cast(const_cast(item()))) + role = QAccessible::StaticText; +diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp +index c370d6e5c3..9e8b289376 100644 +--- a/src/quick/items/qquickitem.cpp ++++ b/src/quick/items/qquickitem.cpp +@@ -2400,7 +2400,7 @@ bool QQuickItemPrivate::canAcceptTabFocus(QQuickItem *item) + return true; + + #if QT_CONFIG(accessibility) +- QAccessible::Role role = QQuickItemPrivate::get(item)->accessibleRole(); ++ QAccessible::Role role = QQuickItemPrivate::get(item)->effectiveAccessibleRole(); + if (role == QAccessible::EditableText || role == QAccessible::Table || role == QAccessible::List) { + return true; + } else if (role == QAccessible::ComboBox || role == QAccessible::SpinBox) { +@@ -9000,13 +9000,20 @@ QQuickItemPrivate::ExtraData::ExtraData() + + + #if QT_CONFIG(accessibility) +-QAccessible::Role QQuickItemPrivate::accessibleRole() const ++QAccessible::Role QQuickItemPrivate::effectiveAccessibleRole() const + { + Q_Q(const QQuickItem); +- QQuickAccessibleAttached *accessibleAttached = qobject_cast(qmlAttachedPropertiesObject(q, false)); +- if (accessibleAttached) +- return accessibleAttached->role(); ++ auto *attached = qmlAttachedPropertiesObject(q, false); ++ auto role = QAccessible::NoRole; ++ if (auto *accessibleAttached = qobject_cast(attached)) ++ role = accessibleAttached->role(); ++ if (role == QAccessible::NoRole) ++ role = accessibleRole(); ++ return role; ++} + ++QAccessible::Role QQuickItemPrivate::accessibleRole() const ++{ + return QAccessible::NoRole; + } + #endif +diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h +index ade8fb61f2..6f329bd119 100644 +--- a/src/quick/items/qquickitem_p.h ++++ b/src/quick/items/qquickitem_p.h +@@ -575,7 +575,10 @@ public: + virtual void implicitHeightChanged(); + + #if QT_CONFIG(accessibility) ++ QAccessible::Role effectiveAccessibleRole() const; ++private: + virtual QAccessible::Role accessibleRole() const; ++public: + #endif + + void setImplicitAntialiasing(bool antialiasing); +-- +2.41.0 + diff --git a/0023-QQuickItem-Fix-effective-visibility-for-items-withou.patch b/0023-QQuickItem-Fix-effective-visibility-for-items-withou.patch deleted file mode 100644 index 02219ea..0000000 --- a/0023-QQuickItem-Fix-effective-visibility-for-items-withou.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 688795f02ecc163e7cb18dfb6c87273d7e613cbf Mon Sep 17 00:00:00 2001 -From: Volker Hilsheimer -Date: Fri, 18 Nov 2022 14:20:20 +0100 -Subject: [PATCH 23/26] QQuickItem: Fix effective visibility for items without - parent - -Items are visible if they are children of a visible parent, and not -explicitly hidden. The effectiveVisible member stores the state and is -updated when conditions that impact the item visibility changes. - -The old code returned true for items outside a visual hierarchy, which -broke signal emission when items were removed from a parent, e.g. -because the parent got destroyed. With this change, items removed from -a visual hierarchy will emit the visibleChanged signal. - -Note: QQuickItem initializes the effectiveVisible member to true, even -if the item was created without parent item. Visual items are required -to be added to a visual hierarchy via setParentItem. For this reason, -newly created items never emit visibleChanged when they are added to -a parent. - -Adjust the QQuickItem::visible test - it creates an item hierarchy -without window. Such items are never visible, so add a window and -parent the test item hierarchy to the window's content item. - -This fixes the expected failures in the tests. It does introduce an -incompatibility with QGraphicsView and QGraphicsItem, which continue -to return true from QGraphicsItem::isVisible for items that are not -in an item hierarchy. - -[ChangeLog][Qt Quick][QQuickItem] The visible property of Items without -a parent now always returns false, and the visibleChanged signal gets -emitted when the parent item of a visible item becomes null. - -Fixes: QTBUG-108213 -Change-Id: If4b2947cefd1407853f0f29e6c3fdbd49fc9af65 -Reviewed-by: Fabian Kosmale -Reviewed-by: Shawn Rutledge -(cherry picked from commit d1b9a4cacfb966cf0a37983d8f8044f3aedf5de3) - -CCBUG: 467909 -CCBUG: 396359 ---- - src/quick/items/qquickitem.cpp | 6 ++---- - tests/auto/quick/qquickitem/tst_qquickitem.cpp | 2 ++ - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp -index c370d6e5c3..0d421349d7 100644 ---- a/src/quick/items/qquickitem.cpp -+++ b/src/quick/items/qquickitem.cpp -@@ -6081,10 +6081,8 @@ void QQuickItem::setEnabled(bool e) - - bool QQuickItemPrivate::calcEffectiveVisible() const - { -- // XXX todo - Should the effective visible of an element with no parent just be the current -- // effective visible? This would prevent pointless re-processing in the case of an element -- // moving to/from a no-parent situation, but it is different from what graphics view does. -- return explicitVisible && (!parentItem || QQuickItemPrivate::get(parentItem)->effectiveVisible); -+ // An item is visible if it is a child of a visible parent, and not explicitly hidden. -+ return explicitVisible && parentItem && QQuickItemPrivate::get(parentItem)->effectiveVisible; - } - - bool QQuickItemPrivate::setEffectiveVisibleRecur(bool newEffectiveVisible) -diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp -index 42348d8dd1..34eefd85e6 100644 ---- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp -+++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp -@@ -989,7 +989,9 @@ void tst_qquickitem::setParentItem() - - void tst_qquickitem::visible() - { -+ QQuickWindow window; - QQuickItem *root = new QQuickItem; -+ root->setParentItem(window.contentItem()); - - QQuickItem *child1 = new QQuickItem; - child1->setParentItem(root); --- -2.40.1 - diff --git a/0024-Revert-QQuickItem-Fix-effective-visibility-for-items.patch b/0024-Revert-QQuickItem-Fix-effective-visibility-for-items.patch deleted file mode 100644 index b496c73..0000000 --- a/0024-Revert-QQuickItem-Fix-effective-visibility-for-items.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 70bc0c03423fe861bb917c67041f71e08ec10343 Mon Sep 17 00:00:00 2001 -From: Fushan Wen -Date: Fri, 21 Apr 2023 23:38:04 +0800 -Subject: [PATCH 24/26] Revert "QQuickItem: Fix effective visibility for items - without parent" - -This breaks applications that use QQmlPropertyList to store QQuickItem -and don't set a parentItem for them. - -Ref: https://github.com/musescore/MuseScore/issues/17276 - -This reverts commit 45c22a0221937682f4496801a495458a00f76d3a. ---- - src/quick/items/qquickitem.cpp | 6 ++++-- - tests/auto/quick/qquickitem/tst_qquickitem.cpp | 2 -- - 2 files changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp -index 0d421349d7..c370d6e5c3 100644 ---- a/src/quick/items/qquickitem.cpp -+++ b/src/quick/items/qquickitem.cpp -@@ -6081,8 +6081,10 @@ void QQuickItem::setEnabled(bool e) - - bool QQuickItemPrivate::calcEffectiveVisible() const - { -- // An item is visible if it is a child of a visible parent, and not explicitly hidden. -- return explicitVisible && parentItem && QQuickItemPrivate::get(parentItem)->effectiveVisible; -+ // XXX todo - Should the effective visible of an element with no parent just be the current -+ // effective visible? This would prevent pointless re-processing in the case of an element -+ // moving to/from a no-parent situation, but it is different from what graphics view does. -+ return explicitVisible && (!parentItem || QQuickItemPrivate::get(parentItem)->effectiveVisible); - } - - bool QQuickItemPrivate::setEffectiveVisibleRecur(bool newEffectiveVisible) -diff --git a/tests/auto/quick/qquickitem/tst_qquickitem.cpp b/tests/auto/quick/qquickitem/tst_qquickitem.cpp -index 34eefd85e6..42348d8dd1 100644 ---- a/tests/auto/quick/qquickitem/tst_qquickitem.cpp -+++ b/tests/auto/quick/qquickitem/tst_qquickitem.cpp -@@ -989,9 +989,7 @@ void tst_qquickitem::setParentItem() - - void tst_qquickitem::visible() - { -- QQuickWindow window; - QQuickItem *root = new QQuickItem; -- root->setParentItem(window.contentItem()); - - QQuickItem *child1 = new QQuickItem; - child1->setParentItem(root); --- -2.40.1 - diff --git a/0024-qml-tool-Use-QCommandLineParser-process-rather-than-.patch b/0024-qml-tool-Use-QCommandLineParser-process-rather-than-.patch new file mode 100644 index 0000000..b97d046 --- /dev/null +++ b/0024-qml-tool-Use-QCommandLineParser-process-rather-than-.patch @@ -0,0 +1,57 @@ +From f2e8ebd9e19e0d725c820010ab3cdf153fd62a3b Mon Sep 17 00:00:00 2001 +From: Shawn Rutledge +Date: Tue, 16 May 2023 07:59:46 +0200 +Subject: [PATCH 24/30] qml tool: Use QCommandLineParser::process() rather than + parse() + +This handles the --version, --help and --help-all options. +Apparently there's no other way to handle --help-all, because +addHelpOption() adds two options but only returns one of them. +Amends bb6602bca2b20d98f24320b10c7a039e605c9a05 + +Fixes: QTBUG-100678 +Pick-to: 6.2 6.5 5.15 +Change-Id: Iddd1ba2dae975d7256935d8d357e2f3ac6c013d6 +Reviewed-by: Ulf Hermann +(cherry picked from commit e5007fcc43af6751c72ec970eed11df5fdb8638e) + +* asturmlechner 2023-05-18: Resolve conflict with dev branch commit + a15472716dbef63f1e5ad27ee412c2a2408b44e2 +--- + tools/qml/main.cpp | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp +index beeec88f07..2cb7653d65 100644 +--- a/tools/qml/main.cpp ++++ b/tools/qml/main.cpp +@@ -446,8 +446,8 @@ int main(int argc, char *argv[]) + QCommandLineParser parser; + parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions); + parser.setOptionsAfterPositionalArgumentsMode(QCommandLineParser::ParseAsPositionalArguments); +- const QCommandLineOption helpOption = parser.addHelpOption(); +- const QCommandLineOption versionOption = parser.addVersionOption(); ++ parser.addHelpOption(); ++ parser.addVersionOption(); + #ifdef QT_GUI_LIB + QCommandLineOption apptypeOption(QStringList() << QStringLiteral("a") << QStringLiteral("apptype"), + QCoreApplication::translate("main", "Select which application class to use. Default is gui."), +@@ -522,14 +522,7 @@ int main(int argc, char *argv[]) + parser.addPositionalArgument("args", + QCoreApplication::translate("main", "Arguments after '--' are ignored, but passed through to the application.arguments variable in QML."), "[-- args...]"); + +- if (!parser.parse(QCoreApplication::arguments())) { +- qWarning() << parser.errorText(); +- exit(1); +- } +- if (parser.isSet(versionOption)) +- parser.showVersion(); +- if (parser.isSet(helpOption)) +- parser.showHelp(); ++ parser.process(*app); + if (parser.isSet(listConfOption)) + listConfFiles(); + if (applicationType == QmlApplicationTypeUnknown) { +-- +2.41.0 + diff --git a/0025-Accessibility-respect-value-in-attached-Accessible-i.patch b/0025-Accessibility-respect-value-in-attached-Accessible-i.patch deleted file mode 100644 index 6dc2c08..0000000 --- a/0025-Accessibility-respect-value-in-attached-Accessible-i.patch +++ /dev/null @@ -1,111 +0,0 @@ -From a9f99d945e23b915502ddbd56e20a2af9f33296e Mon Sep 17 00:00:00 2001 -From: Volker Hilsheimer -Date: Tue, 18 Apr 2023 22:05:36 +0200 -Subject: [PATCH 25/26] Accessibility: respect value in attached Accessible in - controls -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -QQuickItemPrivate::accessibleRole is virtual and called by the framework -to determine the role of an item. The default implementation checks and -respects a possible Accessible attached object. However, subclasses that -override the virtual don't, so the attached properties are ignored, and -the class-specific implementation wins. This makes it impossible to -change the role of e.g. a checkable button. - -To fix that, move the code respecting the attached object into a non- -virtual function that the framework calls instead, and only call the -virtual member if there is no attached object, or if that object is not -initialized with a role. Replace calls to the virtual from the -framework with calls to the non-virtual wrapper. - -Do this for both QQuickItem and for QQuickPopup, and adjust the logic -in QQuickControl types that create an attached object and initialize -it's role when accessibility becomes active. Use the non-overridable -effective role value for that as well. - -Add a test case, and to avoid any new framework calls to the virtual, -make it private. - -Fixes: QTBUG-110114 -Pick-to: 6.5 6.2 -Change-Id: Ia709cecbd181b6d8ee3297a4af60c1e7db9a2c51 -Reviewed-by: Qt CI Bot -Reviewed-by: Jan Arve Sæther -(cherry picked from commit 3c08d08ae2bbd449cc0579a1b3cb499383c7a60c) ---- - src/quick/accessible/qaccessiblequickitem.cpp | 2 +- - src/quick/items/qquickitem.cpp | 17 ++++++++++++----- - src/quick/items/qquickitem_p.h | 3 +++ - 3 files changed, 16 insertions(+), 6 deletions(-) - -diff --git a/src/quick/accessible/qaccessiblequickitem.cpp b/src/quick/accessible/qaccessiblequickitem.cpp -index a8df58d450..99e6eff7c3 100644 ---- a/src/quick/accessible/qaccessiblequickitem.cpp -+++ b/src/quick/accessible/qaccessiblequickitem.cpp -@@ -230,7 +230,7 @@ QAccessible::Role QAccessibleQuickItem::role() const - - QAccessible::Role role = QAccessible::NoRole; - if (item()) -- role = QQuickItemPrivate::get(item())->accessibleRole(); -+ role = QQuickItemPrivate::get(item())->effectiveAccessibleRole(); - if (role == QAccessible::NoRole) { - if (qobject_cast(const_cast(item()))) - role = QAccessible::StaticText; -diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp -index c370d6e5c3..9e8b289376 100644 ---- a/src/quick/items/qquickitem.cpp -+++ b/src/quick/items/qquickitem.cpp -@@ -2400,7 +2400,7 @@ bool QQuickItemPrivate::canAcceptTabFocus(QQuickItem *item) - return true; - - #if QT_CONFIG(accessibility) -- QAccessible::Role role = QQuickItemPrivate::get(item)->accessibleRole(); -+ QAccessible::Role role = QQuickItemPrivate::get(item)->effectiveAccessibleRole(); - if (role == QAccessible::EditableText || role == QAccessible::Table || role == QAccessible::List) { - return true; - } else if (role == QAccessible::ComboBox || role == QAccessible::SpinBox) { -@@ -9000,13 +9000,20 @@ QQuickItemPrivate::ExtraData::ExtraData() - - - #if QT_CONFIG(accessibility) --QAccessible::Role QQuickItemPrivate::accessibleRole() const -+QAccessible::Role QQuickItemPrivate::effectiveAccessibleRole() const - { - Q_Q(const QQuickItem); -- QQuickAccessibleAttached *accessibleAttached = qobject_cast(qmlAttachedPropertiesObject(q, false)); -- if (accessibleAttached) -- return accessibleAttached->role(); -+ auto *attached = qmlAttachedPropertiesObject(q, false); -+ auto role = QAccessible::NoRole; -+ if (auto *accessibleAttached = qobject_cast(attached)) -+ role = accessibleAttached->role(); -+ if (role == QAccessible::NoRole) -+ role = accessibleRole(); -+ return role; -+} - -+QAccessible::Role QQuickItemPrivate::accessibleRole() const -+{ - return QAccessible::NoRole; - } - #endif -diff --git a/src/quick/items/qquickitem_p.h b/src/quick/items/qquickitem_p.h -index ade8fb61f2..6f329bd119 100644 ---- a/src/quick/items/qquickitem_p.h -+++ b/src/quick/items/qquickitem_p.h -@@ -575,7 +575,10 @@ public: - virtual void implicitHeightChanged(); - - #if QT_CONFIG(accessibility) -+ QAccessible::Role effectiveAccessibleRole() const; -+private: - virtual QAccessible::Role accessibleRole() const; -+public: - #endif - - void setImplicitAntialiasing(bool antialiasing); --- -2.40.1 - diff --git a/0025-JIT-Add-missing-STORE-LOAD-_ACC-to-CreateCallContext.patch b/0025-JIT-Add-missing-STORE-LOAD-_ACC-to-CreateCallContext.patch new file mode 100644 index 0000000..c5dc363 --- /dev/null +++ b/0025-JIT-Add-missing-STORE-LOAD-_ACC-to-CreateCallContext.patch @@ -0,0 +1,49 @@ +From cbfce7fd236c5305d85371c058a34f8f25e949fa Mon Sep 17 00:00:00 2001 +From: Ulf Hermann +Date: Wed, 15 Mar 2023 08:59:43 +0100 +Subject: [PATCH 25/30] JIT: Add missing {STORE|LOAD}_ACC() to + CreateCallContext + +We cannot assume anything about the accumulator register after calling +PushCallContext::call(). Also add a note about not needing to re-load +the accumulator on ThrowException. + +Pick-to: 6.5 6.2 5.15 +Fixes: QTBUG-111935 +Change-Id: I7196585e1d2697c215f4fe87d8d7ac9b98b622a3 +Reviewed-by: +Reviewed-by: Qt CI Bot +Reviewed-by: Fabian Kosmale +(cherry picked from commit 15ec024152a1d1d99a4934f7b2408e7af7b2552a) +--- + src/qml/jit/qv4baselinejit.cpp | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/src/qml/jit/qv4baselinejit.cpp b/src/qml/jit/qv4baselinejit.cpp +index 45150cfffd..5ad53faf95 100644 +--- a/src/qml/jit/qv4baselinejit.cpp ++++ b/src/qml/jit/qv4baselinejit.cpp +@@ -540,6 +540,8 @@ void BaselineJIT::generate_ThrowException() + as->passEngineAsArg(0); + BASELINEJIT_GENERATE_RUNTIME_CALL(ThrowException, CallResultDestination::Ignore); + as->gotoCatchException(); ++ ++ // LOAD_ACC(); <- not needed here since it would be unreachable. + } + + void BaselineJIT::generate_GetException() { as->getException(); } +@@ -547,9 +549,11 @@ void BaselineJIT::generate_SetException() { as->setException(); } + + void BaselineJIT::generate_CreateCallContext() + { ++ STORE_ACC(); + as->prepareCallWithArgCount(1); + as->passCppFrameAsArg(0); + BASELINEJIT_GENERATE_RUNTIME_CALL(PushCallContext, CallResultDestination::Ignore); ++ LOAD_ACC(); + } + + void BaselineJIT::generate_PushCatchContext(int index, int name) { as->pushCatchContext(index, name); } +-- +2.41.0 + diff --git a/0026-QQmlJs-MemoryPool-fix-potential-UB-pointer-overflow.patch b/0026-QQmlJs-MemoryPool-fix-potential-UB-pointer-overflow.patch new file mode 100644 index 0000000..cb672fc --- /dev/null +++ b/0026-QQmlJs-MemoryPool-fix-potential-UB-pointer-overflow.patch @@ -0,0 +1,45 @@ +From 7368a55a926719577c36e5978d67c008474a85a0 Mon Sep 17 00:00:00 2001 +From: Marc Mutz +Date: Tue, 27 Jun 2023 13:02:45 +0200 +Subject: [PATCH 26/30] QQmlJs::MemoryPool: fix potential UB (pointer overflow) +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +A check like (p1 + s op p2) is dangerous, because p1 + s may overflow, +and that would be UB, so the compiler can assume it doesn't happen and +break the check. + +Reformulate the expression by subtracting p1 from both sides. Cast the +ptrdiff_t to size_t to avoid -Wsign-compare. This is safe because _end +is always ≥ _ptr. + +As a drive-by, remove extra parentheses. + +Pick-to: 6.6 6.5 6.2 5.15 +Change-Id: If240d685fe48196ab5ceb7ff39736b73c8997e30 +Reviewed-by: Ulf Hermann +(cherry picked from commit 8a39f7655f4cfbc35c1886b49e2f3a9ada263e39) + +* asturmlechner 2023-06-29: Resolve conflict with dev branch commit + 1b10ce6a08edbc2ac7e8fd7e97e3fc691f2081df by dropping unrelated bits +--- + src/qml/common/qqmljsmemorypool_p.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/qml/common/qqmljsmemorypool_p.h b/src/qml/common/qqmljsmemorypool_p.h +index 0cf7ea84e6..1b81a87a2c 100644 +--- a/src/qml/common/qqmljsmemorypool_p.h ++++ b/src/qml/common/qqmljsmemorypool_p.h +@@ -87,7 +87,7 @@ public: + inline void *allocate(size_t size) + { + size = (size + 7) & ~size_t(7); +- if (Q_LIKELY(_ptr && (_ptr + size < _end))) { ++ if (Q_LIKELY(_ptr && size < size_t(_end - _ptr))) { + void *addr = _ptr; + _ptr += size; + return addr; +-- +2.41.0 + diff --git a/0026-qml-tool-Use-QCommandLineParser-process-rather-than-.patch b/0026-qml-tool-Use-QCommandLineParser-process-rather-than-.patch deleted file mode 100644 index e8dba9e..0000000 --- a/0026-qml-tool-Use-QCommandLineParser-process-rather-than-.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 5352f113b3c7a5af2ad2741d593c6e6a758eb93e Mon Sep 17 00:00:00 2001 -From: Shawn Rutledge -Date: Tue, 16 May 2023 07:59:46 +0200 -Subject: [PATCH 26/26] qml tool: Use QCommandLineParser::process() rather than - parse() - -This handles the --version, --help and --help-all options. -Apparently there's no other way to handle --help-all, because -addHelpOption() adds two options but only returns one of them. -Amends bb6602bca2b20d98f24320b10c7a039e605c9a05 - -Fixes: QTBUG-100678 -Pick-to: 6.2 6.5 5.15 -Change-Id: Iddd1ba2dae975d7256935d8d357e2f3ac6c013d6 -Reviewed-by: Ulf Hermann -(cherry picked from commit e5007fcc43af6751c72ec970eed11df5fdb8638e) - -* asturmlechner 2023-05-18: Resolve conflict with dev branch commit - a15472716dbef63f1e5ad27ee412c2a2408b44e2 ---- - tools/qml/main.cpp | 13 +++---------- - 1 file changed, 3 insertions(+), 10 deletions(-) - -diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp -index beeec88f07..2cb7653d65 100644 ---- a/tools/qml/main.cpp -+++ b/tools/qml/main.cpp -@@ -446,8 +446,8 @@ int main(int argc, char *argv[]) - QCommandLineParser parser; - parser.setSingleDashWordOptionMode(QCommandLineParser::ParseAsLongOptions); - parser.setOptionsAfterPositionalArgumentsMode(QCommandLineParser::ParseAsPositionalArguments); -- const QCommandLineOption helpOption = parser.addHelpOption(); -- const QCommandLineOption versionOption = parser.addVersionOption(); -+ parser.addHelpOption(); -+ parser.addVersionOption(); - #ifdef QT_GUI_LIB - QCommandLineOption apptypeOption(QStringList() << QStringLiteral("a") << QStringLiteral("apptype"), - QCoreApplication::translate("main", "Select which application class to use. Default is gui."), -@@ -522,14 +522,7 @@ int main(int argc, char *argv[]) - parser.addPositionalArgument("args", - QCoreApplication::translate("main", "Arguments after '--' are ignored, but passed through to the application.arguments variable in QML."), "[-- args...]"); - -- if (!parser.parse(QCoreApplication::arguments())) { -- qWarning() << parser.errorText(); -- exit(1); -- } -- if (parser.isSet(versionOption)) -- parser.showVersion(); -- if (parser.isSet(helpOption)) -- parser.showHelp(); -+ parser.process(*app); - if (parser.isSet(listConfOption)) - listConfFiles(); - if (applicationType == QmlApplicationTypeUnknown) { --- -2.40.1 - diff --git a/0027-QRecyclePool-fix-potential-UB.patch b/0027-QRecyclePool-fix-potential-UB.patch new file mode 100644 index 0000000..590494f --- /dev/null +++ b/0027-QRecyclePool-fix-potential-UB.patch @@ -0,0 +1,54 @@ +From d15af4ca5c7b94b1ce1fa202c33e5dc1640185c7 Mon Sep 17 00:00:00 2001 +From: Marc Mutz +Date: Mon, 26 Jun 2023 11:00:56 +0200 +Subject: [PATCH 27/30] QRecyclePool: fix potential UB + +Return the pointer returned by placement new, not the pointer used as +input to placement new. There is a subtle difference and this grey +zone of the C++ standard is best avoided (keyword: std::launder()). + +Pick-to: 6.6 6.5 6.2 5.15 +Change-Id: I27c159cdb29a5837120f3d44aa6c95da040fd1a2 +Reviewed-by: Ulf Hermann +(cherry picked from commit 7381110745572478ffa3c68000574bc4ccb2396c) +--- + src/qml/qml/ftw/qrecyclepool_p.h | 9 +++------ + 1 file changed, 3 insertions(+), 6 deletions(-) + +diff --git a/src/qml/qml/ftw/qrecyclepool_p.h b/src/qml/qml/ftw/qrecyclepool_p.h +index 39f4f88512..c963e1878e 100644 +--- a/src/qml/qml/ftw/qrecyclepool_p.h ++++ b/src/qml/qml/ftw/qrecyclepool_p.h +@@ -130,8 +130,7 @@ template + T *QRecyclePool::New() + { + T *rv = d->allocate(); +- new (rv) T; +- return rv; ++ return new (rv) T; + } + + template +@@ -139,8 +138,7 @@ template + T *QRecyclePool::New(const T1 &a) + { + T *rv = d->allocate(); +- new (rv) T(a); +- return rv; ++ return new (rv) T(a); + } + + template +@@ -148,8 +146,7 @@ template + T *QRecyclePool::New(T1 &a) + { + T *rv = d->allocate(); +- new (rv) T(a); +- return rv; ++ return new (rv) T(a); + } + + template +-- +2.41.0 + diff --git a/0028-QtQml-Clean-up-QQmlData-ctor.patch b/0028-QtQml-Clean-up-QQmlData-ctor.patch new file mode 100644 index 0000000..6fb4d89 --- /dev/null +++ b/0028-QtQml-Clean-up-QQmlData-ctor.patch @@ -0,0 +1,111 @@ +From 6d290336ef7c65041c7f6eb9b5094f6c4de5f845 Mon Sep 17 00:00:00 2001 +From: Ulf Hermann +Date: Mon, 10 Jul 2023 07:43:28 +0200 +Subject: [PATCH 28/30] QtQml: Clean up QQmlData ctor +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Initialize the "dummy" member even though we never use it. Static +analyzers complain about it and we may appreciate it having a defined +value in the future. Also, initialize other members inline where +possible. + +Coverity-Id: 415867 +Change-Id: Ie428eb3294d6363afe9d7ab2d2bed6e52df0b304 +Reviewed-by: Olivier De Cannière +Reviewed-by: Fabian Kosmale +(cherry picked from commit 10985a568db8cfb4140140967f7d247627ec4350) + +* asturmlechner 2023-08-12: Resolve conflicts with dev branch commits + 10985a568db8cfb4140140967f7d247627ec4350 and + e5246cafffb93f69a49c133210390c253fcb71f2 and + d3b3fef5a878d7fd53de6a9f9fff196a273930e3 +--- + src/qml/qml/qqmldata_p.h | 20 ++++++++++---------- + src/qml/qml/qqmlengine.cpp | 7 ++----- + 2 files changed, 12 insertions(+), 15 deletions(-) + +diff --git a/src/qml/qml/qqmldata_p.h b/src/qml/qml/qqmldata_p.h +index ee31cb38d9..bb0adf9dfa 100644 +--- a/src/qml/qml/qqmldata_p.h ++++ b/src/qml/qml/qqmldata_p.h +@@ -187,7 +187,7 @@ public: + private: + void layout(QQmlNotifierEndpoint*); + }; +- NotifyList *notifyList; ++ NotifyList *notifyList = nullptr; + + inline QQmlNotifierEndpoint *notify(int index); + void addNotify(int index, QQmlNotifierEndpoint *); +@@ -201,12 +201,12 @@ public: + QQmlContextData *outerContext = nullptr; + QQmlContextDataRef ownContext; + +- QQmlAbstractBinding *bindings; +- QQmlBoundSignal *signalHandlers; ++ QQmlAbstractBinding *bindings = nullptr; ++ QQmlBoundSignal *signalHandlers = nullptr; + + // Linked list for QQmlContext::contextObjects +- QQmlData *nextContextObject; +- QQmlData**prevContextObject; ++ QQmlData *nextContextObject = nullptr; ++ QQmlData**prevContextObject = nullptr; + + inline bool hasBindingBit(int) const; + inline void setBindingBit(QObject *obj, int); +@@ -216,10 +216,10 @@ public: + inline void setPendingBindingBit(QObject *obj, int); + inline void clearPendingBindingBit(int); + +- quint16 lineNumber; +- quint16 columnNumber; ++ quint16 lineNumber = 0; ++ quint16 columnNumber = 0; + +- quint32 jsEngineId; // id of the engine that created the jsWrapper ++ quint32 jsEngineId = 0; // id of the engine that created the jsWrapper + + struct DeferredData { + DeferredData(); +@@ -240,7 +240,7 @@ public: + + QQmlPropertyCache *propertyCache; + +- QQmlGuardImpl *guards; ++ QQmlGuardImpl *guards = 0; + + static QQmlData *get(const QObject *object, bool create = false) { + QObjectPrivate *priv = QObjectPrivate::get(const_cast(object)); +@@ -289,7 +289,7 @@ public: + + private: + // For attachedProperties +- mutable QQmlDataExtended *extendedData; ++ mutable QQmlDataExtended *extendedData = nullptr; + + Q_NEVER_INLINE static QQmlData *createQQmlData(QObjectPrivate *priv); + Q_NEVER_INLINE static QQmlPropertyCache *createPropertyCache(QJSEngine *engine, QObject *object); +diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp +index 852a673ebd..86a2d2b45a 100644 +--- a/src/qml/qml/qqmlengine.cpp ++++ b/src/qml/qml/qqmlengine.cpp +@@ -725,11 +725,8 @@ void QQmlPrivate::qdeclarativeelement_destructor(QObject *o) + QQmlData::QQmlData() + : ownedByQml1(false), ownMemory(true), indestructible(true), explicitIndestructibleSet(false), + hasTaintedV4Object(false), isQueuedForDeletion(false), rootObjectInCreation(false), +- hasInterceptorMetaObject(false), hasVMEMetaObject(false), parentFrozen(false), +- bindingBitsArraySize(InlineBindingArraySize), notifyList(nullptr), +- bindings(nullptr), signalHandlers(nullptr), nextContextObject(nullptr), prevContextObject(nullptr), +- lineNumber(0), columnNumber(0), jsEngineId(0), +- propertyCache(nullptr), guards(nullptr), extendedData(nullptr) ++ hasInterceptorMetaObject(false), hasVMEMetaObject(false), parentFrozen(false), dummy(0), ++ bindingBitsArraySize(InlineBindingArraySize), propertyCache(nullptr) + { + memset(bindingBitsValue, 0, sizeof(bindingBitsValue)); + init(); +-- +2.41.0 + diff --git a/0029-QML-Make-notify-list-thread-safe.patch b/0029-QML-Make-notify-list-thread-safe.patch new file mode 100644 index 0000000..b45eebc --- /dev/null +++ b/0029-QML-Make-notify-list-thread-safe.patch @@ -0,0 +1,277 @@ +From 9f029563b151eb4a41f9b548376093e288aa0331 Mon Sep 17 00:00:00 2001 +From: Ulf Hermann +Date: Tue, 8 Aug 2023 14:54:01 +0200 +Subject: [PATCH 29/30] QML: Make notify list thread safe + +We keep the notifyList itself alive until the QQmlData itself is +deleted. This way any isSignalConnected() called while an +intermediate dtor runs can safely access it. We use atomics to make the +concurrent access to the pointer and the connection mask defined +behavior. However, we never need anything but relaxed semantics when +accessing it. + +Pick-to: 5.15 6.2 6.5 6.6 +Fixes: QTBUG-105090 +Change-Id: I82537be86e5cc33c2a3d76ec639fcbac87eb45ad +Reviewed-by: Fabian Kosmale +Reviewed-by: Qt CI Bot +(cherry picked from commit 691956654c1acab356ce704c58602cc3a99fabc3) + +* asturmlechner 2023-08-12: Resolve conflict with dev branch commit + c249edb83fa67b3e5f711b28923397e66876182d which introduces a behavior + change, so cannot be backported. Applied changes logically as if that + commit never happened. +--- + src/qml/qml/qqmldata_p.h | 66 ++++++++++++++++++----------- + src/qml/qml/qqmlengine.cpp | 85 +++++++++++++++++++++++++------------- + 2 files changed, 99 insertions(+), 52 deletions(-) + +diff --git a/src/qml/qml/qqmldata_p.h b/src/qml/qml/qqmldata_p.h +index bb0adf9dfa..187339169b 100644 +--- a/src/qml/qml/qqmldata_p.h ++++ b/src/qml/qml/qqmldata_p.h +@@ -176,24 +176,24 @@ public: + }; + + struct NotifyList { +- quint64 connectionMask; +- +- quint16 maximumTodoIndex; +- quint16 notifiesSize; +- +- QQmlNotifierEndpoint *todo; +- QQmlNotifierEndpoint**notifies; ++ QAtomicInteger connectionMask; ++ QQmlNotifierEndpoint *todo = nullptr; ++ QQmlNotifierEndpoint**notifies = nullptr; ++ quint16 maximumTodoIndex = 0; ++ quint16 notifiesSize = 0; + void layout(); + private: + void layout(QQmlNotifierEndpoint*); + }; +- NotifyList *notifyList = nullptr; ++ QAtomicPointer notifyList; + +- inline QQmlNotifierEndpoint *notify(int index); ++ inline QQmlNotifierEndpoint *notify(int index) const; + void addNotify(int index, QQmlNotifierEndpoint *); + int endpointCount(int index); + bool signalHasEndpoint(int index) const; +- void disconnectNotifiers(); ++ ++ enum class DeleteNotifyList { Yes, No }; ++ void disconnectNotifiers(DeleteNotifyList doDelete); + + // The context that created the C++ object + QQmlContextData *context = nullptr; +@@ -240,7 +240,7 @@ public: + + QQmlPropertyCache *propertyCache; + +- QQmlGuardImpl *guards = 0; ++ QQmlGuardImpl *guards = nullptr; + + static QQmlData *get(const QObject *object, bool create = false) { + QObjectPrivate *priv = QObjectPrivate::get(const_cast(object)); +@@ -342,23 +342,31 @@ bool QQmlData::wasDeleted(const QObject *object) + return ddata && ddata->isQueuedForDeletion; + } + +-QQmlNotifierEndpoint *QQmlData::notify(int index) ++inline bool isIndexInConnectionMask(quint64 connectionMask, int index) ++{ ++ return connectionMask & (1ULL << quint64(index % 64)); ++} ++ ++QQmlNotifierEndpoint *QQmlData::notify(int index) const + { ++ // Can only happen on "home" thread. We apply relaxed semantics when loading the atomics. ++ + Q_ASSERT(index <= 0xFFFF); + +- if (!notifyList || !(notifyList->connectionMask & (1ULL << quint64(index % 64)))) { ++ NotifyList *list = notifyList.loadRelaxed(); ++ if (!list || !isIndexInConnectionMask(list->connectionMask.loadRelaxed(), index)) + return nullptr; +- } else if (index < notifyList->notifiesSize) { +- return notifyList->notifies[index]; +- } else if (index <= notifyList->maximumTodoIndex) { +- notifyList->layout(); +- } + +- if (index < notifyList->notifiesSize) { +- return notifyList->notifies[index]; +- } else { +- return nullptr; ++ if (index < list->notifiesSize) ++ return list->notifies[index]; ++ ++ if (index <= list->maximumTodoIndex) { ++ list->layout(); ++ if (index < list->notifiesSize) ++ return list->notifies[index]; + } ++ ++ return nullptr; + } + + /* +@@ -367,7 +375,19 @@ QQmlNotifierEndpoint *QQmlData::notify(int index) + */ + inline bool QQmlData::signalHasEndpoint(int index) const + { +- return notifyList && (notifyList->connectionMask & (1ULL << quint64(index % 64))); ++ // This can be called from any thread. ++ // We still use relaxed semantics. If we're on a thread different from the "home" thread ++ // of the QQmlData, two interesting things might happen: ++ // ++ // 1. The list might go away while we hold it. In that case we are dealing with an object whose ++ // QObject dtor is being executed concurrently. This is UB already without the notify lists. ++ // Therefore, we don't need to consider it. ++ // 2. The connectionMask may be amended or zeroed while we are looking at it. In that case ++ // we "misreport" the endpoint. Since ordering of events across threads is inherently ++ // nondeterministic, either result is correct in that case. We can accept it. ++ ++ NotifyList *list = notifyList.loadRelaxed(); ++ return list && isIndexInConnectionMask(list->connectionMask.loadRelaxed(), index); + } + + bool QQmlData::hasBindingBit(int coreIndex) const +diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp +index 86a2d2b45a..d6b2711c2d 100644 +--- a/src/qml/qml/qqmlengine.cpp ++++ b/src/qml/qml/qqmlengine.cpp +@@ -718,7 +718,7 @@ void QQmlPrivate::qdeclarativeelement_destructor(QObject *o) + // Disconnect the notifiers now - during object destruction this would be too late, since + // the disconnect call wouldn't be able to call disconnectNotify(), as it isn't possible to + // get the metaobject anymore. +- d->disconnectNotifiers(); ++ d->disconnectNotifiers(QQmlData::DeleteNotifyList::No); + } + } + +@@ -786,7 +786,10 @@ void QQmlData::signalEmitted(QAbstractDeclarativeData *, QObject *object, int in + // QQmlEngine to emit signals from a different thread. These signals are then automatically + // marshalled back onto the QObject's thread and handled by QML from there. This is tested + // by the qqmlecmascript::threadSignal() autotest. +- if (!ddata->notifyList) ++ ++ // Relaxed semantics here. If we're on a different thread we might schedule a useless event, ++ // but that should be rare. ++ if (!ddata->notifyList.loadRelaxed()) + return; + + auto objectThreadData = QObjectPrivate::get(object)->threadData.loadRelaxed(); +@@ -1832,49 +1835,73 @@ void QQmlData::releaseDeferredData() + + void QQmlData::addNotify(int index, QQmlNotifierEndpoint *endpoint) + { +- if (!notifyList) { +- notifyList = (NotifyList *)malloc(sizeof(NotifyList)); +- notifyList->connectionMask = 0; +- notifyList->maximumTodoIndex = 0; +- notifyList->notifiesSize = 0; +- notifyList->todo = nullptr; +- notifyList->notifies = nullptr; ++ // Can only happen on "home" thread. We apply relaxed semantics when loading the atomics. ++ ++ NotifyList *list = notifyList.loadRelaxed(); ++ ++ if (!list) { ++ list = new NotifyList; ++ // We don't really care when this change takes effect on other threads. The notifyList can ++ // only become non-null once in the life time of a QQmlData. It becomes null again when the ++ // underlying QObject is deleted. At that point any interaction with the QQmlData is UB ++ // anyway. So, for all intents and purposese, the list becomes non-null once and then stays ++ // non-null "forever". We can apply relaxed semantics. ++ notifyList.storeRelaxed(list); + } + + Q_ASSERT(!endpoint->isConnected()); + + index = qMin(index, 0xFFFF - 1); +- notifyList->connectionMask |= (1ULL << quint64(index % 64)); + +- if (index < notifyList->notifiesSize) { ++ // Likewise, we don't really care _when_ the change in the connectionMask is propagated to other ++ // threads. Cross-thread event ordering is inherently nondeterministic. Therefore, when querying ++ // the conenctionMask in the presence of concurrent modification, any result is correct. ++ list->connectionMask.storeRelaxed( ++ list->connectionMask.loadRelaxed() | (1ULL << quint64(index % 64))); + +- endpoint->next = notifyList->notifies[index]; ++ if (index < list->notifiesSize) { ++ endpoint->next = list->notifies[index]; + if (endpoint->next) endpoint->next->prev = &endpoint->next; +- endpoint->prev = ¬ifyList->notifies[index]; +- notifyList->notifies[index] = endpoint; +- ++ endpoint->prev = &list->notifies[index]; ++ list->notifies[index] = endpoint; + } else { +- notifyList->maximumTodoIndex = qMax(int(notifyList->maximumTodoIndex), index); ++ list->maximumTodoIndex = qMax(int(list->maximumTodoIndex), index); + +- endpoint->next = notifyList->todo; ++ endpoint->next = list->todo; + if (endpoint->next) endpoint->next->prev = &endpoint->next; +- endpoint->prev = ¬ifyList->todo; +- notifyList->todo = endpoint; ++ endpoint->prev = &list->todo; ++ list->todo = endpoint; + } + } + +-void QQmlData::disconnectNotifiers() ++void QQmlData::disconnectNotifiers(QQmlData::DeleteNotifyList doDelete) + { +- if (notifyList) { +- while (notifyList->todo) +- notifyList->todo->disconnect(); +- for (int ii = 0; ii < notifyList->notifiesSize; ++ii) { +- while (QQmlNotifierEndpoint *ep = notifyList->notifies[ii]) ++ // Can only happen on "home" thread. We apply relaxed semantics when loading the atomics. ++ if (NotifyList *list = notifyList.loadRelaxed()) { ++ while (QQmlNotifierEndpoint *todo = list->todo) ++ todo->disconnect(); ++ for (int ii = 0; ii < list->notifiesSize; ++ii) { ++ while (QQmlNotifierEndpoint *ep = list->notifies[ii]) + ep->disconnect(); + } +- free(notifyList->notifies); +- free(notifyList); +- notifyList = nullptr; ++ free(list->notifies); ++ ++ if (doDelete == DeleteNotifyList::Yes) { ++ // We can only get here from QQmlData::destroyed(), and that can only come from the ++ // the QObject dtor. If you're still sending signals at that point you have UB already ++ // without any threads. Therefore, it's enough to apply relaxed semantics. ++ notifyList.storeRelaxed(nullptr); ++ delete list; ++ } else { ++ // We can use relaxed semantics here. The worst thing that can happen is that some ++ // signal is falsely reported as connected. Signal connectedness across threads ++ // is not quite deterministic anyway. ++ list->connectionMask.storeRelaxed(0); ++ list->maximumTodoIndex = 0; ++ list->notifiesSize = 0; ++ list->notifies = nullptr; ++ ++ } + } + } + +@@ -1958,7 +1985,7 @@ void QQmlData::destroyed(QObject *object) + guard->objectDestroyed(object); + } + +- disconnectNotifiers(); ++ disconnectNotifiers(DeleteNotifyList::Yes); + + if (extendedData) + delete extendedData; +-- +2.41.0 + diff --git a/0030-Flickable-prevent-fixup-from-being-called-while-drag.patch b/0030-Flickable-prevent-fixup-from-being-called-while-drag.patch new file mode 100644 index 0000000..7647c04 --- /dev/null +++ b/0030-Flickable-prevent-fixup-from-being-called-while-drag.patch @@ -0,0 +1,116 @@ +From 1b0e366092bcfae0392592c3b7891f0e47af1018 Mon Sep 17 00:00:00 2001 +From: Oliver Eftevaag +Date: Fri, 9 Dec 2022 18:40:54 +0100 +Subject: [PATCH 30/30] Flickable: prevent fixup() from being called while + dragging +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +A previous patch 5647527a8cde84b51fff66fc482f02435770b3dd causes +a regression. The purpose of the patch, that caused this regression, +was to update the pressPos variables, in cases where the contentItem's +geometry was modified externally, while a user were dragging the +contentItem around. + +The mistake that was made, was how width and height changes were +handled. We had previously added logic in setContentWidth() and +setContentHeight() that would call fixup() (with immediate fixupMode) +to ensure that the contentItem would immediately be repositioned +inside the flickable's viewport, if the contentItem was being dragged. + +It turns out that setContentWidth() and setContentHeight() are being +called from QQuickItemViewPrivate::updateViewport(), which happens +quite often, while dragging. This would make fixup() and dragging +constantly interfere with each other, since they'd not always agree on +a specific position for the contentItem. + +This patch reverts the changes made to setContentWidth() and +setContentHeight(), since it turns out that those changes weren't +necessary after all. QQuickFlickablePrivate::itemGeometryChanged() only +calls viewportMoved() on x and y changes anyways. + +Done-with: Jan Arve Sæther +Done-with: Santhosh Kumar Selvaraj +Fixes: QTBUG-109140 +Pick-to: 5.15 6.2 6.3 6.4 6.5 +Change-Id: I0bddf8685d3afc1ae04b2c092212d3c1bd742c3b +Reviewed-by: Paul Wicking +(cherry picked from commit b307bf3c4f63c6e04874a972c747f18e18ddc199) +--- + src/quick/items/qquickflickable.cpp | 8 ++------ + src/quick/items/qquickflickable_p_p.h | 1 + + tests/auto/quick/qquickflickable/tst_qquickflickable.cpp | 8 +++++++- + 3 files changed, 10 insertions(+), 7 deletions(-) + +diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp +index ea357d819d..2634b68248 100644 +--- a/src/quick/items/qquickflickable.cpp ++++ b/src/quick/items/qquickflickable.cpp +@@ -2120,11 +2120,9 @@ void QQuickFlickable::setContentWidth(qreal w) + d->contentItem->setWidth(w); + d->hData.markExtentsDirty(); + // Make sure that we're entirely in view. +- if ((!d->pressed && !d->hData.moving && !d->vData.moving) || d->hData.dragging) { +- d->hData.contentPositionChangedExternallyDuringDrag = d->hData.dragging; ++ if (!d->pressed && !d->hData.moving && !d->vData.moving) { + d->fixupMode = QQuickFlickablePrivate::Immediate; + d->fixupX(); +- d->hData.contentPositionChangedExternallyDuringDrag = false; + } else if (!d->pressed && d->hData.fixingUp) { + d->fixupMode = QQuickFlickablePrivate::ExtentChanged; + d->fixupX(); +@@ -2151,11 +2149,9 @@ void QQuickFlickable::setContentHeight(qreal h) + d->contentItem->setHeight(h); + d->vData.markExtentsDirty(); + // Make sure that we're entirely in view. +- if ((!d->pressed && !d->hData.moving && !d->vData.moving) || d->vData.dragging) { +- d->vData.contentPositionChangedExternallyDuringDrag = d->vData.dragging; ++ if (!d->pressed && !d->hData.moving && !d->vData.moving) { + d->fixupMode = QQuickFlickablePrivate::Immediate; + d->fixupY(); +- d->vData.contentPositionChangedExternallyDuringDrag = false; + } else if (!d->pressed && d->vData.fixingUp) { + d->fixupMode = QQuickFlickablePrivate::ExtentChanged; + d->fixupY(); +diff --git a/src/quick/items/qquickflickable_p_p.h b/src/quick/items/qquickflickable_p_p.h +index d5d838eaea..aef15e150a 100644 +--- a/src/quick/items/qquickflickable_p_p.h ++++ b/src/quick/items/qquickflickable_p_p.h +@@ -120,6 +120,7 @@ public: + dragStartOffset = 0; + fixingUp = false; + inOvershoot = false; ++ contentPositionChangedExternallyDuringDrag = false; + } + + void markExtentsDirty() { +diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +index d092cd0170..62f7c67dd4 100644 +--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp ++++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +@@ -2642,7 +2642,12 @@ void tst_qquickflickable::setContentPositionWhileDragging() // QTBUG-104966 + } else if (newExtent >= 0) { + // ...or reduce the content size be be less than current (contentX, contentY) position + // This forces the content item to move. +- expectedContentPos = moveDelta; ++ // contentY: 150 ++ // 320 - 150 = 170 pixels down to bottom ++ // Now reduce contentHeight to 200 ++ // since we are at the bottom, and the flickable is 100 pixels tall, contentY must land ++ // at newExtent - 100. ++ + if (isHorizontal) { + flickable->setContentWidth(newExtent); + } else { +@@ -2652,6 +2657,7 @@ void tst_qquickflickable::setContentPositionWhileDragging() // QTBUG-104966 + // We therefore cannot scroll/flick it further down. Drag it up towards the top instead + // (by moving mouse down). + pos += moveDelta; ++ expectedContentPos = unitDelta * (newExtent - (isHorizontal ? flickable->width() : flickable->height())); + } + + QTest::mouseMove(window.data(), pos); +-- +2.41.0 + diff --git a/qt-QTBUG-111935-fix-V4-jit.patch b/qt-QTBUG-111935-fix-V4-jit.patch deleted file mode 100644 index 96ad2c1..0000000 --- a/qt-QTBUG-111935-fix-V4-jit.patch +++ /dev/null @@ -1,44 +0,0 @@ -From e2bdde18d9758efdc6a0d7d106aad56995df1271 Mon Sep 17 00:00:00 2001 -From: Ulf Hermann -Date: Wed, 15 Mar 2023 08:59:43 +0100 -Subject: [PATCH] JIT: Add missing {STORE|LOAD}_ACC() to CreateCallContext - -We cannot assume anything about the accumulator register after calling -PushCallContext::call(). Also add a note about not needing to re-load -the accumulator on ThrowException. - -Pick-to: 6.5 6.2 5.15 -Fixes: QTBUG-111935 -Change-Id: I7196585e1d2697c215f4fe87d8d7ac9b98b622a3 ---- - src/qml/jit/qv4baselinejit.cpp | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/src/qml/jit/qv4baselinejit.cpp b/src/qml/jit/qv4baselinejit.cpp -index 14e183adb8..1d65169dce 100644 ---- a/src/qml/jit/qv4baselinejit.cpp -+++ b/src/qml/jit/qv4baselinejit.cpp -@@ -506,6 +506,8 @@ void BaselineJIT::generate_ThrowException() - as->passEngineAsArg(0); - BASELINEJIT_GENERATE_RUNTIME_CALL(ThrowException, CallResultDestination::Ignore); - as->gotoCatchException(); -+ -+ // LOAD_ACC(); <- not needed here since it would be unreachable. - } - - void BaselineJIT::generate_GetException() { as->getException(); } -@@ -513,9 +515,11 @@ void BaselineJIT::generate_SetException() { as->setException(); } - - void BaselineJIT::generate_CreateCallContext() - { -+ STORE_ACC(); - as->prepareCallWithArgCount(1); - as->passCppFrameAsArg(0); - BASELINEJIT_GENERATE_RUNTIME_CALL(PushCallContext, CallResultDestination::Ignore); -+ LOAD_ACC(); - } - - void BaselineJIT::generate_PushCatchContext(int index, int name) { as->pushCatchContext(index, name); } --- -2.39.2 - diff --git a/qt5-qtdeclarative.spec b/qt5-qtdeclarative.spec index a812a73..6274a13 100644 --- a/qt5-qtdeclarative.spec +++ b/qt5-qtdeclarative.spec @@ -11,8 +11,8 @@ Summary: Qt5 - QtDeclarative component Name: qt5-%{qt_module} -Version: 5.15.10 -Release: 2%{?dist} +Version: 5.15.11 +Release: 1%{?dist} # See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0 @@ -27,42 +27,43 @@ Source5: qv4global_p-multilib.h ## upstream patches ## repo: https://invent.kde.org/qt/qt/qtdeclarative ## branch: kde/5.15 -## git format-patch v5.15.10-lts-lgpl -Patch1: 0001-Remove-unused-QPointer-QQuickPointerMask.patch -Patch2: 0002-QQmlDelegateModel-Refresh-the-view-when-a-column-is-.patch -Patch3: 0003-Fix-TapHandler-so-that-it-actually-registers-a-tap.patch -Patch4: 0004-Revert-Fix-TapHandler-so-that-it-actually-registers-.patch -Patch5: 0005-Make-sure-QQuickWidget-and-its-offscreen-window-s-sc.patch -Patch6: 0006-QQuickItem-Guard-against-cycles-in-nextPrevItemInTab.patch -Patch7: 0007-Don-t-convert-QByteArray-in-startDrag.patch -Patch8: 0008-Fix-build-after-95290f66b806a307b8da1f72f8fc2c698019.patch -Patch9: 0009-Implement-accessibility-for-QQuickWidget.patch -Patch10: 0010-Send-ObjectShow-event-for-visible-components-after-i.patch -Patch11: 0011-QQuickItem-avoid-emitting-signals-during-destruction.patch -Patch12: 0012-a11y-track-item-enabled-state.patch -Patch13: 0013-Make-QaccessibleQuickWidget-private-API.patch -Patch14: 0014-Qml-Don-t-crash-when-as-casting-to-type-with-errors.patch -Patch15: 0015-Fix-missing-glyphs-when-using-NativeRendering.patch -Patch16: 0016-Revert-Fix-missing-glyphs-when-using-NativeRendering.patch -Patch17: 0017-QQmlImportDatabase-Make-sure-the-newly-added-import-.patch -Patch18: 0018-QQuickState-when-handle-QJSValue-properties-correctl.patch -Patch19: 0019-Models-Avoid-crashes-when-deleting-cache-items.patch -Patch20: 0020-qv4function-Fix-crash-due-to-reference-being-invalid.patch -Patch21: 0021-Quick-Animations-Fix-crash.patch -Patch22: 0022-Prevent-crash-when-destroying-asynchronous-Loader.patch -Patch23: 0023-QQuickItem-Fix-effective-visibility-for-items-withou.patch -Patch24: 0024-Revert-QQuickItem-Fix-effective-visibility-for-items.patch -Patch25: 0025-Accessibility-respect-value-in-attached-Accessible-i.patch -Patch26: 0026-qml-tool-Use-QCommandLineParser-process-rather-than-.patch +## git format-patch v5.15.11-lts-lgpl +Patch1: 0001-Remove-unused-QPointer-QQuickPointerMask.patch +Patch2: 0002-QQmlDelegateModel-Refresh-the-view-when-a-column-is-.patch +Patch3: 0003-Fix-TapHandler-so-that-it-actually-registers-a-tap.patch +Patch4: 0004-Revert-Fix-TapHandler-so-that-it-actually-registers-.patch +Patch5: 0005-Make-sure-QQuickWidget-and-its-offscreen-window-s-sc.patch +Patch6: 0006-QQuickItem-Guard-against-cycles-in-nextPrevItemInTab.patch +Patch7: 0007-Don-t-convert-QByteArray-in-startDrag.patch +Patch8: 0008-Fix-build-after-95290f66b806a307b8da1f72f8fc2c698019.patch +Patch9: 0009-Implement-accessibility-for-QQuickWidget.patch +Patch10: 0010-Send-ObjectShow-event-for-visible-components-after-i.patch +Patch11: 0011-QQuickItem-avoid-emitting-signals-during-destruction.patch +Patch12: 0012-a11y-track-item-enabled-state.patch +Patch13: 0013-Make-QaccessibleQuickWidget-private-API.patch +Patch14: 0014-Qml-Don-t-crash-when-as-casting-to-type-with-errors.patch +Patch15: 0015-QQmlImportDatabase-Make-sure-the-newly-added-import-.patch +Patch16: 0016-QQuickState-when-handle-QJSValue-properties-correctl.patch +Patch17: 0017-Models-Avoid-crashes-when-deleting-cache-items.patch +Patch18: 0018-qv4function-Fix-crash-due-to-reference-being-invalid.patch +Patch19: 0019-Quick-Animations-Fix-crash.patch +Patch20: 0020-Prevent-crash-when-destroying-asynchronous-Loader.patch +Patch21: 0021-QQuickItem-Fix-effective-visibility-for-items-withou.patch +Patch22: 0022-Revert-QQuickItem-Fix-effective-visibility-for-items.patch +Patch23: 0023-Accessibility-respect-value-in-attached-Accessible-i.patch +Patch24: 0024-qml-tool-Use-QCommandLineParser-process-rather-than-.patch +Patch25: 0025-JIT-Add-missing-STORE-LOAD-_ACC-to-CreateCallContext.patch +Patch26: 0026-QQmlJs-MemoryPool-fix-potential-UB-pointer-overflow.patch +Patch27: 0027-QRecyclePool-fix-potential-UB.patch +Patch28: 0028-QtQml-Clean-up-QQmlData-ctor.patch +Patch29: 0029-QML-Make-notify-list-thread-safe.patch +Patch30: 0030-Flickable-prevent-fixup-from-being-called-while-drag.patch ## upstreamable patches Patch100: %{name}-gcc11.patch # https://pagure.io/fedora-kde/SIG/issue/82 Patch101: qtdeclarative-5.15.0-FixMaxXMaxYExtent.patch -# From: https://codereview.qt-project.org/c/qt/qtdeclarative/+/466808 -# Cf. https://bugzilla.redhat.com/show_bug.cgi?id=2177696 -Patch102: qt-QTBUG-111935-fix-V4-jit.patch # filter qml provides %global __provides_exclude_from ^%{_qt5_archdatadir}/qml/.*\\.so$ @@ -240,6 +241,9 @@ make check -k -C tests ||: %changelog +* Fri Oct 06 2023 Jan Grulich - 5.15.11-1 +- 5.15.11 + * Fri Jul 21 2023 Fedora Release Engineering - 5.15.10-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild diff --git a/sources b/sources index 1610a70..2fc628f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (qtdeclarative-everywhere-opensource-src-5.15.10.tar.xz) = 378fc41a31edb52d85fd5e37fe6c086e35b5d5d759ceacc49cf7981a8a38d25ae5f2ca27d99547bd1db381f32128e7947800e2a01a857177707cc2a9980373a8 +SHA512 (qtdeclarative-everywhere-opensource-src-5.15.11.tar.xz) = 08f76c5a1253d6014e48ef8d8c53f65d3087efea0f614f36aa03f37882c6947109b17398ac491157c4fbd0c954762e819c2f074fa5a71e6990f16a54ec7224ae