diff options
Diffstat (limited to 'user/qt5-qtquickcontrols2/kde-lts.patch')
-rw-r--r-- | user/qt5-qtquickcontrols2/kde-lts.patch | 277 |
1 files changed, 147 insertions, 130 deletions
diff --git a/user/qt5-qtquickcontrols2/kde-lts.patch b/user/qt5-qtquickcontrols2/kde-lts.patch index e69ee5f60..5f14b2676 100644 --- a/user/qt5-qtquickcontrols2/kde-lts.patch +++ b/user/qt5-qtquickcontrols2/kde-lts.patch @@ -1,7 +1,7 @@ -From 38b25abb3d911b264ff01bfd99c906f74a2fb6c2 Mon Sep 17 00:00:00 2001 +From f6e0992ccd7d15456d528b9ee4e54ac6794e5d63 Mon Sep 17 00:00:00 2001 From: David Redondo <qt@david-redondo.de> Date: Mon, 19 Jul 2021 10:06:17 +0200 -Subject: [PATCH 1/4] Unset mouseGrabberPopup if it's removed from children +Subject: [PATCH 1/5] Unset mouseGrabberPopup if it's removed from children The mouseGrabberPopup is supposed to be unset in handleRelease, however when the exit transition of the mouseGrabberPopup (that closed itself on @@ -30,7 +30,7 @@ Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> create mode 100644 tests/auto/qquickpopup/data/releaseAfterExitTransition.qml diff --git a/src/quicktemplates2/qquickoverlay.cpp b/src/quicktemplates2/qquickoverlay.cpp -index b8d417f29..c8cd142ae 100644 +index 91bd59184..0ce518f84 100644 --- a/src/quicktemplates2/qquickoverlay.cpp +++ b/src/quicktemplates2/qquickoverlay.cpp @@ -399,8 +399,11 @@ void QQuickOverlay::itemChange(ItemChange change, const ItemChangeData &data) @@ -131,10 +131,10 @@ index 000000000..9e4598b9f + } +} diff --git a/tests/auto/qquickpopup/tst_qquickpopup.cpp b/tests/auto/qquickpopup/tst_qquickpopup.cpp -index ede3640c2..f1840946b 100644 +index 54952d128..3d50e2dd4 100644 --- a/tests/auto/qquickpopup/tst_qquickpopup.cpp +++ b/tests/auto/qquickpopup/tst_qquickpopup.cpp -@@ -97,6 +97,7 @@ private slots: +@@ -100,6 +100,7 @@ private slots: void invisibleToolTipOpen(); void centerInOverlayWithinStackViewItem(); void destroyDuringExitTransition(); @@ -142,7 +142,7 @@ index ede3640c2..f1840946b 100644 }; void tst_QQuickPopup::initTestCase() -@@ -1459,6 +1460,34 @@ void tst_QQuickPopup::destroyDuringExitTransition() +@@ -1575,6 +1576,34 @@ void tst_QQuickPopup::destroyDuringExitTransition() QVERIFY(!button->isDown()); } @@ -178,12 +178,12 @@ index ede3640c2..f1840946b 100644 #include "tst_qquickpopup.moc" -- -2.36.0 +2.49.0 -From cb0b21e52d2562e3dc46b1e36f248308de3fb204 Mon Sep 17 00:00:00 2001 +From dec090837242230f6bec4be9a09221ae773f01d8 Mon Sep 17 00:00:00 2001 From: Aleix Pol <aleixpol@kde.org> Date: Tue, 4 Jan 2022 16:34:16 +0100 -Subject: [PATCH 2/4] Ensure we don't crash when changing sizes after cleanup +Subject: [PATCH 2/5] Ensure we don't crash when changing sizes after cleanup This addresses the problems I've seen during destruction. Only encountered it when using complex layouts on a DialogButtonBox. @@ -228,7 +228,7 @@ index f38c2b09c..6eed2a024 100644 contentHeight = implicitContentHeight; diff --git a/src/quicktemplates2/qquickdialogbuttonbox.cpp b/src/quicktemplates2/qquickdialogbuttonbox.cpp -index e6db14eb5..6197d1547 100644 +index e33c5c934..9afabd18a 100644 --- a/src/quicktemplates2/qquickdialogbuttonbox.cpp +++ b/src/quicktemplates2/qquickdialogbuttonbox.cpp @@ -237,7 +237,7 @@ static QRectF alignedRect(Qt::LayoutDirection direction, Qt::Alignment alignment @@ -261,143 +261,160 @@ index e6db14eb5..6197d1547 100644 qreal maxHeight = 0; for (int i = 0; i < count; ++i) { -- -2.36.0 +2.49.0 -From c8fe3805d53a8c24e126bcd20bb0f708bfb10958 Mon Sep 17 00:00:00 2001 -From: Oliver Eftevaag <oliver.eftevaag@qt.io> -Date: Wed, 19 Jan 2022 22:09:56 +0100 -Subject: [PATCH 3/4] QQuickAction: don't grab the same shortcut multiple times +From bc0ca722f27658c6f95b88a92e58fc1139620cb3 Mon Sep 17 00:00:00 2001 +From: Harald Sitter <sitter@kde.org> +Date: Wed, 2 Nov 2022 12:39:11 +0100 +Subject: [PATCH 3/5] implement a11y pressing of qquickabstractbutton +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit -If the entry for the QQuickItem that the QQuickAction is set on has -already grabbed the shortcut, then m_shortcutId is no longer 0 and we -must not overwrite the value. Otherwise, the QQuickItem removing itself -from the action might not remove the correct entry from Qt's shortcut -map, leaving a dangling pointer behind. +this adds a pressAction default implementation that simply calls trigger +(which in turn either triggers the action or emits a click), allowing +accessibility tools to issue a button press via a11y api. -Multiple calls to QQuickActionPrivate::ShortcutEntry::grab are possible, -because we grab the shortcut whenever the shortcut changes, or when an -item representing the action becomes visible. - -The test case added reproduces this scenario by adding the action to a -menu item and then making the menu explicitly visible, resulting in two -calls to grab() which should be idempotent. - -Fixes: QTBUG-96551 -Fixes: QTBUG-96561 -Pick-to: 6.2 -Change-Id: I7d42a4f4c04f7d8759f2d0f24a133720f10e4c47 -Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> -Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi> -Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> - -(cherry picked from commit 45af5ef2f63704adc515e29260ad8c6aaf51f08e in +Change-Id: I75b4fb8680835093b1135fdbf4329aaa85dc3243 +Reviewed-by: Arjen Hiemstra <ahiemstra@heimr.nl> +Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org> +Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> +(cherry picked from commit 705659eaaf47af72eeb5f5c742e18a5c665a76eb in qtdeclarative) --- - src/quicktemplates2/qquickaction.cpp | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) + src/quicktemplates2/qquickabstractbutton.cpp | 6 ++++++ + src/quicktemplates2/qquickabstractbutton_p.h | 1 + + 2 files changed, 7 insertions(+) -diff --git a/src/quicktemplates2/qquickaction.cpp b/src/quicktemplates2/qquickaction.cpp -index 2041e7741..8610cdfae 100644 ---- a/src/quicktemplates2/qquickaction.cpp -+++ b/src/quicktemplates2/qquickaction.cpp -@@ -145,7 +145,7 @@ int QQuickActionPrivate::ShortcutEntry::shortcutId() const +diff --git a/src/quicktemplates2/qquickabstractbutton.cpp b/src/quicktemplates2/qquickabstractbutton.cpp +index 20cf59c1a..43af47a94 100644 +--- a/src/quicktemplates2/qquickabstractbutton.cpp ++++ b/src/quicktemplates2/qquickabstractbutton.cpp +@@ -1201,6 +1201,12 @@ QAccessible::Role QQuickAbstractButton::accessibleRole() const + } + return QAccessible::Button; + } ++ ++void QQuickAbstractButton::accessiblePressAction() ++{ ++ Q_D(QQuickAbstractButton); ++ d->trigger(); ++} + #endif - void QQuickActionPrivate::ShortcutEntry::grab(const QKeySequence &shortcut, bool enabled) - { -- if (shortcut.isEmpty()) -+ if (shortcut.isEmpty() || m_shortcutId) - return; + QT_END_NAMESPACE +diff --git a/src/quicktemplates2/qquickabstractbutton_p.h b/src/quicktemplates2/qquickabstractbutton_p.h +index 0fa48980e..ab66220d0 100644 +--- a/src/quicktemplates2/qquickabstractbutton_p.h ++++ b/src/quicktemplates2/qquickabstractbutton_p.h +@@ -209,6 +209,7 @@ protected: + #if QT_CONFIG(accessibility) + void accessibilityActiveChanged(bool active) override; + QAccessible::Role accessibleRole() const override; ++ Q_INVOKABLE void accessiblePressAction(); + #endif - Qt::ShortcutContext context = Qt::WindowShortcut; // TODO + private: -- -2.36.0 +2.49.0 -From 0d3d39e821ea7634c174a29910c18d7101bce6f7 Mon Sep 17 00:00:00 2001 -From: Ulf Hermann <ulf.hermann@qt.io> -Date: Tue, 11 Jan 2022 12:42:47 +0100 -Subject: [PATCH 4/4] QQuickAbstractButton: fix crash on destruction +From 33c61400f55eadbef023043742c720969f419872 Mon Sep 17 00:00:00 2001 +From: Inho Lee <inho.lee@qt.io> +Date: Mon, 22 Aug 2022 21:05:00 +0800 +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 -If we listen for size changes we also need to remove the object listened -to when it's deleted. +QPA code should operate in native coord. +Treat QWidgetPlatformMenu::showPopup's input as native coord. -Pick-to: 5.15 6.2 6.3 -Fixes: QTBUG-99644 -Change-Id: I613855ebd986b1e67685088020b88d8b070659cf -Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> -(cherry picked from commit 720ffaeb60d43123522066e1de3a69ad551644aa in +Fixes: QTBUG-94619 +Fixes: QTBUG-94783 +Change-Id: Iaa030c96d84e4a588e625fe191e4324f70be961f +Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> +(cherry picked from commit f8cf17166c9af147f0b8fea72f5b4a8a6098a5d7 in qtdeclarative) --- - src/quicktemplates2/qquickabstractbutton.cpp | 11 +++++++++ - .../qquickabstractbutton_p_p.h | 1 + - tests/auto/controls/data/tst_switch.qml | 23 +++++++++++++++++++ - 3 files changed, 35 insertions(+) + src/imports/platform/widgets/qwidgetplatformmenu.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/src/quicktemplates2/qquickabstractbutton.cpp b/src/quicktemplates2/qquickabstractbutton.cpp -index 950e4e099..1df0c706d 100644 ---- a/src/quicktemplates2/qquickabstractbutton.cpp -+++ b/src/quicktemplates2/qquickabstractbutton.cpp -@@ -387,6 +387,17 @@ void QQuickAbstractButtonPrivate::itemImplicitHeightChanged(QQuickItem *item) - emit q->implicitIndicatorHeightChanged(); - } +diff --git a/src/imports/platform/widgets/qwidgetplatformmenu.cpp b/src/imports/platform/widgets/qwidgetplatformmenu.cpp +index e5fe734f7..e36922775 100644 +--- a/src/imports/platform/widgets/qwidgetplatformmenu.cpp ++++ b/src/imports/platform/widgets/qwidgetplatformmenu.cpp +@@ -38,6 +38,7 @@ + #include "qwidgetplatformmenuitem_p.h" -+void QQuickAbstractButtonPrivate::itemDestroyed(QQuickItem *item) -+{ -+ Q_Q(QQuickAbstractButton); -+ QQuickControlPrivate::itemDestroyed(item); -+ if (item == indicator) { -+ indicator = nullptr; -+ emit q->implicitIndicatorWidthChanged(); -+ emit q->implicitIndicatorHeightChanged(); -+ } -+} -+ - QQuickAbstractButton *QQuickAbstractButtonPrivate::findCheckedButton() const - { - Q_Q(const QQuickAbstractButton); -diff --git a/src/quicktemplates2/qquickabstractbutton_p_p.h b/src/quicktemplates2/qquickabstractbutton_p_p.h -index 9291c1a87..b729720f2 100644 ---- a/src/quicktemplates2/qquickabstractbutton_p_p.h -+++ b/src/quicktemplates2/qquickabstractbutton_p_p.h -@@ -109,6 +109,7 @@ public: + #include <QtGui/qwindow.h> ++#include <QtGui/private/qhighdpiscaling_p.h> + #include <QtWidgets/qmenu.h> + #include <QtWidgets/qaction.h> - void itemImplicitWidthChanged(QQuickItem *item) override; - void itemImplicitHeightChanged(QQuickItem *item) override; -+ void itemDestroyed(QQuickItem *item) override; +@@ -145,7 +146,7 @@ void QWidgetPlatformMenu::showPopup(const QWindow *window, const QRect &targetRe - // copied from qabstractbutton.cpp - static const int AUTO_REPEAT_DELAY = 300; -diff --git a/tests/auto/controls/data/tst_switch.qml b/tests/auto/controls/data/tst_switch.qml -index b3fab41ca..10b6baa02 100644 ---- a/tests/auto/controls/data/tst_switch.qml -+++ b/tests/auto/controls/data/tst_switch.qml -@@ -608,4 +608,27 @@ TestCase { - mouseClick(control.indicator) - verify(control.activeFocus) - } -+ -+ Component { -+ id: deletionOrder1 -+ Item { -+ Image { id: innerImage } -+ Switch { indicator: innerImage } -+ } -+ } -+ -+ Component { -+ id: deletionOrder2 -+ Item { -+ Switch { indicator: innerImage } -+ Image { id: innerImage } -+ } -+ } -+ -+ function test_deletionOrder() { -+ var control1 = createTemporaryObject(deletionOrder1, testCase) -+ verify(control1) -+ var control2 = createTemporaryObject(deletionOrder2, testCase) -+ verify(control2) -+ } - } + QPoint targetPos = targetRect.bottomLeft(); + if (window) +- targetPos = window->mapToGlobal(targetPos); ++ targetPos = window->mapToGlobal(QHighDpi::fromNativeLocalPosition(targetPos, window)); + + const QWidgetPlatformMenuItem *widgetItem = qobject_cast<const QWidgetPlatformMenuItem *>(item); + m_menu->popup(targetPos, widgetItem ? widgetItem->action() : nullptr); +-- +2.49.0 + +From 9bdcebd1c093b6f0886e3a739711470cc37b1adb Mon Sep 17 00:00:00 2001 +From: Volker Hilsheimer <volker.hilsheimer@qt.io> +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 <qt_ci_bot@qt-project.org> +Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io> +(cherry picked from commit 3c08d08ae2bbd449cc0579a1b3cb499383c7a60c) +--- + src/quicktemplates2/qquickpopup.cpp | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/quicktemplates2/qquickpopup.cpp b/src/quicktemplates2/qquickpopup.cpp +index 3f8691e2c..6b1ca32b3 100644 +--- a/src/quicktemplates2/qquickpopup.cpp ++++ b/src/quicktemplates2/qquickpopup.cpp +@@ -46,6 +46,7 @@ + + #include <QtQml/qqmlinfo.h> + #include <QtQuick/qquickitem.h> ++#include <QtQuick/private/qquickaccessibleattached_p.h> + #include <QtQuick/private/qquicktransition_p.h> + #include <QtQuick/private/qquickitem_p.h> + #include <QtQuick/private/qquickaccessibleattached_p.h> -- -2.36.0 +2.49.0 |