This commit is contained in:
Jan Grulich 2022-05-17 08:19:51 +02:00
parent a7a6d3df8c
commit 415e4f50ff
24 changed files with 205 additions and 376 deletions

1
.gitignore vendored
View File

@ -8,3 +8,4 @@
/qtdeclarative-everywhere-src-5.15.1.tar.xz
/qtdeclarative-everywhere-src-5.15.2.tar.xz
/qtdeclarative-everywhere-opensource-src-5.15.3.tar.xz
/qtdeclarative-everywhere-opensource-src-5.15.4.tar.xz

View File

@ -1,7 +1,7 @@
From a6ec2f93dba2a3e4ac07332c5adf4456348bf4a1 Mon Sep 17 00:00:00 2001
From eb1025d7808f04e3f114b08c86a5e680b2d18010 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <albert.astals.cid@kdab.com>
Date: Fri, 21 May 2021 13:30:41 +0200
Subject: [PATCH 01/20] Give a warning when StyledText encounters a non
Subject: [PATCH 01/17] Give a warning when StyledText encounters a non
supported entity
Pick-to: 6.1 5.15
@ -35,5 +35,5 @@ index 660852ba83..d531fc9205 100644
} else if (*ch == QLatin1Char(' ')) {
QStringRef entity(&textIn, entityStart - 1, entityLength + 1);
--
2.35.1
2.36.1

View File

@ -1,7 +1,7 @@
From 0eb5ff2e97713e12318c00bab9f3605abb8592c2 Mon Sep 17 00:00:00 2001
From ba07a40a2afacfb57ddb8f7cb4cc90a39560f17d Mon Sep 17 00:00:00 2001
From: Antonio Rojas <arojas@archlinux.org>
Date: Sun, 23 May 2021 14:32:46 +0200
Subject: [PATCH 02/20] Add missing limits include to fix build with GCC 11
Subject: [PATCH 02/17] Add missing limits include to fix build with GCC 11
This is not required for Qt 6, since it is indirectly pulled via
qanystrigview.h, but it is for Qt 5 (where qanystrigview does
@ -29,5 +29,5 @@ index a7e37d1964..01b2f58f16 100644
//
--
2.35.1
2.36.1

View File

@ -1,7 +1,7 @@
From 45621c00cae6b108b412e63388588be8bc4ccc44 Mon Sep 17 00:00:00 2001
From eb9ebe3815ac100d4ab3b3a708f691a1dde270bf Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <albert.astals.cid@kdab.com>
Date: Fri, 21 May 2021 13:17:15 +0200
Subject: [PATCH 03/20] Document that StyledText also supports &nbsp; and
Subject: [PATCH 03/17] Document that StyledText also supports &nbsp; and
&quot;
Change-Id: I1715f8ae8ec8d0fbaf6dbe2b8663cc169da663cd
@ -12,7 +12,7 @@ Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index b18d03a20a..43c29d1f58 100644
index 6230186933..c1571fc6f5 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -2168,7 +2168,7 @@ void QQuickText::resetMaximumLineCount()
@ -25,5 +25,5 @@ index b18d03a20a..43c29d1f58 100644
\c Text.StyledText parser is strict, requiring tags to be correctly nested.
--
2.35.1
2.36.1

View File

@ -1,7 +1,7 @@
From bac7823a97ab901abc8da392ba23747feac4c933 Mon Sep 17 00:00:00 2001
From 0aea240ef6d78989ef16ea1d41e161c641c2667c Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <albert.astals.cid@kdab.com>
Date: Fri, 21 May 2021 13:42:35 +0200
Subject: [PATCH 04/20] Support &apos; in styled text
Subject: [PATCH 04/17] Support &apos; in styled text
Pick-to: 6.1 5.15
Change-Id: I4a8db963e52a7899ab1796f9a560e8029cc1c929
@ -14,7 +14,7 @@ Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/quick/items/qquicktext.cpp b/src/quick/items/qquicktext.cpp
index 43c29d1f58..459dea8f74 100644
index c1571fc6f5..e823ca1095 100644
--- a/src/quick/items/qquicktext.cpp
+++ b/src/quick/items/qquicktext.cpp
@@ -2168,7 +2168,7 @@ void QQuickText::resetMaximumLineCount()
@ -40,5 +40,5 @@ index d531fc9205..a25af90414 100644
textOut += QChar(34);
else if (entity == QLatin1String("nbsp"))
--
2.35.1
2.36.1

View File

@ -1,7 +1,7 @@
From d7d355175aa1e625e5b59b4494e37aeac9c849d5 Mon Sep 17 00:00:00 2001
From bdf7658d89e1df55ded318432d4412dbf1d5d0f9 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <albert.astals.cid@kdab.com>
Date: Thu, 17 Jun 2021 16:32:28 +0200
Subject: [PATCH 05/20] Remove unused QPointer<QQuickPointerMask>
Subject: [PATCH 05/17] Remove unused QPointer<QQuickPointerMask>
Change-Id: I009fa6bbd8599dc3bb2e810176fe20e70ed50851
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
@ -31,5 +31,5 @@ index fba383e268..0d63618622 100644
QPointF targetStartPos;
QPointF lastPos;
--
2.35.1
2.36.1

View File

@ -1,7 +1,7 @@
From 3c42d4d3dce95b67d65541c5612384eab0c3e27b Mon Sep 17 00:00:00 2001
From 8da88589929a1d82103c8bbfa80210f3c1af3714 Mon Sep 17 00:00:00 2001
From: Dmitry Shachnev <mitya57@gmail.com>
Date: Wed, 18 Aug 2021 22:50:29 +0300
Subject: [PATCH 06/20] Include <limits> in Yarr.h to fix build with GCC 11
Subject: [PATCH 06/17] Include <limits> in Yarr.h to fix build with GCC 11
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@ -39,5 +39,5 @@ index ccf78f9880..2955ea7e72 100644
namespace JSC { namespace Yarr {
--
2.35.1
2.36.1

View File

@ -1,7 +1,7 @@
From 31179b578276f10841fcb60a876ea757f9ca82ff Mon Sep 17 00:00:00 2001
From 103503f1cae9e928a4fa8b5e7e1f7af34f1add4d Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Tue, 21 Sep 2021 00:10:26 +0200
Subject: [PATCH 07/20] QQuickLoader: Do not incubate if the source arrives
Subject: [PATCH 07/17] QQuickLoader: Do not incubate if the source arrives
after setActive(false)
Otherwise we end up in the crazy place of active being false but item
@ -108,5 +108,5 @@ index 0f6c811adb..dddacbaa0b 100644
#include "tst_qquickloader.moc"
--
2.35.1
2.36.1

View File

@ -1,7 +1,7 @@
From 4fd8f31beb6ce07207cc8e934c7f4caa6abd8a54 Mon Sep 17 00:00:00 2001
From 0fdd8a998075a8b52954724743d3a04c105c6ce2 Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Thu, 23 Sep 2021 03:43:04 +0200
Subject: [PATCH 08/20] QQmlDelegateModel: Refresh the view when a column is
Subject: [PATCH 08/17] 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
@ -17,13 +17,12 @@ Signed-off-by: Aleix Pol <aleixpol@kde.org>
src/qmlmodels/qqmldelegatemodel.cpp | 44 +++++++++++++++++++
src/qmlmodels/qqmldelegatemodel_p.h | 3 ++
.../data/redrawUponColumnChange.qml | 11 +++++
.../qqmldelegatemodel/qqmldelegatemodel.pro | 2 +-
.../tst_qqmldelegatemodel.cpp | 29 ++++++++++++
5 files changed, 88 insertions(+), 1 deletion(-)
.../tst_qqmldelegatemodel.cpp | 27 ++++++++++++
4 files changed, 85 insertions(+)
create mode 100644 tests/auto/qml/qqmldelegatemodel/data/redrawUponColumnChange.qml
diff --git a/src/qmlmodels/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp
index e6aff955fe..381726291d 100644
index 26ded63c41..53e511303e 100644
--- a/src/qmlmodels/qqmldelegatemodel.cpp
+++ b/src/qmlmodels/qqmldelegatemodel.cpp
@@ -389,6 +389,12 @@ void QQmlDelegateModelPrivate::connectToAbstractItemModel()
@ -122,24 +121,11 @@ index 0000000000..206133bb39
+ text: display
+ }
+}
diff --git a/tests/auto/qml/qqmldelegatemodel/qqmldelegatemodel.pro b/tests/auto/qml/qqmldelegatemodel/qqmldelegatemodel.pro
index 7fdd3ab5f1..fbd72f6a44 100644
--- a/tests/auto/qml/qqmldelegatemodel/qqmldelegatemodel.pro
+++ b/tests/auto/qml/qqmldelegatemodel/qqmldelegatemodel.pro
@@ -2,7 +2,7 @@ CONFIG += testcase
TARGET = tst_qqmldelegatemodel
macos:CONFIG -= app_bundle
-QT += qml testlib core-private qml-private qmlmodels-private
+QT += qml quick testlib core-private qml-private qmlmodels-private
SOURCES += tst_qqmldelegatemodel.cpp
diff --git a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp
index 87f42c0c8a..1d338ac330 100644
index 71550a50f3..4c1eae7ac7 100644
--- a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp
+++ b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp
@@ -27,8 +27,12 @@
@@ -27,6 +27,8 @@
****************************************************************************/
#include <QtTest/qtest.h>
@ -147,21 +133,17 @@ index 87f42c0c8a..1d338ac330 100644
+#include <QtGui/QStandardItemModel>
#include <QtQml/qqmlcomponent.h>
#include <QtQmlModels/private/qqmldelegatemodel_p.h>
+#include <QtQuick/qquickview.h>
+#include <QtQuick/qquickitem.h>
#include "../../shared/util.h"
@@ -42,6 +46,7 @@ public:
private slots:
#include <QtQuick/qquickview.h>
@@ -45,6 +47,7 @@ private slots:
void valueWithoutCallingObjectFirst_data();
void valueWithoutCallingObjectFirst();
void filterOnGroup_removeWhenCompleted();
+ void redrawUponColumnChange();
};
class AbstractItemModel : public QAbstractItemModel
@@ -134,6 +139,30 @@ void tst_QQmlDelegateModel::valueWithoutCallingObjectFirst()
QCOMPARE(model->variantValue(index, role), expectedValue);
@@ -149,6 +152,30 @@ void tst_QQmlDelegateModel::filterOnGroup_removeWhenCompleted()
QTest::qWaitFor([=]{ return model->count() == 2; } );
}
+void tst_QQmlDelegateModel::redrawUponColumnChange()
@ -192,5 +174,5 @@ index 87f42c0c8a..1d338ac330 100644
#include "tst_qqmldelegatemodel.moc"
--
2.35.1
2.36.1

View File

@ -1,7 +1,7 @@
From 00dd37619f35db3cddb2ac59198d3bde7ce73cd7 Mon Sep 17 00:00:00 2001
From f2d1bfa96bedb09c27f52a802b03cbefb17a0257 Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Sun, 10 Oct 2021 21:04:21 +0300
Subject: [PATCH 09/20] Fix sweep step for tainted QObject JavaScript wrappers
Subject: [PATCH 09/17] Fix sweep step for tainted QObject JavaScript wrappers
Currently, whenever the garbage collector runs, it will destroy all
valid tainted wrappers.
@ -115,5 +115,5 @@ index 5d635aa63b..824fd89e5b 100644
// engine2 doesn't own the object as engine1 was the first to wrap it above.
// Therefore, no effect here.
--
2.35.1
2.36.1

View File

@ -1,7 +1,7 @@
From 55f07163f84badcc9aa0805f1523ef43a7225778 Mon Sep 17 00:00:00 2001
From b884339e8b6dd8dcaed9704afda2ebed4fcaf9b5 Mon Sep 17 00:00:00 2001
From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Date: Tue, 12 Oct 2021 13:13:01 +0200
Subject: [PATCH 10/20] Fix distorted text with subpixel matrix translation
Subject: [PATCH 10/17] Fix distorted text with subpixel matrix translation
We would pixel-align native text *before* applying the
model-view matrix, which would cause GL_NEAREST artifacts to
@ -479,5 +479,5 @@ index 0000000000..c60fc4d8b0
+ }
+}
--
2.35.1
2.36.1

View File

@ -1,7 +1,7 @@
From ffa77919e72951c7accf84ad09dc669d166aedf8 Mon Sep 17 00:00:00 2001
From 8b0a4b1a329010e056b19fdd9940bad2036b5f57 Mon Sep 17 00:00:00 2001
From: Laszlo Agocs <laszlo.agocs@qt.io>
Date: Mon, 11 Oct 2021 15:37:33 +0200
Subject: [PATCH 11/20] Revert "Fix for possible crash in
Subject: [PATCH 11/17] Revert "Fix for possible crash in
QSGDefaultLayer::grab"
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
@ -67,5 +67,5 @@ index 4deb6c70a3..c0a1ccab78 100644
protected:
void releaseResources() override;
--
2.35.1
2.36.1

View File

@ -1,7 +1,7 @@
From 743ae2a4d59eccc4720390c4c757b081eb2c6bfa Mon Sep 17 00:00:00 2001
From 0e201d3561cecc8a1e982f81095f14af1dc3ceca Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Arve=20S=C3=A6ther?= <jan-arve.saether@qt.io>
Date: Thu, 3 Sep 2020 10:51:01 +0200
Subject: [PATCH 15/20] Fix TapHandler so that it actually registers a tap
Subject: [PATCH 12/17] 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 b51f53b74f..89081b4e84 100644
void QQuickSinglePointHandler::handlePointerEventImpl(QQuickPointerEvent *event)
--
2.35.1
2.36.1

View File

@ -1,58 +0,0 @@
From c3804f86e0a75c0c8402127a5b01bc7a858e6492 Mon Sep 17 00:00:00 2001
From: Volker Hilsheimer <volker.hilsheimer@qt.io>
Date: Wed, 17 Mar 2021 16:52:21 +0100
Subject: [PATCH 12/20] QQuickItemAnimation: close potential memory leak
Fix static analyzer warning bff6cb4333f531d5a72f7bf6dc1485f6.
If ownership of viaData is not passed to the viaAction, then the object
might be leaked. Use std::unique_ptr to make ownership transfer explicit
and implicitly delete unowned objects.
Pick-to: 6.1 5.15
Change-Id: I89f2a6b630941a98a74db302bc1ab08055c71974
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 78aea267209c34abeb4895712dc76c923aa46165)
---
src/quick/items/qquickitemanimation.cpp | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/quick/items/qquickitemanimation.cpp b/src/quick/items/qquickitemanimation.cpp
index 23694e2de3..dfb56ccc00 100644
--- a/src/quick/items/qquickitemanimation.cpp
+++ b/src/quick/items/qquickitemanimation.cpp
@@ -230,8 +230,8 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &act
{
Q_D(QQuickParentAnimation);
- QQuickParentAnimationData *data = new QQuickParentAnimationData;
- QQuickParentAnimationData *viaData = new QQuickParentAnimationData;
+ std::unique_ptr<QQuickParentAnimationData> data(new QQuickParentAnimationData);
+ std::unique_ptr<QQuickParentAnimationData> viaData(new QQuickParentAnimationData);
bool hasExplicit = false;
if (d->target && d->newParent) {
@@ -377,8 +377,8 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &act
QParallelAnimationGroupJob *ag = new QParallelAnimationGroupJob;
if (d->via)
- viaAction->setAnimAction(viaData);
- targetAction->setAnimAction(data);
+ viaAction->setAnimAction(viaData.release());
+ targetAction->setAnimAction(data.release());
//take care of any child animations
bool valid = d->defaultProperty.isValid();
@@ -405,9 +405,6 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &act
topLevelGroup->appendAnimation(d->via ? viaAction : targetAction);
}
return initInstance(topLevelGroup);
- } else {
- delete data;
- delete viaData;
}
return nullptr;
}
--
2.35.1

View File

@ -1,7 +1,7 @@
From 84e0c1e0973ca7467089dc0227a2b9ac4aef52fa Mon Sep 17 00:00:00 2001
From 5af400361da5d66427c68bf743c8def70b7cbc8e Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Tue, 16 Nov 2021 22:43:37 +0100
Subject: [PATCH 16/20] Revert "Fix TapHandler so that it actually registers a
Subject: [PATCH 13/17] Revert "Fix TapHandler so that it actually registers a
tap"
This reverts commit 36e8ccd434f948e4f11a8f9d59139ec072e41ff5.
@ -57,5 +57,5 @@ index 89081b4e84..b51f53b74f 100644
void QQuickSinglePointHandler::handlePointerEventImpl(QQuickPointerEvent *event)
--
2.35.1
2.36.1

View File

@ -1,30 +0,0 @@
From 44ac7f39d874202163926f505a46179c084154b9 Mon Sep 17 00:00:00 2001
From: Maximilian Goldstein <max.goldstein@qt.io>
Date: Tue, 23 Feb 2021 16:10:44 +0100
Subject: [PATCH 13/20] qqmldelegatemodel: Fix out of bounds cache removal
Pick-to: 5.15 6.0 6.1
Task-number: QTBUG-91276
Change-Id: I1ddbb4a3326d61ff94e3881beb64a14dade11c46
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
(cherry picked from commit 31ad81d81e623a34cd71567b9507f16601f1c1d4)
---
src/qmlmodels/qqmldelegatemodel.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/qmlmodels/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp
index 381726291d..53e511303e 100644
--- a/src/qmlmodels/qqmldelegatemodel.cpp
+++ b/src/qmlmodels/qqmldelegatemodel.cpp
@@ -1621,7 +1621,7 @@ void QQmlDelegateModelPrivate::itemsRemoved(
removed[i] = 0;
for (const Compositor::Remove &remove : removes) {
- for (; cacheIndex < remove.cacheIndex; ++cacheIndex)
+ for (; cacheIndex < remove.cacheIndex && cacheIndex < m_cache.size(); ++cacheIndex)
incrementIndexes(m_cache.at(cacheIndex), m_groupCount, removed);
for (int i = 1; i < m_groupCount; ++i) {
--
2.35.1

View File

@ -1,7 +1,7 @@
From c6e595e7fbbe80c8db7ae33d8af05a4fd946a2f5 Mon Sep 17 00:00:00 2001
From 9a3aaa96c58d167ab9eec0d0c8105853e8c6117a Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@qt.io>
Date: Tue, 21 Dec 2021 09:20:17 +0100
Subject: [PATCH 17/20] QQmlJs::FixedPoolArray: fix UB (precondition violation)
Subject: [PATCH 14/17] QQmlJs::FixedPoolArray: fix UB (precondition violation)
in allocate()
Says ubsan:
@ -32,5 +32,5 @@ index b65b994d6c..15a8cd6878 100644
}
}
--
2.35.1
2.36.1

View File

@ -1,50 +0,0 @@
From f8f6b9d084decbad8ee90880493c413ac90c2911 Mon Sep 17 00:00:00 2001
From: Andreas Hartmetz <andreas@ixgreen.de>
Date: Fri, 5 Mar 2021 12:41:06 +0100
Subject: [PATCH 14/20] QQuickWindow: don't leak old screenChanged connections
Connections could accumulate. Because the newest one was invoked
last due to how signal-slot invocations are ordered, rendering
was correct, but the stale connections caused unnecessary updates
(and wasted a small amount of memory).
This comes from a misunderstanding I had at the time about how
QMetaObject::Connection works. Destroying or overwriting one does
not affect the actual connection.
While at it, also modernize the connect().
Pick-to: 5.15 6.0 6.1
Change-Id: Idde81bdbff8947ed517bf2740d623a395c0acb74
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit 9f8292d48913c5bc50377749c2b3e030cf16d703)
---
src/quick/items/qquickwindow.cpp | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index eea1e93f32..c956c85091 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -450,15 +450,14 @@ void QQuickWindow::physicalDpiChanged()
void QQuickWindow::handleScreenChanged(QScreen *screen)
{
Q_D(QQuickWindow);
+ disconnect(d->physicalDpiChangedConnection);
if (screen) {
physicalDpiChanged();
// When physical DPI changes on the same screen, either the resolution or the device pixel
// ratio changed. We must check what it is. Device pixel ratio does not have its own
// ...Changed() signal.
- d->physicalDpiChangedConnection = connect(screen, SIGNAL(physicalDotsPerInchChanged(qreal)),
- this, SLOT(physicalDpiChanged()));
- } else {
- disconnect(d->physicalDpiChangedConnection);
+ d->physicalDpiChangedConnection = connect(screen, &QScreen::physicalDotsPerInchChanged,
+ this, &QQuickWindow::physicalDpiChanged);
}
d->forcePolish();
--
2.35.1

View File

@ -1,7 +1,7 @@
From c8a4894655eef230702e6cc889f3d40fbb5a9426 Mon Sep 17 00:00:00 2001
From 2dc624d1f7771d4e93ad7f5293fb43cf539b1ca4 Mon Sep 17 00:00:00 2001
From: Ulf Hermann <ulf.hermann@qt.io>
Date: Thu, 3 Feb 2022 10:02:06 +0100
Subject: [PATCH 19/20] V4: Do not call dtor of an object we continue to use
Subject: [PATCH 15/17] V4: Do not call dtor of an object we continue to use
After destroyObject(), the QObjectWrapper is still alive. We might use
its heap object again. Furthermore, the Heap::QObjectWrapper dtor does
@ -47,5 +47,5 @@ index 9899c9274e..272b85069f 100644
--
2.35.1
2.36.1

View File

@ -1,7 +1,7 @@
From 02105099301450c890e1caba977ef44efdc43da7 Mon Sep 17 00:00:00 2001
From 5eee7419f55c592a24d9c7746df0f197d8f0a71d Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Sat, 29 Jan 2022 21:59:33 +0200
Subject: [PATCH 20/20] Make sure QQuickWidget and its offscreen window's
Subject: [PATCH 16/17] Make sure QQuickWidget and its offscreen window's
screens are always in sync
By default, the offscreen window is placed on the primary screen.
@ -80,5 +80,5 @@ index 39780f8de3..223d91f579 100644
case QEvent::Move:
d->updatePosition();
--
2.35.1
2.36.1

View File

@ -0,0 +1,122 @@
From 51efb2ed2f071beda188270a23ac450fe4b318f7 Mon Sep 17 00:00:00 2001
From: Fabian Kosmale <fabian.kosmale@qt.io>
Date: Wed, 4 May 2022 09:10:54 +0200
Subject: [PATCH 17/17] QQuickItem: Guard against cycles in
nextPrevItemInTabFocusChain
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
nextPrevItemInTabFocusChain already had a check to prevent running into
cycles, it would however only detect if we reached the original item. If
our cycle instead would loop between reachable items without ever
returning to the initial one, as in the diagram below, then we would
never terminate the loop.
/-->other item<---next item
initial-item \ ^
\ |
--->different item
To prevent this from happening, we keep track of all items we've seen so
far. One last complications arises due to the fact that we do visit the
parent twice under some cicrcumstances, but we already have the skip
variable to indicate that case we simply skip the duplicate check if
it is set to true.
Pick-to: 6.2 6.3
Fixes: QTBUG-87190
Change-Id: I1449a7ebf8f325f00c296e8a8db4360faf1049e4
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit e74bcf751495d9fe27efd195bc04e2a6ae6732a4)
---
src/quick/items/qquickitem.cpp | 7 ++++++-
.../data/activeFocusOnTab_infiniteLoop3.qml | 13 +++++++++++++
tests/auto/quick/qquickitem2/tst_qquickitem.cpp | 12 ++++++++++++
3 files changed, 31 insertions(+), 1 deletion(-)
create mode 100644 tests/auto/quick/qquickitem2/data/activeFocusOnTab_infiniteLoop3.qml
diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 497672b497..81b0db0b69 100644
--- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp
@@ -59,6 +59,7 @@
#include <QtCore/private/qnumeric_p.h>
#include <QtGui/qpa/qplatformtheme.h>
#include <QtCore/qloggingcategory.h>
+#include <QtCore/private/qduplicatetracker_p.h>
#include <private/qqmlglobal_p.h>
#include <private/qqmlengine_p.h>
@@ -2520,6 +2521,7 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo
QQuickItem *current = item;
qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: startItem:" << startItem;
qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: firstFromItem:" << firstFromItem;
+ QDuplicateTracker<QQuickItem *> cycleDetector;
do {
qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: current:" << current;
qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: from:" << from;
@@ -2586,7 +2588,10 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo
// traversed all of the chain (by compare the [current] item with [startItem])
// Since the [startItem] might be promoted to its parent if it is invisible,
// we still have to check [current] item with original start item
- if ((current == startItem || current == originalStartItem) && from == firstFromItem) {
+ // We might also run into a cycle before we reach firstFromItem again
+ // but note that we have to ignore current if we are meant to skip it
+ if (((current == startItem || current == originalStartItem) && from == firstFromItem) ||
+ (!skip && cycleDetector.hasSeen(current))) {
// wrapped around, avoid endless loops
if (item == contentItem) {
qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: looped, return contentItem";
diff --git a/tests/auto/quick/qquickitem2/data/activeFocusOnTab_infiniteLoop3.qml b/tests/auto/quick/qquickitem2/data/activeFocusOnTab_infiniteLoop3.qml
new file mode 100644
index 0000000000..889e480f3b
--- /dev/null
+++ b/tests/auto/quick/qquickitem2/data/activeFocusOnTab_infiniteLoop3.qml
@@ -0,0 +1,13 @@
+import QtQuick 2.6
+
+Item {
+ visible: true
+ Item {
+ visible: false
+ Item {
+ objectName: "hiddenChild"
+ activeFocusOnTab: true
+ focus: true
+ }
+ }
+}
diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
index f65650cf9c..eeff768bb4 100644
--- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
+++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp
@@ -66,6 +66,7 @@ private slots:
void activeFocusOnTab10();
void activeFocusOnTab_infiniteLoop_data();
void activeFocusOnTab_infiniteLoop();
+ void activeFocusOnTab_infiniteLoopControls();
void nextItemInFocusChain();
void nextItemInFocusChain2();
@@ -1055,6 +1056,17 @@ void tst_QQuickItem::activeFocusOnTab_infiniteLoop()
QCOMPARE(item, window->rootObject());
}
+
+void tst_QQuickItem::activeFocusOnTab_infiniteLoopControls()
+{
+ auto source = testFileUrl("activeFocusOnTab_infiniteLoop3.qml");
+ QScopedPointer<QQuickView>window(new QQuickView());
+ window->setSource(source);
+ window->show();
+ QVERIFY(window->errors().isEmpty());
+ QTest::keyClick(window.get(), Qt::Key_Tab); // should not hang
+}
+
void tst_QQuickItem::nextItemInFocusChain()
{
if (!qt_tab_all_widgets())
--
2.36.1

View File

@ -1,138 +0,0 @@
From 9bb03b5dcc21275986df3d8b0efb6f28cdc583ec Mon Sep 17 00:00:00 2001
From: Wang Chuan <ouchuanm@outlook.com>
Date: Mon, 5 Apr 2021 11:41:48 +0800
Subject: [PATCH 18/20] QQuickTextInput: update cursor rectangle after padding
changed
The position of cursor delegate needs to be updated when we change
padding, otherwise it will be in a wrong position.
Fixes: QTBUG-91867
Pick-to: 5.12 5.15 6.0 6.1
Change-Id: I89ca84fe893ebf517ab67890196eede14a4055d7
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
(cherry picked from commit d98694c4023881673259ba040c10df7e71ec3d37)
---
src/quick/items/qquicktextinput.cpp | 5 ++++
.../checkCursorDelegateWhenPaddingChanged.qml | 16 ++++++++++
.../qquicktextinput/tst_qquicktextinput.cpp | 30 +++++++++++++++++++
3 files changed, 51 insertions(+)
create mode 100644 tests/auto/quick/qquicktextinput/data/checkCursorDelegateWhenPaddingChanged.qml
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index 079bf58abe..7d0d05700a 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -2952,6 +2952,7 @@ void QQuickTextInputPrivate::setTopPadding(qreal value, bool reset)
}
if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) {
updateLayout();
+ q->updateCursorRectangle();
emit q->topPaddingChanged();
}
}
@@ -2966,6 +2967,7 @@ void QQuickTextInputPrivate::setLeftPadding(qreal value, bool reset)
}
if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) {
updateLayout();
+ q->updateCursorRectangle();
emit q->leftPaddingChanged();
}
}
@@ -2980,6 +2982,7 @@ void QQuickTextInputPrivate::setRightPadding(qreal value, bool reset)
}
if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) {
updateLayout();
+ q->updateCursorRectangle();
emit q->rightPaddingChanged();
}
}
@@ -2994,6 +2997,7 @@ void QQuickTextInputPrivate::setBottomPadding(qreal value, bool reset)
}
if ((!reset && !qFuzzyCompare(oldPadding, value)) || (reset && !qFuzzyCompare(oldPadding, padding()))) {
updateLayout();
+ q->updateCursorRectangle();
emit q->bottomPaddingChanged();
}
}
@@ -4712,6 +4716,7 @@ void QQuickTextInput::setPadding(qreal padding)
d->extra.value().padding = padding;
d->updateLayout();
+ updateCursorRectangle();
emit paddingChanged();
if (!d->extra.isAllocated() || !d->extra->explicitTopPadding)
emit topPaddingChanged();
diff --git a/tests/auto/quick/qquicktextinput/data/checkCursorDelegateWhenPaddingChanged.qml b/tests/auto/quick/qquicktextinput/data/checkCursorDelegateWhenPaddingChanged.qml
new file mode 100644
index 0000000000..e6f07b4687
--- /dev/null
+++ b/tests/auto/quick/qquicktextinput/data/checkCursorDelegateWhenPaddingChanged.qml
@@ -0,0 +1,16 @@
+import QtQuick 2.12
+
+Rectangle {
+ width: 200
+ height: 200
+ TextInput {
+ objectName: "textInput"
+ leftPadding: 10
+ focus: true
+ cursorDelegate: Rectangle {
+ objectName: "cursorDelegate"
+ width: 5
+ color: "red"
+ }
+ }
+}
diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
index 2e64c80b85..ac502bcb28 100644
--- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
+++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp
@@ -236,6 +236,7 @@ private slots:
void QTBUG_51115_readOnlyResetsSelection();
void QTBUG_77814_InsertRemoveNoSelection();
+ void checkCursorDelegateWhenPaddingChanged();
private:
void simulateKey(QWindow *, int key);
@@ -7054,6 +7055,35 @@ void tst_qquicktextinput::QTBUG_77814_InsertRemoveNoSelection()
QCOMPARE(textInput->selectedText(), QString());
}
+void tst_qquicktextinput::checkCursorDelegateWhenPaddingChanged()
+{
+ QQuickView view;
+ view.setSource(testFileUrl("checkCursorDelegateWhenPaddingChanged.qml"));
+ view.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&view));
+
+ QQuickTextInput *textInput = view.rootObject()->findChild<QQuickTextInput *>("textInput");
+ QVERIFY(textInput);
+
+ QQuickItem *cursorDelegate = textInput->findChild<QQuickItem *>("cursorDelegate");
+ QVERIFY(cursorDelegate);
+
+ QCOMPARE(cursorDelegate->x(), textInput->leftPadding());
+ QCOMPARE(cursorDelegate->y(), textInput->topPadding());
+
+ textInput->setPadding(5);
+ QCOMPARE(cursorDelegate->x(), textInput->leftPadding());
+ QCOMPARE(cursorDelegate->y(), textInput->topPadding());
+
+ textInput->setTopPadding(10);
+ QCOMPARE(cursorDelegate->x(), textInput->leftPadding());
+ QCOMPARE(cursorDelegate->y(), textInput->topPadding());
+
+ textInput->setLeftPadding(10);
+ QCOMPARE(cursorDelegate->x(), textInput->leftPadding());
+ QCOMPARE(cursorDelegate->y(), textInput->topPadding());
+}
+
QTEST_MAIN(tst_qquicktextinput)
#include "tst_qquicktextinput.moc"
--
2.35.1

View File

@ -11,8 +11,8 @@
Summary: Qt5 - QtDeclarative component
Name: qt5-%{qt_module}
Version: 5.15.3
Release: 2%{?dist}
Version: 5.15.4
Release: 1%{?dist}
# See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
License: LGPLv2 with exceptions or GPLv3 with exceptions
@ -27,27 +27,24 @@ Source5: qv4global_p-multilib.h
## upstream patches
## repo: https://invent.kde.org/qt/qt/qtdeclarative
## branch: kde/5.15
## git format-patch v5.15.3-lts-lgpl
Patch1: 0001-Give-a-warning-when-StyledText-encounters-a-non-supp.patch
Patch2: 0002-Add-missing-limits-include-to-fix-build-with-GCC-11.patch
Patch3: 0003-Document-that-StyledText-also-supports-nbsp-and-quot.patch
Patch4: 0004-Support-apos-in-styled-text.patch
Patch5: 0005-Remove-unused-QPointer-QQuickPointerMask.patch
Patch6: 0006-Include-limits-in-Yarr.h-to-fix-build-with-GCC-11.patch
Patch7: 0007-QQuickLoader-Do-not-incubate-if-the-source-arrives-a.patch
Patch8: 0008-QQmlDelegateModel-Refresh-the-view-when-a-column-is-.patch
Patch9: 0009-Fix-sweep-step-for-tainted-QObject-JavaScript-wrappe.patch
## git format-patch v5.15.4-lts-lgpl
Patch1: 0001-Give-a-warning-when-StyledText-encounters-a-non-supp.patch
Patch2: 0002-Add-missing-limits-include-to-fix-build-with-GCC-11.patch
Patch3: 0003-Document-that-StyledText-also-supports-nbsp-and-quot.patch
Patch4: 0004-Support-apos-in-styled-text.patch
Patch5: 0005-Remove-unused-QPointer-QQuickPointerMask.patch
Patch6: 0006-Include-limits-in-Yarr.h-to-fix-build-with-GCC-11.patch
Patch7: 0007-QQuickLoader-Do-not-incubate-if-the-source-arrives-a.patch
Patch8: 0008-QQmlDelegateModel-Refresh-the-view-when-a-column-is-.patch
Patch9: 0009-Fix-sweep-step-for-tainted-QObject-JavaScript-wrappe.patch
Patch10: 0010-Fix-distorted-text-with-subpixel-matrix-translation.patch
Patch11: 0011-Revert-Fix-for-possible-crash-in-QSGDefaultLayer-gra.patch
Patch12: 0012-QQuickItemAnimation-close-potential-memory-leak.patch
Patch13: 0013-qqmldelegatemodel-Fix-out-of-bounds-cache-removal.patch
Patch14: 0014-QQuickWindow-don-t-leak-old-screenChanged-connection.patch
Patch15: 0015-Fix-TapHandler-so-that-it-actually-registers-a-tap.patch
Patch16: 0016-Revert-Fix-TapHandler-so-that-it-actually-registers-.patch
Patch17: 0017-QQmlJs-FixedPoolArray-fix-UB-precondition-violation-.patch
Patch18: 0018-QQuickTextInput-update-cursor-rectangle-after-paddin.patch
Patch19: 0019-V4-Do-not-call-dtor-of-an-object-we-continue-to-use.patch
Patch20: 0020-Make-sure-QQuickWidget-and-its-offscreen-window-s-sc.patch
Patch12: 0012-Fix-TapHandler-so-that-it-actually-registers-a-tap.patch
Patch13: 0013-Revert-Fix-TapHandler-so-that-it-actually-registers-.patch
Patch14: 0014-QQmlJs-FixedPoolArray-fix-UB-precondition-violation-.patch
Patch15: 0015-V4-Do-not-call-dtor-of-an-object-we-continue-to-use.patch
Patch16: 0016-Make-sure-QQuickWidget-and-its-offscreen-window-s-sc.patch
Patch17: 0017-QQuickItem-Guard-against-cycles-in-nextPrevItemInTab.patch
## upstreamable patches
Patch100: %{name}-gcc11.patch
@ -230,6 +227,9 @@ make check -k -C tests ||:
%changelog
* Mon May 16 2022 Jan Grulich <jgrulich@redhat.com> - 5.15.4-1
- 5.15.4
* Mon Mar 07 2022 Jan Grulich <jgrulich@redhat.com> - 5.15.3-2
- Disable LTO

View File

@ -1 +1 @@
SHA512 (qtdeclarative-everywhere-opensource-src-5.15.3.tar.xz) = c0f8dba5ba9e211071d64ec9de7395925d97424be899292a83fe961091c6695bfe68395fed4b34a746a69293765122a5ee53c119053f01b5fc511f0dbf577597
SHA512 (qtdeclarative-everywhere-opensource-src-5.15.4.tar.xz) = 8a4ff61238fde7cc563f9d94b5d1f4fd71ecb95ace447e57d08f71da82400b37c42f4f1ecdcd561116bffa1ed483219e06fb550f91c90842e5a43487bc4706b6