diff --git a/0001-Unset-mouseGrabberPopup-if-it-s-removed-from-childre.patch b/0001-Unset-mouseGrabberPopup-if-it-s-removed-from-childre.patch index b6ef009e72bd3f3fc83bb3026c954f73061cd709..9a2ee877ed148adc264742348158a87243d1ab8f 100644 --- a/0001-Unset-mouseGrabberPopup-if-it-s-removed-from-childre.patch +++ b/0001-Unset-mouseGrabberPopup-if-it-s-removed-from-childre.patch @@ -1,4 +1,4 @@ -From 4fd68622be6c6b2b16f8d976b640b79d26dcc075 Mon Sep 17 00:00:00 2001 +From 7c3fbefb8ea1fcfa6c175f8c253f649f5b262d9a Mon Sep 17 00:00:00 2001 From: David Redondo Date: Mon, 19 Jul 2021 10:06:17 +0200 Subject: [PATCH 1/5] Unset mouseGrabberPopup if it's removed from children @@ -178,5 +178,5 @@ index 54952d128..3d50e2dd4 100644 #include "tst_qquickpopup.moc" -- -2.40.0 +2.41.0 diff --git a/0002-Ensure-we-don-t-crash-when-changing-sizes-after-clea.patch b/0002-Ensure-we-don-t-crash-when-changing-sizes-after-clea.patch index 1e0935662fd861e50ca821d61b042400d5200f82..946e47a8055c5754632826780d69113f9e9fbdfc 100644 --- a/0002-Ensure-we-don-t-crash-when-changing-sizes-after-clea.patch +++ b/0002-Ensure-we-don-t-crash-when-changing-sizes-after-clea.patch @@ -1,4 +1,4 @@ -From 774cc9a0d8c177b4363b11b80f88296318967385 Mon Sep 17 00:00:00 2001 +From 996ab6f4e9e5f0ac651a9fe69722a707e57d8105 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Tue, 4 Jan 2022 16:34:16 +0100 Subject: [PATCH 2/5] Ensure we don't crash when changing sizes after cleanup @@ -79,5 +79,5 @@ index e6db14eb5..6197d1547 100644 qreal maxHeight = 0; for (int i = 0; i < count; ++i) { -- -2.40.0 +2.41.0 diff --git a/0003-Fix-scroll-bars-not-showing-up-when-binding-to-stand.patch b/0003-Fix-scroll-bars-not-showing-up-when-binding-to-stand.patch deleted file mode 100644 index 44e9481a85e5b18540ebc196519e1977c15b7a0c..0000000000000000000000000000000000000000 --- a/0003-Fix-scroll-bars-not-showing-up-when-binding-to-stand.patch +++ /dev/null @@ -1,179 +0,0 @@ -From 7145c2589193b0ca0eafbb35085bc5cb5613b055 Mon Sep 17 00:00:00 2001 -From: Mitch Curtis -Date: Mon, 18 Jul 2022 15:21:49 +0800 -Subject: [PATCH 3/5] Fix scroll bars not showing up when binding to standalone - contentItem - -908aa77d16e00f2bccc0ddae0f8b61955c56a6a1 hid old scroll bars, but -didn't account for the situation where the old scroll bars would be put -back into place, and so they never showed up. - -In the case of the linked bug report, since there was a binding to the -ScrollView's contentItem, a default Flickable would be created. After -that binding was evaluated, the contentItem was set, causing the scroll -bars to be hidden (as part of the process of disconnecting from the old -flickable). To fix the issue, we now do the reverse of hideOldItem when -a new contentItem is set. - -Fixes: QTBUG-104983 -Pick-to: 6.2 6.3 6.4 -Change-Id: I910259cc3e8f6a6231ae6c87c7d4f0f652bd0545 -Reviewed-by: Fabian Kosmale -Reviewed-by: Nate Graham - -(cherry picked from qtdeclarative 58bae53237417f28eac6d772fa6ecab657f8a73f) ---- - src/quicktemplates2/qquickcontrol.cpp | 30 +++++++++++++ - src/quicktemplates2/qquickcontrol_p_p.h | 1 + - src/quicktemplates2/qquickscrollbar.cpp | 11 +++++ - tests/auto/controls/data/tst_scrollview.qml | 47 +++++++++++++++++++++ - 4 files changed, 89 insertions(+) - -diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp -index bbbd0e622..1f4b47343 100644 ---- a/src/quicktemplates2/qquickcontrol.cpp -+++ b/src/quicktemplates2/qquickcontrol.cpp -@@ -845,6 +845,13 @@ void QQuickControlPrivate::executeBackground(bool complete) - quickCompleteDeferred(q, backgroundName(), background); - } - -+/* -+ \internal -+ -+ Hides an item that was replaced by a newer one, rather than -+ deleting it, as the item is typically created in QML and hence -+ we don't own it. -+*/ - void QQuickControlPrivate::hideOldItem(QQuickItem *item) - { - if (!item) -@@ -863,6 +870,29 @@ void QQuickControlPrivate::hideOldItem(QQuickItem *item) - #endif - } - -+/* -+ \internal -+ -+ Named "unhide" because it's used for cases where an item -+ that was previously hidden by \l hideOldItem() wants to be -+ shown by a control again, such as a ScrollBar in ScrollView. -+*/ -+void QQuickControlPrivate::unhideOldItem(QQuickControl *control, QQuickItem *item) -+{ -+ Q_ASSERT(item); -+ qCDebug(lcItemManagement) << "unhiding old item" << item; -+ -+ item->setVisible(true); -+ item->setParentItem(control); -+ -+#if QT_CONFIG(accessibility) -+ // Add the item back in to the accessibility tree. -+ QQuickAccessibleAttached *accessible = accessibleAttached(item); -+ if (accessible) -+ accessible->setIgnored(false); -+#endif -+} -+ - void QQuickControlPrivate::updateBaselineOffset() - { - Q_Q(QQuickControl); -diff --git a/src/quicktemplates2/qquickcontrol_p_p.h b/src/quicktemplates2/qquickcontrol_p_p.h -index 8e979079e..a6e624c91 100644 ---- a/src/quicktemplates2/qquickcontrol_p_p.h -+++ b/src/quicktemplates2/qquickcontrol_p_p.h -@@ -173,6 +173,7 @@ public: - virtual void executeBackground(bool complete = false); - - static void hideOldItem(QQuickItem *item); -+ static void unhideOldItem(QQuickControl *control, QQuickItem *item); - - void updateBaselineOffset(); - -diff --git a/src/quicktemplates2/qquickscrollbar.cpp b/src/quicktemplates2/qquickscrollbar.cpp -index 4e2f509db..1c4b308cd 100644 ---- a/src/quicktemplates2/qquickscrollbar.cpp -+++ b/src/quicktemplates2/qquickscrollbar.cpp -@@ -797,6 +797,14 @@ void QQuickScrollBarAttachedPrivate::initHorizontal() - if (parent && parent == flickable->parentItem()) - horizontal->stackAfter(flickable); - -+ // If a scroll bar was previously hidden (due to e.g. setting a new contentItem -+ // on a ScrollView), we need to make sure that we un-hide it. -+ // We don't bother checking if the item is actually the old one, because -+ // if it's not, all of the things the function does (setting parent, visibility, etc.) -+ // should be no-ops anyway. -+ if (auto control = qobject_cast(q_ptr->parent())) -+ QQuickControlPrivate::unhideOldItem(control, horizontal); -+ - layoutHorizontal(); - horizontal->setSize(area->property("widthRatio").toReal()); - horizontal->setPosition(area->property("xPosition").toReal()); -@@ -818,6 +826,9 @@ void QQuickScrollBarAttachedPrivate::initVertical() - if (parent && parent == flickable->parentItem()) - vertical->stackAfter(flickable); - -+ if (auto control = qobject_cast(q_ptr->parent())) -+ QQuickControlPrivate::unhideOldItem(control, vertical); -+ - layoutVertical(); - vertical->setSize(area->property("heightRatio").toReal()); - vertical->setPosition(area->property("yPosition").toReal()); -diff --git a/tests/auto/controls/data/tst_scrollview.qml b/tests/auto/controls/data/tst_scrollview.qml -index 0e8b08352..cd4931184 100644 ---- a/tests/auto/controls/data/tst_scrollview.qml -+++ b/tests/auto/controls/data/tst_scrollview.qml -@@ -576,4 +576,51 @@ TestCase { - verify(newHorizontalScrollBar.visible) - verify(!oldHorizontalScrollBar.visible) - } -+ -+ Component { -+ id: bindingToContentItemAndStandaloneFlickable -+ -+ Item { -+ width: 200 -+ height: 200 -+ -+ property alias scrollView: scrollView -+ -+ ScrollView { -+ id: scrollView -+ anchors.fill: parent -+ contentItem: listView -+ -+ property Item someBinding: contentItem -+ } -+ ListView { -+ id: listView -+ model: 10 -+ delegate: ItemDelegate { -+ text: modelData -+ width: listView.width -+ } -+ } -+ } -+ } -+ -+ // Tests that scroll bars show up for a ScrollView where -+ // - its contentItem is declared as a standalone, separate item -+ // - there is a binding to contentItem (which causes a default Flickable to be created) -+ function test_bindingToContentItemAndStandaloneFlickable() { -+ let root = createTemporaryObject(bindingToContentItemAndStandaloneFlickable, testCase) -+ verify(root) -+ -+ let control = root.scrollView -+ let verticalScrollBar = control.ScrollBar.vertical -+ let horizontalScrollBar = control.ScrollBar.horizontal -+ compare(verticalScrollBar.parent, control) -+ compare(horizontalScrollBar.parent, control) -+ verify(verticalScrollBar.visible) -+ verify(horizontalScrollBar.visible) -+ -+ mouseDrag(verticalScrollBar, verticalScrollBar.width / 2, verticalScrollBar.height / 2, 0, 50) -+ verify(verticalScrollBar.active) -+ verify(horizontalScrollBar.active) -+ } - } --- -2.40.0 - diff --git a/0004-implement-a11y-pressing-of-qquickabstractbutton.patch b/0003-implement-a11y-pressing-of-qquickabstractbutton.patch similarity index 93% rename from 0004-implement-a11y-pressing-of-qquickabstractbutton.patch rename to 0003-implement-a11y-pressing-of-qquickabstractbutton.patch index 6acab558cc9083a1d4fa64e56a6ee21f9120c997..bb188b86de4b092bd2ffe20ae7f4ee5d3be9edac 100644 --- a/0004-implement-a11y-pressing-of-qquickabstractbutton.patch +++ b/0003-implement-a11y-pressing-of-qquickabstractbutton.patch @@ -1,7 +1,7 @@ -From 29c60b84e92c83c28211bc349eb00e6c93eeed80 Mon Sep 17 00:00:00 2001 +From c560f43def3003db0acab85bba70616262673767 Mon Sep 17 00:00:00 2001 From: Harald Sitter Date: Wed, 2 Nov 2022 12:39:11 +0100 -Subject: [PATCH 4/5] implement a11y pressing of qquickabstractbutton +Subject: [PATCH 3/5] implement a11y pressing of qquickabstractbutton MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -51,5 +51,5 @@ index 0fa48980e..ab66220d0 100644 private: -- -2.40.0 +2.41.0 diff --git a/0005-Fix-the-popup-position-of-a-Menu.patch b/0004-Fix-the-popup-position-of-a-Menu.patch similarity index 92% rename from 0005-Fix-the-popup-position-of-a-Menu.patch rename to 0004-Fix-the-popup-position-of-a-Menu.patch index eb5ee84f46be030f3969c8a8064a9c155b9bb734..8a29aee868951b7958e4702abe1ec15896ea6223 100644 --- a/0005-Fix-the-popup-position-of-a-Menu.patch +++ b/0004-Fix-the-popup-position-of-a-Menu.patch @@ -1,7 +1,7 @@ -From 86a84eaa74c4071e5750f23b6e9911762880d391 Mon Sep 17 00:00:00 2001 +From c0844c2c2fa9822689ca3d56876c51d79af08e42 Mon Sep 17 00:00:00 2001 From: Inho Lee Date: Mon, 22 Aug 2022 21:05:00 +0800 -Subject: [PATCH 5/5] Fix the popup position of a Menu +Subject: [PATCH 4/5] Fix the popup position of a Menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit @@ -41,5 +41,5 @@ index e5fe734f7..e36922775 100644 const QWidgetPlatformMenuItem *widgetItem = qobject_cast(item); m_menu->popup(targetPos, widgetItem ? widgetItem->action() : nullptr); -- -2.40.0 +2.41.0 diff --git a/0005-Accessibility-respect-value-in-attached-Accessible-i.patch b/0005-Accessibility-respect-value-in-attached-Accessible-i.patch new file mode 100644 index 0000000000000000000000000000000000000000..0dc0f43a392201bc7a3e4eaa611fc3d1bf733e01 --- /dev/null +++ b/0005-Accessibility-respect-value-in-attached-Accessible-i.patch @@ -0,0 +1,167 @@ +From a2d56960dd76c94a5115b5415be5ee174d377718 Mon Sep 17 00:00:00 2001 +From: Volker Hilsheimer +Date: Tue, 18 Apr 2023 22:05:36 +0200 +Subject: [PATCH 5/5] 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/quicktemplates2/qquickcontrol.cpp | 3 ++- + src/quicktemplates2/qquicklabel.cpp | 2 +- + src/quicktemplates2/qquickpopup.cpp | 14 ++++++++++++++ + src/quicktemplates2/qquickpopup_p.h | 3 +++ + src/quicktemplates2/qquickpopupitem.cpp | 2 +- + src/quicktemplates2/qquicktextarea.cpp | 2 +- + src/quicktemplates2/qquicktextfield.cpp | 2 +- + 7 files changed, 23 insertions(+), 5 deletions(-) + +diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp +index a719efd34..768691dac 100644 +--- a/src/quicktemplates2/qquickcontrol.cpp ++++ b/src/quicktemplates2/qquickcontrol.cpp +@@ -2334,12 +2334,13 @@ QAccessible::Role QQuickControl::accessibleRole() const + + void QQuickControl::accessibilityActiveChanged(bool active) + { ++ Q_D(QQuickControl); + if (!active) + return; + + QQuickAccessibleAttached *accessibleAttached = qobject_cast(qmlAttachedPropertiesObject(this, true)); + Q_ASSERT(accessibleAttached); +- accessibleAttached->setRole(accessibleRole()); ++ accessibleAttached->setRole(d->effectiveAccessibleRole()); + } + #endif + +diff --git a/src/quicktemplates2/qquicklabel.cpp b/src/quicktemplates2/qquicklabel.cpp +index 71b60a2bc..2bc621674 100644 +--- a/src/quicktemplates2/qquicklabel.cpp ++++ b/src/quicktemplates2/qquicklabel.cpp +@@ -263,7 +263,7 @@ void QQuickLabelPrivate::accessibilityActiveChanged(bool active) + Q_Q(QQuickLabel); + QQuickAccessibleAttached *accessibleAttached = qobject_cast(qmlAttachedPropertiesObject(q, true)); + Q_ASSERT(accessibleAttached); +- accessibleAttached->setRole(accessibleRole()); ++ accessibleAttached->setRole(effectiveAccessibleRole()); + maybeSetAccessibleName(text); + } + +diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp +index 7df80a047..bfaa84e30 100644 +--- a/src/quicktemplates2/qquickpopup.cpp ++++ b/src/quicktemplates2/qquickpopup.cpp +@@ -46,6 +46,7 @@ + + #include + #include ++#include + #include + #include + +@@ -2720,6 +2721,19 @@ QPalette QQuickPopup::defaultPalette() const + } + + #if QT_CONFIG(accessibility) ++QAccessible::Role QQuickPopup::effectiveAccessibleRole() const ++{ ++ auto *attached = qmlAttachedPropertiesObject(this, false); ++ ++ auto role = QAccessible::NoRole; ++ if (auto *accessibleAttached = qobject_cast(attached)) ++ role = accessibleAttached->role(); ++ if (role == QAccessible::NoRole) ++ role = accessibleRole(); ++ ++ return role; ++} ++ + QAccessible::Role QQuickPopup::accessibleRole() const + { + return QAccessible::Dialog; +diff --git a/src/quicktemplates2/qquickpopup_p.h b/src/quicktemplates2/qquickpopup_p.h +index dc3ebf6f8..a3773be3e 100644 +--- a/src/quicktemplates2/qquickpopup_p.h ++++ b/src/quicktemplates2/qquickpopup_p.h +@@ -454,7 +454,10 @@ protected: + virtual QPalette defaultPalette() const; + + #if QT_CONFIG(accessibility) ++ QAccessible::Role effectiveAccessibleRole() const; ++private: + virtual QAccessible::Role accessibleRole() const; ++protected: + virtual void accessibilityActiveChanged(bool active); + #endif + +diff --git a/src/quicktemplates2/qquickpopupitem.cpp b/src/quicktemplates2/qquickpopupitem.cpp +index 0069b9fc1..143c37fc3 100644 +--- a/src/quicktemplates2/qquickpopupitem.cpp ++++ b/src/quicktemplates2/qquickpopupitem.cpp +@@ -404,7 +404,7 @@ QPalette QQuickPopupItem::defaultPalette() const + QAccessible::Role QQuickPopupItem::accessibleRole() const + { + Q_D(const QQuickPopupItem); +- return d->popup->accessibleRole(); ++ return d->popup->effectiveAccessibleRole(); + } + + void QQuickPopupItem::accessibilityActiveChanged(bool active) +diff --git a/src/quicktemplates2/qquicktextarea.cpp b/src/quicktemplates2/qquicktextarea.cpp +index 64fc631dd..fba3f6b70 100644 +--- a/src/quicktemplates2/qquicktextarea.cpp ++++ b/src/quicktemplates2/qquicktextarea.cpp +@@ -512,7 +512,7 @@ void QQuickTextAreaPrivate::accessibilityActiveChanged(bool active) + Q_Q(QQuickTextArea); + QQuickAccessibleAttached *accessibleAttached = qobject_cast(qmlAttachedPropertiesObject(q, true)); + Q_ASSERT(accessibleAttached); +- accessibleAttached->setRole(accessibleRole()); ++ accessibleAttached->setRole(effectiveAccessibleRole()); + accessibleAttached->set_readOnly(q->isReadOnly()); + accessibleAttached->setDescription(placeholder); + } +diff --git a/src/quicktemplates2/qquicktextfield.cpp b/src/quicktemplates2/qquicktextfield.cpp +index 8fa04bd3a..e83346cbd 100644 +--- a/src/quicktemplates2/qquicktextfield.cpp ++++ b/src/quicktemplates2/qquicktextfield.cpp +@@ -359,7 +359,7 @@ void QQuickTextFieldPrivate::accessibilityActiveChanged(bool active) + Q_Q(QQuickTextField); + QQuickAccessibleAttached *accessibleAttached = qobject_cast(qmlAttachedPropertiesObject(q, true)); + Q_ASSERT(accessibleAttached); +- accessibleAttached->setRole(accessibleRole()); ++ accessibleAttached->setRole(effectiveAccessibleRole()); + accessibleAttached->set_readOnly(m_readOnly); + accessibleAttached->set_passwordEdit((m_echoMode == QQuickTextField::Password || m_echoMode == QQuickTextField::PasswordEchoOnEdit) ? true : false); + accessibleAttached->setDescription(placeholder); +-- +2.41.0 + diff --git a/qt5-qtquickcontrols2.spec b/qt5-qtquickcontrols2.spec index 0b258aaf006e8b1723846b6b9fa50f14c9a981e3..f3a7d05f7fbaab19a291abcd4121f5599d01d052 100644 --- a/qt5-qtquickcontrols2.spec +++ b/qt5-qtquickcontrols2.spec @@ -4,7 +4,7 @@ Summary: Qt5 - module with set of QtQuick controls for embedded Name: qt5-%{qt_module} -Version: 5.15.10 +Version: 5.15.11 Release: 1%{?dist} License: GPLv2+ or LGPLv3 and GFDL Url: http://www.qt.io @@ -12,9 +12,9 @@ Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submod Patch3001: 0001-Unset-mouseGrabberPopup-if-it-s-removed-from-childre.patch Patch3002: 0002-Ensure-we-don-t-crash-when-changing-sizes-after-clea.patch -Patch3003: 0003-Fix-scroll-bars-not-showing-up-when-binding-to-stand.patch -Patch3004: 0004-implement-a11y-pressing-of-qquickabstractbutton.patch -Patch3005: 0005-Fix-the-popup-position-of-a-Menu.patch +Patch3003: 0003-implement-a11y-pressing-of-qquickabstractbutton.patch +Patch3004: 0004-Fix-the-popup-position-of-a-Menu.patch +Patch3005: 0005-Accessibility-respect-value-in-attached-Accessible-i.patch BuildRequires: make BuildRequires: qt5-qtbase-devel >= %{version} @@ -82,6 +82,9 @@ rm -f %{buildroot}%{_qt5_libdir}/libQt5*.la %{_qt5_examplesdir}/quickcontrols2/ %changelog +* Thu Jan 11 2024 edwardewang - 5.15.11-1 +- Upgrade to 5.15.11 + * Thu Sep 21 2023 kianli - 5.15.10-1 - Upgrade to 5.15.10 diff --git a/sources b/sources index 2af4a30782be74e3939cebad98be46f2dcd28eb4..aaa56a0b8db37fead336f2a54a04c3d0708ab20e 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ -SHA512 (qtquickcontrols2-everywhere-opensource-src-5.15.10.tar.xz) = 87e1590223c36b1191f4d976cab946c7d688228032a4a32e699a87ee844d64ed60f93c3c0c148374f4ac6ca619bbf583492cb9b57823b15dd0b9811ca270f390 +SHA512 (qtquickcontrols2-everywhere-opensource-src-5.15.11.tar.xz) = 2621ae1d0c8ebb38ec2c9a0ff28b9bdb3a7aebfd2b6477d145a9772002abdae832aa7daeb8843a8372b32ebe476262650ba23cc977257fd5932499cde796eb32 +