This commit is contained in:
Jan Grulich 2022-07-13 14:31:15 +02:00
parent 415e4f50ff
commit 466502060d
24 changed files with 626 additions and 132 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@
/qtdeclarative-everywhere-src-5.15.2.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.3.tar.xz
/qtdeclarative-everywhere-opensource-src-5.15.4.tar.xz /qtdeclarative-everywhere-opensource-src-5.15.4.tar.xz
/qtdeclarative-everywhere-opensource-src-5.15.5.tar.xz

View File

@ -1,7 +1,7 @@
From eb9ebe3815ac100d4ab3b3a708f691a1dde270bf Mon Sep 17 00:00:00 2001 From 48fc7f164a347f88c221c6a86614008b63b7767f Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <albert.astals.cid@kdab.com> From: Albert Astals Cid <albert.astals.cid@kdab.com>
Date: Fri, 21 May 2021 13:17:15 +0200 Date: Fri, 21 May 2021 13:17:15 +0200
Subject: [PATCH 03/17] Document that StyledText also supports &nbsp; and Subject: [PATCH 01/19] Document that StyledText also supports &nbsp; and
&quot; &quot;
Change-Id: I1715f8ae8ec8d0fbaf6dbe2b8663cc169da663cd Change-Id: I1715f8ae8ec8d0fbaf6dbe2b8663cc169da663cd

View File

@ -1,39 +0,0 @@
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/17] Give a warning when StyledText encounters a non
supported entity
Pick-to: 6.1 5.15
Change-Id: Iea8bdf25542cd404ee71141467ac1f1398a7d0df
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit 8cd43e370040e23fcbd03ad64969e683055bd7d0)
---
src/quick/util/qquickstyledtext.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/quick/util/qquickstyledtext.cpp b/src/quick/util/qquickstyledtext.cpp
index 660852ba83..d531fc9205 100644
--- a/src/quick/util/qquickstyledtext.cpp
+++ b/src/quick/util/qquickstyledtext.cpp
@@ -46,6 +46,8 @@
#include "qquickstyledtext_p.h"
#include <QQmlContext>
+Q_LOGGING_CATEGORY(lcStyledText, "qt.quick.styledtext")
+
/*
QQuickStyledText supports few tags:
@@ -566,6 +568,8 @@ void QQuickStyledTextPrivate::parseEntity(const QChar *&ch, const QString &textI
textOut += QChar(34);
else if (entity == QLatin1String("nbsp"))
textOut += QChar(QChar::Nbsp);
+ else
+ qCWarning(lcStyledText) << "StyledText doesn't support entity" << entity;
return;
} else if (*ch == QLatin1Char(' ')) {
QStringRef entity(&textIn, entityStart - 1, entityLength + 1);
--
2.36.1

View File

@ -1,33 +0,0 @@
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/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
not exist) and, in any case, it is good to declare all used headers
and not rely on them being implicitly pulled.
Pick-to: 6.1 5.15
Change-Id: I97606ea493e723006759608b7d4c4f00632f340c
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
(cherry picked from commit 367293b18ab0d0a0432c1c8ce445fee052e5eee5)
---
src/qmldebug/qqmlprofilerevent_p.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/qmldebug/qqmlprofilerevent_p.h b/src/qmldebug/qqmlprofilerevent_p.h
index a7e37d1964..01b2f58f16 100644
--- a/src/qmldebug/qqmlprofilerevent_p.h
+++ b/src/qmldebug/qqmlprofilerevent_p.h
@@ -48,6 +48,7 @@
#include <QtCore/qmetatype.h>
#include <initializer_list>
+#include <limits>
#include <type_traits>
//
--
2.36.1

View File

@ -1,7 +1,7 @@
From 0aea240ef6d78989ef16ea1d41e161c641c2667c Mon Sep 17 00:00:00 2001 From 65394fd28a8acaf26039418c21718894891295c6 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <albert.astals.cid@kdab.com> From: Albert Astals Cid <albert.astals.cid@kdab.com>
Date: Fri, 21 May 2021 13:42:35 +0200 Date: Fri, 21 May 2021 13:42:35 +0200
Subject: [PATCH 04/17] Support &apos; in styled text Subject: [PATCH 02/19] Support &apos; in styled text
Pick-to: 6.1 5.15 Pick-to: 6.1 5.15
Change-Id: I4a8db963e52a7899ab1796f9a560e8029cc1c929 Change-Id: I4a8db963e52a7899ab1796f9a560e8029cc1c929

View File

@ -1,7 +1,7 @@
From bdf7658d89e1df55ded318432d4412dbf1d5d0f9 Mon Sep 17 00:00:00 2001 From 9828b34ccf14d33bc9a61a4bd37e9e8d7877168a Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <albert.astals.cid@kdab.com> From: Albert Astals Cid <albert.astals.cid@kdab.com>
Date: Thu, 17 Jun 2021 16:32:28 +0200 Date: Thu, 17 Jun 2021 16:32:28 +0200
Subject: [PATCH 05/17] Remove unused QPointer<QQuickPointerMask> Subject: [PATCH 03/19] Remove unused QPointer<QQuickPointerMask>
Change-Id: I009fa6bbd8599dc3bb2e810176fe20e70ed50851 Change-Id: I009fa6bbd8599dc3bb2e810176fe20e70ed50851
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>

View File

@ -1,7 +1,7 @@
From 8da88589929a1d82103c8bbfa80210f3c1af3714 Mon Sep 17 00:00:00 2001 From 814f570d51323630ff84038ca04b5c02639e0ee5 Mon Sep 17 00:00:00 2001
From: Dmitry Shachnev <mitya57@gmail.com> From: Dmitry Shachnev <mitya57@gmail.com>
Date: Wed, 18 Aug 2021 22:50:29 +0300 Date: Wed, 18 Aug 2021 22:50:29 +0300
Subject: [PATCH 06/17] Include <limits> in Yarr.h to fix build with GCC 11 Subject: [PATCH 04/19] Include <limits> in Yarr.h to fix build with GCC 11
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit

View File

@ -1,7 +1,7 @@
From 103503f1cae9e928a4fa8b5e7e1f7af34f1add4d Mon Sep 17 00:00:00 2001 From adf0f345f6fb823679e1c6424d106fd1413c1edc Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org> From: Aleix Pol <aleixpol@kde.org>
Date: Tue, 21 Sep 2021 00:10:26 +0200 Date: Tue, 21 Sep 2021 00:10:26 +0200
Subject: [PATCH 07/17] QQuickLoader: Do not incubate if the source arrives Subject: [PATCH 05/19] QQuickLoader: Do not incubate if the source arrives
after setActive(false) after setActive(false)
Otherwise we end up in the crazy place of active being false but item Otherwise we end up in the crazy place of active being false but item

View File

@ -1,7 +1,7 @@
From 0fdd8a998075a8b52954724743d3a04c105c6ce2 Mon Sep 17 00:00:00 2001 From 95064bee0366ed3aa9cc823ed73fba55093ced01 Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org> From: Aleix Pol <aleixpol@kde.org>
Date: Thu, 23 Sep 2021 03:43:04 +0200 Date: Thu, 23 Sep 2021 03:43:04 +0200
Subject: [PATCH 08/17] QQmlDelegateModel: Refresh the view when a column is Subject: [PATCH 06/19] QQmlDelegateModel: Refresh the view when a column is
added at 0 added at 0
It can happen that a model reports n>0 rows but columns=0 (See It can happen that a model reports n>0 rows but columns=0 (See
@ -22,7 +22,7 @@ Signed-off-by: Aleix Pol <aleixpol@kde.org>
create mode 100644 tests/auto/qml/qqmldelegatemodel/data/redrawUponColumnChange.qml create mode 100644 tests/auto/qml/qqmldelegatemodel/data/redrawUponColumnChange.qml
diff --git a/src/qmlmodels/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp diff --git a/src/qmlmodels/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp
index 26ded63c41..53e511303e 100644 index 312a621029..f5d586a4c2 100644
--- a/src/qmlmodels/qqmldelegatemodel.cpp --- a/src/qmlmodels/qqmldelegatemodel.cpp
+++ b/src/qmlmodels/qqmldelegatemodel.cpp +++ b/src/qmlmodels/qqmldelegatemodel.cpp
@@ -389,6 +389,12 @@ void QQmlDelegateModelPrivate::connectToAbstractItemModel() @@ -389,6 +389,12 @@ void QQmlDelegateModelPrivate::connectToAbstractItemModel()
@ -51,7 +51,7 @@ index 26ded63c41..53e511303e 100644
QObject::disconnect(aim, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>)), QObject::disconnect(aim, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector<int>)),
q, SLOT(_q_dataChanged(QModelIndex,QModelIndex,QVector<int>))); q, SLOT(_q_dataChanged(QModelIndex,QModelIndex,QVector<int>)));
QObject::disconnect(aim, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), QObject::disconnect(aim, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)),
@@ -1958,6 +1970,38 @@ void QQmlDelegateModel::_q_rowsMoved( @@ -1960,6 +1972,38 @@ void QQmlDelegateModel::_q_rowsMoved(
} }
} }
@ -122,7 +122,7 @@ index 0000000000..206133bb39
+ } + }
+} +}
diff --git a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp diff --git a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp
index 71550a50f3..4c1eae7ac7 100644 index 9bc359d243..120b1897a1 100644
--- a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp --- a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp
+++ b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp +++ b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp
@@ -27,6 +27,8 @@ @@ -27,6 +27,8 @@
@ -134,16 +134,16 @@ index 71550a50f3..4c1eae7ac7 100644
#include <QtQml/qqmlcomponent.h> #include <QtQml/qqmlcomponent.h>
#include <QtQmlModels/private/qqmldelegatemodel_p.h> #include <QtQmlModels/private/qqmldelegatemodel_p.h>
#include <QtQuick/qquickview.h> #include <QtQuick/qquickview.h>
@@ -45,6 +47,7 @@ private slots: @@ -46,6 +48,7 @@ private slots:
void valueWithoutCallingObjectFirst_data();
void valueWithoutCallingObjectFirst(); void valueWithoutCallingObjectFirst();
void filterOnGroup_removeWhenCompleted(); void filterOnGroup_removeWhenCompleted();
void qtbug_86017();
+ void redrawUponColumnChange(); + void redrawUponColumnChange();
}; };
class AbstractItemModel : public QAbstractItemModel class AbstractItemModel : public QAbstractItemModel
@@ -149,6 +152,30 @@ void tst_QQmlDelegateModel::filterOnGroup_removeWhenCompleted() @@ -164,6 +167,30 @@ void tst_QQmlDelegateModel::qtbug_86017()
QTest::qWaitFor([=]{ return model->count() == 2; } ); QCOMPARE(model->filterGroup(), "selected");
} }
+void tst_QQmlDelegateModel::redrawUponColumnChange() +void tst_QQmlDelegateModel::redrawUponColumnChange()

View File

@ -1,7 +1,7 @@
From f2d1bfa96bedb09c27f52a802b03cbefb17a0257 Mon Sep 17 00:00:00 2001 From c580a46359307b03bb3e8d5a3ce844fcd167d92d Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org> From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Sun, 10 Oct 2021 21:04:21 +0300 Date: Sun, 10 Oct 2021 21:04:21 +0300
Subject: [PATCH 09/17] Fix sweep step for tainted QObject JavaScript wrappers Subject: [PATCH 07/19] Fix sweep step for tainted QObject JavaScript wrappers
Currently, whenever the garbage collector runs, it will destroy all Currently, whenever the garbage collector runs, it will destroy all
valid tainted wrappers. valid tainted wrappers.

View File

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

View File

@ -1,7 +1,7 @@
From 8b0a4b1a329010e056b19fdd9940bad2036b5f57 Mon Sep 17 00:00:00 2001 From b92f401a758890d26ef0d00d15c33af5c81f9038 Mon Sep 17 00:00:00 2001
From: Laszlo Agocs <laszlo.agocs@qt.io> From: Laszlo Agocs <laszlo.agocs@qt.io>
Date: Mon, 11 Oct 2021 15:37:33 +0200 Date: Mon, 11 Oct 2021 15:37:33 +0200
Subject: [PATCH 11/17] Revert "Fix for possible crash in Subject: [PATCH 09/19] Revert "Fix for possible crash in
QSGDefaultLayer::grab" QSGDefaultLayer::grab"
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8

View File

@ -1,7 +1,7 @@
From 0e201d3561cecc8a1e982f81095f14af1dc3ceca Mon Sep 17 00:00:00 2001 From 695e1217f2e568feb3ddec91b2cf70df251964e5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jan=20Arve=20S=C3=A6ther?= <jan-arve.saether@qt.io> From: =?UTF-8?q?Jan=20Arve=20S=C3=A6ther?= <jan-arve.saether@qt.io>
Date: Thu, 3 Sep 2020 10:51:01 +0200 Date: Thu, 3 Sep 2020 10:51:01 +0200
Subject: [PATCH 12/17] Fix TapHandler so that it actually registers a tap Subject: [PATCH 10/19] Fix TapHandler so that it actually registers a tap
This bug caused all quick examples that used the This bug caused all quick examples that used the
shared\LauncherList.qml to be broken. shared\LauncherList.qml to be broken.

View File

@ -1,7 +1,7 @@
From 5af400361da5d66427c68bf743c8def70b7cbc8e Mon Sep 17 00:00:00 2001 From d46164fdd36d748d427716e473e8f006d391f088 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org> From: Albert Astals Cid <aacid@kde.org>
Date: Tue, 16 Nov 2021 22:43:37 +0100 Date: Tue, 16 Nov 2021 22:43:37 +0100
Subject: [PATCH 13/17] Revert "Fix TapHandler so that it actually registers a Subject: [PATCH 11/19] Revert "Fix TapHandler so that it actually registers a
tap" tap"
This reverts commit 36e8ccd434f948e4f11a8f9d59139ec072e41ff5. This reverts commit 36e8ccd434f948e4f11a8f9d59139ec072e41ff5.

View File

@ -1,7 +1,7 @@
From 9a3aaa96c58d167ab9eec0d0c8105853e8c6117a Mon Sep 17 00:00:00 2001 From 01322ea1a58b441071be7c66754d62ac50f49c4e Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@qt.io> From: Marc Mutz <marc.mutz@qt.io>
Date: Tue, 21 Dec 2021 09:20:17 +0100 Date: Tue, 21 Dec 2021 09:20:17 +0100
Subject: [PATCH 14/17] QQmlJs::FixedPoolArray: fix UB (precondition violation) Subject: [PATCH 12/19] QQmlJs::FixedPoolArray: fix UB (precondition violation)
in allocate() in allocate()
Says ubsan: Says ubsan:

View File

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

View File

@ -1,7 +1,7 @@
From 5eee7419f55c592a24d9c7746df0f197d8f0a71d Mon Sep 17 00:00:00 2001 From b485b9ca8983499a55d7e06a3ac3f0ac45a61b99 Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org> From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Sat, 29 Jan 2022 21:59:33 +0200 Date: Sat, 29 Jan 2022 21:59:33 +0200
Subject: [PATCH 16/17] Make sure QQuickWidget and its offscreen window's Subject: [PATCH 14/19] Make sure QQuickWidget and its offscreen window's
screens are always in sync screens are always in sync
By default, the offscreen window is placed on the primary screen. By default, the offscreen window is placed on the primary screen.

View File

@ -1,7 +1,7 @@
From 51efb2ed2f071beda188270a23ac450fe4b318f7 Mon Sep 17 00:00:00 2001 From aca0c736c99439a8f4d297bc57c1fa5a2d2a6e88 Mon Sep 17 00:00:00 2001
From: Fabian Kosmale <fabian.kosmale@qt.io> From: Fabian Kosmale <fabian.kosmale@qt.io>
Date: Wed, 4 May 2022 09:10:54 +0200 Date: Wed, 4 May 2022 09:10:54 +0200
Subject: [PATCH 17/17] QQuickItem: Guard against cycles in Subject: [PATCH 15/19] QQuickItem: Guard against cycles in
nextPrevItemInTabFocusChain nextPrevItemInTabFocusChain
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
@ -37,7 +37,7 @@ Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
create mode 100644 tests/auto/quick/qquickitem2/data/activeFocusOnTab_infiniteLoop3.qml 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 diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
index 497672b497..81b0db0b69 100644 index 3df899d63d..83e52b12e5 100644
--- a/src/quick/items/qquickitem.cpp --- a/src/quick/items/qquickitem.cpp
+++ b/src/quick/items/qquickitem.cpp +++ b/src/quick/items/qquickitem.cpp
@@ -59,6 +59,7 @@ @@ -59,6 +59,7 @@
@ -48,7 +48,7 @@ index 497672b497..81b0db0b69 100644
#include <private/qqmlglobal_p.h> #include <private/qqmlglobal_p.h>
#include <private/qqmlengine_p.h> #include <private/qqmlengine_p.h>
@@ -2520,6 +2521,7 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo @@ -2526,6 +2527,7 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo
QQuickItem *current = item; QQuickItem *current = item;
qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: startItem:" << startItem; qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: startItem:" << startItem;
qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: firstFromItem:" << firstFromItem; qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: firstFromItem:" << firstFromItem;
@ -56,7 +56,7 @@ index 497672b497..81b0db0b69 100644
do { do {
qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: current:" << current; qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: current:" << current;
qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: from:" << from; qCDebug(DBG_FOCUS) << "QQuickItemPrivate::nextPrevItemInTabFocusChain: from:" << from;
@@ -2586,7 +2588,10 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo @@ -2592,7 +2594,10 @@ QQuickItem* QQuickItemPrivate::nextPrevItemInTabFocusChain(QQuickItem *item, boo
// traversed all of the chain (by compare the [current] item with [startItem]) // 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, // Since the [startItem] might be promoted to its parent if it is invisible,
// we still have to check [current] item with original start item // we still have to check [current] item with original start item

View File

@ -0,0 +1,43 @@
From db0c06d98464d8d0cc6dfddfc502593951bac768 Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@kdab.com>
Date: Tue, 16 Jul 2019 11:23:37 +0200
Subject: [PATCH 16/19] QSGOpenGLDistanceFieldGlyphCache: fix multiplication
result truncation
The type of the expression int * int is int, so truncation has already
happened when the result is assigned to a qint64.
Fix by casting one of the multiplicants to qint64 before performing
the multiplication. This multiplication cannot overflow, because int
is 32-bit on all supported platforms.
The addition of 'size' to the pointer will still truncate the result,
on 32bit platforms, but that check is in itself UB. A follow-up commit
will fix the check, and with it the last truncation to 32bit.
Coverity-Id: 218769
Pick-to: 6.3 6.2 5.15
Change-Id: I0d71950695b9743db8c96d825e68bb1e9c47de02
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit cacfc1dbb9719c0ef55cff69dad0921ce1405438)
---
src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp
index 53b6fe117f..f7cb8bede3 100644
--- a/src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp
+++ b/src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp
@@ -512,7 +512,7 @@ bool QSGRhiDistanceFieldGlyphCache::loadPregeneratedCache(const QRawFont &font)
int width = texInfo->allocatedArea.width();
int height = texInfo->allocatedArea.height();
- qint64 size = width * height;
+ qint64 size = qint64(width) * height;
if (reinterpret_cast<const char *>(textureData + size) > qtdfTableEnd) {
qWarning("qtdf table too small in font '%s'.",
qPrintable(font.familyName()));
--
2.36.1

View File

@ -0,0 +1,68 @@
From 59019a226146d9d80a01db21c0c3d692027048aa Mon Sep 17 00:00:00 2001
From: Marc Mutz <marc.mutz@kdab.com>
Date: Tue, 16 Jul 2019 11:31:01 +0200
Subject: [PATCH 17/19] QSGOpenGLDistanceFieldGlyphCache: fix UB (ordering of
pointers not from the same array)
The code performed out of bounds checks by adding the size of the
buffer to a pointer and comparing the result to the the
one-past-the-end pointer of the buffer.
This is UB, for three reasons:
- in one case, a qint64 is added to a pointer, silently truncating the
result on 32bit platforms
- if the buffer overflow is large, the pointer value may wrap around,
yielding a result that is numerically less than the end pointer, but
still out-of-bounds.
- pointer order is only defined within a C array, plus one past the
end. On failure, pointers outside that range are compared.
Fix by comparing distance(it, end) with the required size for the
chunk to be written instead.
Pick-to: 6.3 6.2 5.15
Change-Id: I356bb8c8a65a93b8b1c1eb7bac381dd64bea719e
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry picked from commit 8d9bd6b381bfc759d575954801b683354ad6a790)
---
src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp
index f7cb8bede3..219cdd5966 100644
--- a/src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp
+++ b/src/quick/scenegraph/qsgrhidistancefieldglyphcache.cpp
@@ -446,7 +446,7 @@ bool QSGRhiDistanceFieldGlyphCache::loadPregeneratedCache(const QRawFont &font)
const char *textureRecord = allocatorData;
for (int i = 0; i < textureCount; ++i, textureRecord += Qtdf::TextureRecordSize) {
- if (textureRecord + Qtdf::TextureRecordSize > qtdfTableEnd) {
+ if (qtdfTableEnd - textureRecord < Qtdf::TextureRecordSize) {
qWarning("qtdf table too small in font '%s'.",
qPrintable(font.familyName()));
return false;
@@ -462,7 +462,7 @@ bool QSGRhiDistanceFieldGlyphCache::loadPregeneratedCache(const QRawFont &font)
const char *glyphRecord = textureRecord;
for (quint32 i = 0; i < glyphCount; ++i, glyphRecord += Qtdf::GlyphRecordSize) {
- if (glyphRecord + Qtdf::GlyphRecordSize > qtdfTableEnd) {
+ if (qtdfTableEnd - glyphRecord < Qtdf:: GlyphRecordSize) {
qWarning("qtdf table too small in font '%s'.",
qPrintable(font.familyName()));
return false;
@@ -513,7 +513,7 @@ bool QSGRhiDistanceFieldGlyphCache::loadPregeneratedCache(const QRawFont &font)
int width = texInfo->allocatedArea.width();
int height = texInfo->allocatedArea.height();
qint64 size = qint64(width) * height;
- if (reinterpret_cast<const char *>(textureData + size) > qtdfTableEnd) {
+ if (qtdfTableEnd - reinterpret_cast<const char *>(textureData) < size) {
qWarning("qtdf table too small in font '%s'.",
qPrintable(font.familyName()));
return false;
--
2.36.1

View File

@ -0,0 +1,423 @@
From 955c47dd07d4337c279433b246421b92a4d16341 Mon Sep 17 00:00:00 2001
From: Shawn Rutledge <shawn.rutledge@qt.io>
Date: Tue, 4 May 2021 10:12:39 +0200
Subject: [PATCH 18/19] Fix Flickable wheel velocity calculation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Angular velocity is defined as angle rotated divided by time elapsed.
But the historical problem with Flickable is that the calculation
ignored time, as if there was a maximum frequency of events and we
only needed to know the rotation angle per fixed unit of time.
With "clicky" mouse wheels perhaps it was a reasonable approximation.
With touchpads that provide pixel deltas, we've been doing the velocity
calculation the right way since a6ed830f4779e218b8e8f8d82dc4aa9b4b4528a1
Now we divide by dt also in the wheel rotation case.
That gives instantaneous velocity. Next question: how to do smoothing?
AxisData::velocityBuffer is basically a Kalman filter, but until now
it was used only when dragging ends and we animate the deceleration from
the velocity at that time. It seems to work well for smoothing the
velocity that comes from wheel events, too. So now we use that instead
of smoothVelocity, and it stays in control better.
Next question: when a series of wheel events occurs, we have valid
dt for the dy / dt velocity calculation (or dx / dt horizontally),
but what about the initial flick? What if first thing the user does
is rotate a physical mouse wheel by one "click", how far should
Flickable move before it comes to rest? QStyleHints::wheelScrollLines()
tells us how far to move for one wheel event... in "lines", whatever
that is. Flickable doesn't know about its contents. But it "feels"
reasonable if we define a "line" as 24 pixels. At least the setting
will do something now: applications can adjust it, and some system
control panels can adjust it. A subclass of QQuickFlickable (such as
TableView) could even change QQFlickablePrivate::initialWheelFlickDistance
to be the actual number of pixels per "line", to scroll exactly by rows.
(But when the events occur faster, it moves further and faster, like it
always did.)
OK so we know how far we want to move when the Flickable is at rest
and receives a QWheelEvent with angleDelta of 120. I.e. when isMoving()
is false. So I tried an experiment: set dt to 0.25. How far did it move?
77 pixels. Why? We're making it move via QQuickFlickablePrivate::flick()
which does some math and drives the timeline. The key formula is
qreal dist = v2 / (accel * 2.0)
which agrees with the testing: if the wheel turns by 120 units,
(120 / 0.25)^2 / (1500 * 2) =~ 77
So it's possible to do the algebra to reverse-engineer what dt should be
so that we will move the right distance with a single wheel event,
despite the complexity of the animation itself. That's what is now
done. When the user rotates the wheel very slowly, it moves by discrete
amounts but with smooth animation. A little faster, and it speeds up,
somewhat like it did before, but with more control. If it has sped
up to a high speed and then the user rotates the wheel backwards,
it reverses instantly: we clear the Kalman filter and insert instantaneous
velocity (so it will go from there at the next event).
On a touchpad, it also feels quite in-control because the velocity
is calculated properly as distance-delta / time-delta. Smoothing
it out doesn't hurt, and animating after release doesn't hurt.
It longer goes "zing" out of control when the wheel events come in too
frequently from a touchpad or a free-spinning wheel.
None of this affects trackpads on macOS, because then the wheel events
have phases and pixel deltas, and we don't use this animation. We still
should try to get that working on as many OSes as possible, eventually.
Clarify the meaning of the flickDeceleration property.
[ChangeLog][QtQuick][Flickable] Flickable no longer tries to detect
whether you're using a "clicky" wheel or a touchpad, but rather does the
velocity calculation more correctly with elapsed time (dθ / dt).
A single rotation of a "clicky" wheel also moves a fixed distance,
which is now adjustable via QStyleHints::wheelScrollLines().
Animation is restored, but should now stay in control on touchpads;
and it will once again transition the "moving" properties correctly
when scrolling ends.
Fixes: QTBUG-56075
Pick-to: 6.2
Change-Id: I5166ca31c86335641cf407a922a3a970fced653d
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
(cherry picked from commit a8fbd865140d4dd165723c7e3d4168514d4b1d0c)
---
src/quick/items/qquickflickable.cpp | 95 +++++++++++++------
src/quick/items/qquickflickable_p_p.h | 1 +
src/quick/util/qquicktimeline.cpp | 3 +
.../qquickflickable/tst_qquickflickable.cpp | 9 +-
tests/manual/touch/flicktext.qml | 30 ++++++
5 files changed, 107 insertions(+), 31 deletions(-)
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index 9a68be4c49..efb2f11d02 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -263,7 +263,8 @@ QQuickFlickablePrivate::QQuickFlickablePrivate()
, deceleration(QML_FLICK_DEFAULTDECELERATION)
, maxVelocity(QML_FLICK_DEFAULTMAXVELOCITY), reportedVelocitySmoothing(100)
, delayedPressEvent(nullptr), pressDelay(0), fixupDuration(400)
- , flickBoost(1.0), fixupMode(Normal), vTime(0), visibleArea(nullptr)
+ , flickBoost(1.0), initialWheelFlickDistance(qApp->styleHints()->wheelScrollLines() * 24)
+ , fixupMode(Normal), vTime(0), visibleArea(nullptr)
, flickableDirection(QQuickFlickable::AutoFlickDirection)
, boundsBehavior(QQuickFlickable::DragAndOvershootBounds)
, boundsMovement(QQuickFlickable::FollowBoundsBehavior)
@@ -531,10 +532,14 @@ void QQuickFlickablePrivate::updateBeginningEnd()
if (atBeginning != vData.atBeginning) {
vData.atBeginning = atBeginning;
atYBeginningChange = true;
+ if (!vData.moving && atBeginning)
+ vData.smoothVelocity.setValue(0);
}
if (atEnd != vData.atEnd) {
vData.atEnd = atEnd;
atYEndChange = true;
+ if (!vData.moving && atEnd)
+ vData.smoothVelocity.setValue(0);
}
// Horizontal
@@ -547,10 +552,14 @@ void QQuickFlickablePrivate::updateBeginningEnd()
if (atBeginning != hData.atBeginning) {
hData.atBeginning = atBeginning;
atXBeginningChange = true;
+ if (!hData.moving && atBeginning)
+ hData.smoothVelocity.setValue(0);
}
if (atEnd != hData.atEnd) {
hData.atEnd = atEnd;
atXEndChange = true;
+ if (!hData.moving && atEnd)
+ hData.smoothVelocity.setValue(0);
}
if (vData.extentsChanged) {
@@ -1489,6 +1498,7 @@ void QQuickFlickable::wheelEvent(QWheelEvent *event)
d->hData.velocity = 0;
d->timer.start();
d->maybeBeginDrag(currentTimestamp, event->position());
+ d->lastPosTime = -1;
break;
case Qt::NoScrollPhase: // default phase with an ordinary wheel mouse
case Qt::ScrollUpdate:
@@ -1515,20 +1525,34 @@ void QQuickFlickable::wheelEvent(QWheelEvent *event)
return;
}
+ qreal elapsed = qreal(currentTimestamp - d->lastPosTime) / qreal(1000);
+ if (elapsed <= 0) {
+ d->lastPosTime = currentTimestamp;
+ qCDebug(lcWheel) << "insufficient elapsed time: can't calculate velocity" << elapsed;
+ return;
+ }
+
if (event->source() == Qt::MouseEventNotSynthesized || event->pixelDelta().isNull()) {
- // physical mouse wheel, so use angleDelta
+ // no pixel delta (physical mouse wheel, or "dumb" touchpad), so use angleDelta
int xDelta = event->angleDelta().x();
int yDelta = event->angleDelta().y();
+ // For a single "clicky" wheel event (angleDelta +/- 120),
+ // we want flick() to end up moving a distance proportional to QStyleHints::wheelScrollLines().
+ // The decel algo from there is
+ // qreal dist = v2 / (accel * 2.0);
+ // i.e. initialWheelFlickDistance = (120 / dt)^2 / (deceleration * 2)
+ // now solve for dt:
+ // dt = 120 / sqrt(deceleration * 2 * initialWheelFlickDistance)
+ if (!isMoving())
+ elapsed = 120 / qSqrt(d->deceleration * 2 * d->initialWheelFlickDistance);
if (yflick() && yDelta != 0) {
- bool valid = false;
- if (yDelta > 0 && contentY() > -minYExtent()) {
- d->vData.velocity = qMax(yDelta*2 - d->vData.smoothVelocity.value(), qreal(d->maxVelocity/4));
- valid = true;
- } else if (yDelta < 0 && contentY() < -maxYExtent()) {
- d->vData.velocity = qMin(yDelta*2 - d->vData.smoothVelocity.value(), qreal(-d->maxVelocity/4));
- valid = true;
- }
- if (valid) {
+ qreal instVelocity = yDelta / elapsed;
+ // if the direction has changed, start over with filtering, to allow instant movement in the opposite direction
+ if ((instVelocity < 0 && d->vData.velocity > 0) || (instVelocity > 0 && d->vData.velocity < 0))
+ d->vData.velocityBuffer.clear();
+ d->vData.addVelocitySample(instVelocity, d->maxVelocity);
+ d->vData.updateVelocity();
+ if ((yDelta > 0 && contentY() > -minYExtent()) || (yDelta < 0 && contentY() < -maxYExtent())) {
d->flickY(d->vData.velocity);
d->flickingStarted(false, true);
if (d->vData.flicking) {
@@ -1539,15 +1563,13 @@ void QQuickFlickable::wheelEvent(QWheelEvent *event)
}
}
if (xflick() && xDelta != 0) {
- bool valid = false;
- if (xDelta > 0 && contentX() > -minXExtent()) {
- d->hData.velocity = qMax(xDelta*2 - d->hData.smoothVelocity.value(), qreal(d->maxVelocity/4));
- valid = true;
- } else if (xDelta < 0 && contentX() < -maxXExtent()) {
- d->hData.velocity = qMin(xDelta*2 - d->hData.smoothVelocity.value(), qreal(-d->maxVelocity/4));
- valid = true;
- }
- if (valid) {
+ qreal instVelocity = xDelta / elapsed;
+ // if the direction has changed, start over with filtering, to allow instant movement in the opposite direction
+ if ((instVelocity < 0 && d->hData.velocity > 0) || (instVelocity > 0 && d->hData.velocity < 0))
+ d->hData.velocityBuffer.clear();
+ d->hData.addVelocitySample(instVelocity, d->maxVelocity);
+ d->hData.updateVelocity();
+ if ((xDelta > 0 && contentX() > -minXExtent()) || (xDelta < 0 && contentX() < -maxXExtent())) {
d->flickX(d->hData.velocity);
d->flickingStarted(true, false);
if (d->hData.flicking) {
@@ -1562,18 +1584,13 @@ void QQuickFlickable::wheelEvent(QWheelEvent *event)
int xDelta = event->pixelDelta().x();
int yDelta = event->pixelDelta().y();
- qreal elapsed = qreal(currentTimestamp - d->lastPosTime) / 1000.;
- if (elapsed <= 0) {
- d->lastPosTime = currentTimestamp;
- return;
- }
QVector2D velocity(xDelta / elapsed, yDelta / elapsed);
- d->lastPosTime = currentTimestamp;
d->accumulatedWheelPixelDelta += QVector2D(event->pixelDelta());
d->drag(currentTimestamp, event->type(), event->position(), d->accumulatedWheelPixelDelta,
true, !d->scrollingPhase, true, velocity);
event->accept();
}
+ d->lastPosTime = currentTimestamp;
if (!event->isAccepted())
QQuickItem::wheelEvent(event);
@@ -1744,6 +1761,10 @@ void QQuickFlickable::componentComplete()
setContentX(-minXExtent());
if (!d->vData.explicitValue && d->vData.startMargin != 0.)
setContentY(-minYExtent());
+ if (lcWheel().isDebugEnabled() || lcVel().isDebugEnabled()) {
+ d->timeline.setObjectName(QLatin1String("timeline for Flickable ") + objectName());
+ d->velocityTimeline.setObjectName(QLatin1String("velocity timeline for Flickable ") + objectName());
+ }
}
void QQuickFlickable::viewportMoved(Qt::Orientations orient)
@@ -2491,9 +2512,23 @@ void QQuickFlickable::setMaximumFlickVelocity(qreal v)
/*!
\qmlproperty real QtQuick::Flickable::flickDeceleration
- This property holds the rate at which a flick will decelerate.
-
- The default value is platform dependent.
+ This property holds the rate at which a flick will decelerate:
+ the higher the number, the faster it slows down when the user stops
+ flicking via touch, touchpad or mouse wheel. For example 0.0001 is nearly
+ "frictionless", and 10000 feels quite "sticky".
+
+ The default value is platform dependent. Values of zero or less are not allowed.
+
+ \note For touchpad flicking, some platforms drive Flickable directly by
+ sending QWheelEvents with QWheelEvent::phase() being \c Qt::ScrollMomentum,
+ after the user has released all fingers from the touchpad. In that case,
+ the operating system is controlling the deceleration, and this property has
+ no effect.
+
+ \note For mouse wheel scrolling, and for gesture scrolling on touchpads
+ that do not have a momentum phase, extremely large values of
+ flickDeceleration can make Flickable very resistant to scrolling,
+ especially if \l maximumFlickVelocity is too small.
*/
qreal QQuickFlickable::flickDeceleration() const
{
@@ -2506,7 +2541,7 @@ void QQuickFlickable::setFlickDeceleration(qreal deceleration)
Q_D(QQuickFlickable);
if (deceleration == d->deceleration)
return;
- d->deceleration = deceleration;
+ d->deceleration = qMax(0.001, deceleration);
emit flickDecelerationChanged();
}
diff --git a/src/quick/items/qquickflickable_p_p.h b/src/quick/items/qquickflickable_p_p.h
index 414c9c33d6..6163613493 100644
--- a/src/quick/items/qquickflickable_p_p.h
+++ b/src/quick/items/qquickflickable_p_p.h
@@ -241,6 +241,7 @@ public:
int pressDelay;
int fixupDuration;
qreal flickBoost;
+ qreal initialWheelFlickDistance;
enum FixupMode { Normal, Immediate, ExtentChanged };
FixupMode fixupMode;
diff --git a/src/quick/util/qquicktimeline.cpp b/src/quick/util/qquicktimeline.cpp
index 7ec7c827eb..abe6eb7261 100644
--- a/src/quick/util/qquicktimeline.cpp
+++ b/src/quick/util/qquicktimeline.cpp
@@ -53,6 +53,8 @@
QT_BEGIN_NAMESPACE
+Q_LOGGING_CATEGORY(lcTl, "qt.quick.timeline")
+
struct Update {
Update(QQuickTimeLineValue *_g, qreal _v)
: g(_g), v(_v) {}
@@ -513,6 +515,7 @@ void QQuickTimeLine::reset(QQuickTimeLineValue &timeLineValue)
qWarning() << "QQuickTimeLine: Cannot reset a QQuickTimeLineValue owned by another timeline.";
return;
}
+ qCDebug(lcTl) << static_cast<QObject*>(this) << timeLineValue.value();
remove(&timeLineValue);
timeLineValue._t = nullptr;
}
diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
index f3659290eb..9fa51da6f8 100644
--- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
+++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp
@@ -870,6 +870,7 @@ void tst_qquickflickable::wheel()
QVERIFY(flick != nullptr);
QQuickFlickablePrivate *fp = QQuickFlickablePrivate::get(flick);
QSignalSpy moveEndSpy(flick, SIGNAL(movementEnded()));
+ quint64 timestamp = 10;
// test a vertical flick
{
@@ -877,6 +878,7 @@ void tst_qquickflickable::wheel()
QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(), QPoint(0,-120),
Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase, false);
event.setAccepted(false);
+ event.setTimestamp(timestamp);
QGuiApplication::sendEvent(window.data(), &event);
}
@@ -887,6 +889,7 @@ void tst_qquickflickable::wheel()
QCOMPARE(fp->velocityTimeline.isActive(), false);
QCOMPARE(fp->timeline.isActive(), false);
QTest::qWait(50); // make sure that onContentYChanged won't sneak in again
+ timestamp += 50;
QCOMPARE(flick->property("movementsAfterEnd").value<int>(), 0); // QTBUG-55886
// get ready to test horizontal flick
@@ -900,8 +903,8 @@ void tst_qquickflickable::wheel()
QPoint pos(200, 200);
QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(), QPoint(-120,0),
Qt::NoButton, Qt::NoModifier, Qt::NoScrollPhase, false);
-
event.setAccepted(false);
+ event.setTimestamp(timestamp);
QGuiApplication::sendEvent(window.data(), &event);
}
@@ -926,11 +929,13 @@ void tst_qquickflickable::trackpad()
QVERIFY(flick != nullptr);
QSignalSpy moveEndSpy(flick, SIGNAL(movementEnded()));
QPoint pos(200, 200);
+ quint64 timestamp = 10;
{
QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(0,-100), QPoint(0,-120),
Qt::NoButton, Qt::NoModifier, Qt::ScrollBegin, false);
event.setAccepted(false);
+ event.setTimestamp(timestamp++);
QGuiApplication::sendEvent(window.data(), &event);
}
@@ -944,6 +949,7 @@ void tst_qquickflickable::trackpad()
QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(-100,0), QPoint(-120,0),
Qt::NoButton, Qt::NoModifier, Qt::ScrollUpdate, false);
event.setAccepted(false);
+ event.setTimestamp(timestamp++);
QGuiApplication::sendEvent(window.data(), &event);
}
@@ -954,6 +960,7 @@ void tst_qquickflickable::trackpad()
QWheelEvent event(pos, window->mapToGlobal(pos), QPoint(0,0), QPoint(0,0),
Qt::NoButton, Qt::NoModifier, Qt::ScrollEnd, false);
event.setAccepted(false);
+ event.setTimestamp(timestamp++);
QGuiApplication::sendEvent(window.data(), &event);
}
diff --git a/tests/manual/touch/flicktext.qml b/tests/manual/touch/flicktext.qml
index 9e84261687..e69d6207a9 100644
--- a/tests/manual/touch/flicktext.qml
+++ b/tests/manual/touch/flicktext.qml
@@ -380,6 +380,36 @@ Rectangle {
text: "content X " + flick.contentX.toFixed(2) + " Y " + flick.contentY.toFixed(2)
}
}
+
+ Column {
+ Row {
+ spacing: 2
+ Examples.Button {
+ id: decrButton
+ text: "-"
+ onClicked: flick.flickDeceleration -= 100
+ Timer {
+ running: decrButton.pressed
+ interval: 100; repeat: true
+ onTriggered: flick.flickDeceleration -= 100
+ }
+ }
+ Text {
+ horizontalAlignment: Text.AlignHCenter
+ text: "decel:\n" + flick.flickDeceleration.toFixed(4)
+ }
+ Examples.Button {
+ id: incrButton
+ text: "+"
+ onClicked: flick.flickDeceleration += 100
+ }
+ Timer {
+ running: incrButton.pressed
+ interval: 100; repeat: true
+ onTriggered: flick.flickDeceleration += 100
+ }
+ }
+ }
}
Component.onCompleted: {
--
2.36.1

View File

@ -0,0 +1,25 @@
From c47f3d7b227c9bc86ca1702ae3291a62c2116cfa Mon Sep 17 00:00:00 2001
From: Wolfgang Frisch <wfrisch@riseup.net>
Date: Thu, 19 May 2022 00:55:50 +0200
Subject: [PATCH 19/19] Fix Flickable with QTBUG-56075 patch applied
---
src/quick/items/qquickflickable.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/quick/items/qquickflickable.cpp b/src/quick/items/qquickflickable.cpp
index efb2f11d02..2a5b16c31a 100644
--- a/src/quick/items/qquickflickable.cpp
+++ b/src/quick/items/qquickflickable.cpp
@@ -62,6 +62,8 @@
QT_BEGIN_NAMESPACE
Q_DECLARE_LOGGING_CATEGORY(lcHandlerParent)
+Q_LOGGING_CATEGORY(lcWheel, "qt.quick.flickable.wheel")
+Q_LOGGING_CATEGORY(lcVel, "qt.quick.flickable.velocity")
// FlickThreshold determines how far the "mouse" must have moved
// before we perform a flick.
--
2.36.1

View File

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

View File

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