X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/dc149ec5e52f52c514cf362603d05ba8eea506b8..c7d6b98fa2aaecbd7f31b9c5976a753508532742:/src/dolphintabwidget.cpp diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index 32e251f02..5ad2a368c 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -9,6 +9,7 @@ #include "dolphin_generalsettings.h" #include "dolphintabbar.h" #include "dolphinviewcontainer.h" +#include "views/draganddrophelper.h" #include #include @@ -20,12 +21,12 @@ #include #include +#include DolphinTabWidget::DolphinTabWidget(DolphinNavigatorsWidgetAction *navigatorsWidget, QWidget *parent) : QTabWidget(parent) , m_lastViewedTab(nullptr) , m_navigatorsWidget{navigatorsWidget} - , m_dragAndDropHelper{this} { KAcceleratorManager::setNoAccel(this); @@ -43,6 +44,13 @@ DolphinTabWidget::DolphinTabWidget(DolphinNavigatorsWidgetAction *navigatorsWidg setElideMode(Qt::ElideRight); setUsesScrollButtons(true); setTabBarAutoHide(true); + + auto stackWidget{findChild()}; + // i18n: This accessible name will be announced any time the user moves keyboard focus e.g. from the toolbar or the places panel towards the main working + // area of Dolphin. It gives structure. This container does not only contain the main view but also the status bar, the search panel, filter, and selection + // mode bars, so calling it just a "View" is a bit wrong, but hopefully still gets the point across. + stackWidget->setAccessibleName(i18nc("accessible name of Dolphin's view container", "Location View")); // Without this call, the non-descript Qt provided + // "Layered Pane" role is announced. } DolphinTabPage *DolphinTabWidget::currentTabPage() const @@ -162,7 +170,7 @@ void DolphinTabWidget::openNewActivatedTab(const QUrl &primaryUrl, const QUrl &s } } -void DolphinTabWidget::openNewTab(const QUrl &primaryUrl, const QUrl &secondaryUrl, DolphinTabWidget::NewTabPosition position) +DolphinTabPage *DolphinTabWidget::openNewTab(const QUrl &primaryUrl, const QUrl &secondaryUrl, DolphinTabWidget::NewTabPosition position) { QWidget *focusWidget = QApplication::focusWidget(); @@ -194,6 +202,7 @@ void DolphinTabWidget::openNewTab(const QUrl &primaryUrl, const QUrl &secondaryU // in background, assure that the previous focused widget gets the focus back. focusWidget->setFocus(); } + return tabPage; } void DolphinTabWidget::openDirectories(const QList &dirs, bool splitView) @@ -394,7 +403,7 @@ void DolphinTabWidget::tabDragMoveEvent(int index, QDragMoveEvent *event) { if (index >= 0) { DolphinView *view = tabPageAt(index)->activeViewContainer()->view(); - m_dragAndDropHelper.updateDropAction(event, view->url()); + DragAndDropHelper::updateDropAction(event, view->url()); } }