From 2ad0fa6e873685690b762c947f72b8e2befc24c1 Mon Sep 17 00:00:00 2001 From: Felix Ernst Date: Wed, 15 Nov 2023 11:48:31 +0100 Subject: [PATCH] Fix accessibility ancestor tree for folders panel This is a followup to 549fad2daeeccac53b88b4777dcc9effbc2110e5. That previous commit made sure that the accessibility tree for Dolphin's main view was complete even though the view had no parent by explicitly setting an accessible parent. The folders panel also has a view though and that previous commit did not contain an explicit call to also set an accessible parent for it. This commit rectifies that. Fixes a sanity check & crash in the debug build. Belongs to Dolphin issue #47. --- src/panels/folders/folderspanel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp index af2b1357bb..19b5730804 100644 --- a/src/panels/folders/folderspanel.cpp +++ b/src/panels/folders/folderspanel.cpp @@ -161,6 +161,9 @@ void FoldersPanel::showEvent(QShowEvent *event) connect(m_controller, &KItemListController::itemDropEvent, this, &FoldersPanel::slotItemDropEvent); KItemListContainer *container = new KItemListContainer(m_controller, this); +#ifndef QT_NO_ACCESSIBILITY + view->setAccessibleParentsObject(container); +#endif container->setEnabledFrame(false); QVBoxLayout *layout = new QVBoxLayout(this);