commit:     0207ab30fffe152804e4a288a0f2e01d224ec4da
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 10 12:12:12 2022 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec 10 12:23:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0207ab30

dev-qt/qtdeclarative: a11y: track item enabled state

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...tive-5.15.7-a11y-track-item-enabled-state.patch | 57 ++++++++++++++++++
 .../qtdeclarative/qtdeclarative-5.15.7-r1.ebuild   | 68 ++++++++++++++++++++++
 2 files changed, 125 insertions(+)

diff --git 
a/dev-qt/qtdeclarative/files/qtdeclarative-5.15.7-a11y-track-item-enabled-state.patch
 
b/dev-qt/qtdeclarative/files/qtdeclarative-5.15.7-a11y-track-item-enabled-state.patch
new file mode 100644
index 000000000000..e41838a34e30
--- /dev/null
+++ 
b/dev-qt/qtdeclarative/files/qtdeclarative-5.15.7-a11y-track-item-enabled-state.patch
@@ -0,0 +1,57 @@
+From f697f2e1a4c5f60f3f09ae7d2e3d3dcd20854aef Mon Sep 17 00:00:00 2001
+From: Harald Sitter <sit...@kde.org>
+Date: Mon, 28 Nov 2022 14:59:33 +0100
+Subject: [PATCH 1/2] a11y: track item enabled state
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+disabled items are neither enabled nor focusable
+
+Change-Id: I4f286c7b85605d5ad6fa787d1f5cfcce1297d268
+Reviewed-by: Volker Hilsheimer <volker.hilshei...@qt.io>
+Reviewed-by: Jan Arve Sæther <jan-arve.saet...@qt.io>
+(cherry picked from commit 20fd2902a6d7bdb4a3306005d2718ca5a8fef96d)
+---
+ src/quick/accessible/qaccessiblequickitem.cpp | 4 ++++
+ src/quick/items/qquickitem.cpp                | 9 +++++++++
+ 2 files changed, 13 insertions(+)
+
+diff --git a/src/quick/accessible/qaccessiblequickitem.cpp 
b/src/quick/accessible/qaccessiblequickitem.cpp
+index eb3df4d4cd..78e2ab302c 100644
+--- a/src/quick/accessible/qaccessiblequickitem.cpp
++++ b/src/quick/accessible/qaccessiblequickitem.cpp
+@@ -210,6 +210,10 @@ QAccessible::State QAccessibleQuickItem::state() const
+     if (role() == QAccessible::EditableText)
+         if (auto ti = qobject_cast<QQuickTextInput *>(item()))
+             state.passwordEdit = ti->echoMode() != QQuickTextInput::Normal;
++    if (!item()->isEnabled()) {
++        state.focusable = false;
++        state.disabled = true;
++    }
+     return state;
+ }
+ 
+diff --git a/src/quick/items/qquickitem.cpp b/src/quick/items/qquickitem.cpp
+index 4cf73ff73d..dec0ae19ae 100644
+--- a/src/quick/items/qquickitem.cpp
++++ b/src/quick/items/qquickitem.cpp
+@@ -6174,6 +6174,15 @@ void 
QQuickItemPrivate::setEffectiveEnableRecur(QQuickItem *scope, bool newEffec
+     }
+ 
+     itemChange(QQuickItem::ItemEnabledHasChanged, effectiveEnable);
++#if QT_CONFIG(accessibility)
++    if (isAccessible) {
++        QAccessible::State changedState;
++        changedState.disabled = true;
++        changedState.focusable = true;
++        QAccessibleStateChangeEvent ev(q, changedState);
++        QAccessible::updateAccessibility(&ev);
++    }
++#endif
+     emit q->enabledChanged();
+ }
+ 
+-- 
+2.38.1
+

diff --git a/dev-qt/qtdeclarative/qtdeclarative-5.15.7-r1.ebuild 
b/dev-qt/qtdeclarative/qtdeclarative-5.15.7-r1.ebuild
new file mode 100644
index 000000000000..f92c424c84cb
--- /dev/null
+++ b/dev-qt/qtdeclarative/qtdeclarative-5.15.7-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 2009-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+if [[ ${PV} != *9999* ]]; then
+       QT5_KDEPATCHSET_REV=1
+       KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~loong ~ppc ~ppc64 ~riscv ~sparc 
~x86"
+fi
+
+PYTHON_COMPAT=( python3_{8..11} )
+inherit flag-o-matic python-any-r1 qt5-build
+
+DESCRIPTION="The QML and Quick modules for the Qt5 framework"
+
+IUSE="gles2-only +jit localstorage vulkan +widgets"
+
+# qtgui[gles2-only=] is needed because of bug 504322
+DEPEND="
+       =dev-qt/qtcore-${QT5_PV}*
+       =dev-qt/qtgui-${QT5_PV}*:5=[gles2-only=,vulkan=]
+       =dev-qt/qtnetwork-${QT5_PV}*
+       =dev-qt/qttest-${QT5_PV}*
+       media-libs/libglvnd
+       localstorage? ( =dev-qt/qtsql-${QT5_PV}* )
+       widgets? ( =dev-qt/qtwidgets-${QT5_PV}*[gles2-only=] )
+"
+RDEPEND="${DEPEND}"
+BDEPEND="${PYTHON_DEPS}"
+
+PATCHES=(
+       "${FILESDIR}/${PN}-5.14.2-QQuickItemView-fix-maxXY-extent.patch" # 
QTBUG-83890
+       "${FILESDIR}/${P}-a11y-track-item-enabled-state.patch" # kde/5.15
+)
+
+src_prepare() {
+       qt_use_disable_mod localstorage sql \
+               src/imports/imports.pro
+
+       qt_use_disable_mod widgets widgets \
+               src/src.pro \
+               src/qmltest/qmltest.pro \
+               tests/auto/auto.pro \
+               tools/tools.pro \
+               tools/qmlscene/qmlscene.pro \
+               tools/qml/qml.pro
+
+       qt5-build_src_prepare
+}
+
+src_configure() {
+       replace-flags "-Os" "-O2" # bug 840861
+
+       local myqmakeargs=(
+               --
+               -qml-debug
+               $(qt_use jit feature-qml-jit)
+       )
+       qt5-build_src_configure
+}
+
+src_install() {
+       qt5-build_src_install
+       qt5_symlink_binary_to_path qml 5
+       qt5_symlink_binary_to_path qmleasing 5
+       qt5_symlink_binary_to_path qmlpreview 5
+       qt5_symlink_binary_to_path qmlscene 5
+}

Reply via email to