From 319126ec7432f29a0b935c5afdc34de5a54b1449 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Fri, 30 Aug 2024 14:49:22 +0200 Subject: [PATCH] Ensure that the Spaces list has focus in the Add Space wizard And that the list is also tab-focusable. --- src/gui/folderwizard/spacespage.ui | 3 +++ src/gui/spaces/spacesbrowser.cpp | 6 +++--- src/gui/spaces/spacesbrowser.ui | 6 +++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui/folderwizard/spacespage.ui b/src/gui/folderwizard/spacespage.ui index fd147312516..624ddb08c82 100644 --- a/src/gui/folderwizard/spacespage.ui +++ b/src/gui/folderwizard/spacespage.ui @@ -26,6 +26,9 @@ 0 + + Qt::FocusPolicy::StrongFocus + Spaces list diff --git a/src/gui/spaces/spacesbrowser.cpp b/src/gui/spaces/spacesbrowser.cpp index cefd94246d7..feb397681ae 100644 --- a/src/gui/spaces/spacesbrowser.cpp +++ b/src/gui/spaces/spacesbrowser.cpp @@ -18,7 +18,6 @@ #include "gui/accountmanager.h" #include "gui/spaces/spaceimageprovider.h" -#include "resources/resources.h" #include #include @@ -45,15 +44,16 @@ SpacesBrowser::SpacesBrowser(QWidget *parent) , ui(new Ui::SpacesBrowser) { ui->setupUi(this); - _model = new SpacesModel(this); - + _model = new SpacesModel(this); _sortModel = new SpaceFilter(this); _sortModel->setSourceModel(_model); _sortModel->setSortRole(static_cast(SpacesModel::Roles::Priority)); _sortModel->sort(0, Qt::DescendingOrder); QmlUtils::initQuickWidget(ui->quickWidget, QUrl(QStringLiteral("qrc:/qt/qml/org/ownCloud/gui/spaces/qml/SpacesView.qml")), this); + + setFocusProxy(ui->quickWidget); } SpacesBrowser::~SpacesBrowser() diff --git a/src/gui/spaces/spacesbrowser.ui b/src/gui/spaces/spacesbrowser.ui index 45077b6ca3b..7d0af54b730 100644 --- a/src/gui/spaces/spacesbrowser.ui +++ b/src/gui/spaces/spacesbrowser.ui @@ -27,7 +27,11 @@ 0 - + + + Qt::FocusPolicy::StrongFocus + +