From e8a9eb899f9bf919dec6b10f8979b9c23b678c41 Mon Sep 17 00:00:00 2001 From: Christoph Feck Date: Sun, 2 Feb 2020 14:57:53 +0100 Subject: [PATCH 1/6] GIT_SILENT Upgrade KDE Applications version to 19.12.2. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f103107f8..b07964eee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.0) # KDE Application Version, managed by release script set (KDE_APPLICATIONS_VERSION_MAJOR "19") set (KDE_APPLICATIONS_VERSION_MINOR "12") -set (KDE_APPLICATIONS_VERSION_MICRO "1") +set (KDE_APPLICATIONS_VERSION_MICRO "2") set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}") project(Dolphin VERSION ${KDE_APPLICATIONS_VERSION}) From e4c1f4f1fce7cabe7d7a61f3db753698a46f0132 Mon Sep 17 00:00:00 2001 From: Christoph Feck Date: Tue, 4 Feb 2020 00:10:08 +0100 Subject: [PATCH 2/6] GIT_SILENT Update Appstream for new release --- src/org.kde.dolphin.appdata.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org.kde.dolphin.appdata.xml b/src/org.kde.dolphin.appdata.xml index 6884ffb6f..9ee00fc63 100644 --- a/src/org.kde.dolphin.appdata.xml +++ b/src/org.kde.dolphin.appdata.xml @@ -567,6 +567,7 @@ dolphin + From 5f4e7a17ba3079da094399aa410effff406b5040 Mon Sep 17 00:00:00 2001 From: Christoph Feck Date: Sat, 29 Feb 2020 23:22:25 +0100 Subject: [PATCH 3/6] GIT_SILENT Upgrade KDE Applications version to 19.12.3. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b07964eee..da6334935 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.0) # KDE Application Version, managed by release script set (KDE_APPLICATIONS_VERSION_MAJOR "19") set (KDE_APPLICATIONS_VERSION_MINOR "12") -set (KDE_APPLICATIONS_VERSION_MICRO "2") +set (KDE_APPLICATIONS_VERSION_MICRO "3") set (KDE_APPLICATIONS_VERSION "${KDE_APPLICATIONS_VERSION_MAJOR}.${KDE_APPLICATIONS_VERSION_MINOR}.${KDE_APPLICATIONS_VERSION_MICRO}") project(Dolphin VERSION ${KDE_APPLICATIONS_VERSION}) From 270ab975fba5b97f50e8a51c91254159bd549d32 Mon Sep 17 00:00:00 2001 From: Christoph Feck Date: Sun, 1 Mar 2020 10:31:18 +0100 Subject: [PATCH 4/6] GIT_SILENT Update Appstream for new release --- src/org.kde.dolphin.appdata.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org.kde.dolphin.appdata.xml b/src/org.kde.dolphin.appdata.xml index 9ee00fc63..77b1e8ce6 100644 --- a/src/org.kde.dolphin.appdata.xml +++ b/src/org.kde.dolphin.appdata.xml @@ -567,6 +567,7 @@ dolphin + From fef7eebc6e3c27e6653bfd5d8a1abec191dc9835 Mon Sep 17 00:00:00 2001 From: Alexander Saoutkin Date: Sun, 1 Mar 2020 16:31:02 +0000 Subject: [PATCH 5/6] Fix files not being highlighted if directory of file is already open Summary: In DolphinTabWidget::openFiles it assumes openDirectories will open new tabs, so it only marks the URL selection for the newly opened tabs. This assumption is incorrect as Dolphin might reuse tabs when the folder is already open. Even then, markUrlsAsSelected does nothing when the folder is already opened. The selection seems to only be used when the folder finishes loading, calls made after that only change a variable without updating the actual selection. A call to DolphinView::updateViewState() is required to restore the intended behaviour, so long as DolphinView::clearSelection() has been called on the relevant tab, otherwise updateViewState() is a no-op. BUG: 417230 FIXED-IN: 19.12.3 Test Plan: 1. In any application that has an "open containing folder" select that option 2. and then do the same for another file in the same folder Reviewers: broulik Reviewed By: broulik Subscribers: kfm-devel Tags: #dolphin Differential Revision: https://phabricator.kde.org/D27389 --- src/dolphintabwidget.cpp | 10 +++++++++- src/views/dolphinview.h | 12 ++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index 9ecc14427..39a734b17 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -206,6 +206,10 @@ void DolphinTabWidget::openDirectories(const QList& dirs, bool splitView) } else { tabPage->secondaryViewContainer()->setActive(true); } + // BUG: 147230 + // Required for updateViewState() call in openFiles() to work as expected + // If there is a selection, updateViewState() calls are effectively a no-op + tabPage->activeViewContainer()->view()->clearSelection(); continue; } if (splitView && (it != dirs.constEnd())) { @@ -239,10 +243,14 @@ void DolphinTabWidget::openFiles(const QList& files, bool splitView) // Select the files. Although the files can be split between several // tabs, there is no need to split 'files' accordingly, as // the DolphinView will just ignore invalid selections. - for (int i = oldTabCount; i < tabCount; ++i) { + for (int i = 0; i < tabCount; ++i) { DolphinTabPage* tabPage = tabPageAt(i); tabPage->markUrlsAsSelected(files); tabPage->markUrlAsCurrent(files.first()); + if (i < oldTabCount) { + // Force selection of file if directory was already open, BUG: 417230 + tabPage->activeViewContainer()->view()->updateViewState(); + } } } diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h index 538e00e83..60ecb2a95 100644 --- a/src/views/dolphinview.h +++ b/src/views/dolphinview.h @@ -381,6 +381,12 @@ public slots: void stopLoading(); + /** + * Applies the state that has been restored by restoreViewState() + * to the view. + */ + void updateViewState(); + /** Activates the view if the item list container gets focus. */ bool eventFilter(QObject* watched, QEvent* event) override; @@ -702,12 +708,6 @@ private slots: */ void slotDirectoryRedirection(const QUrl& oldUrl, const QUrl& newUrl); - /** - * Applies the state that has been restored by restoreViewState() - * to the view. - */ - void updateViewState(); - /** * Calculates the number of currently shown files into * \a fileCount and the number of folders into \a folderCount. From af45eb0af5219819f76b624162c75da83d763657 Mon Sep 17 00:00:00 2001 From: Alexander Saoutkin Date: Sun, 1 Mar 2020 17:20:54 +0000 Subject: [PATCH 6/6] Fix typo in comment --- src/dolphintabwidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dolphintabwidget.cpp b/src/dolphintabwidget.cpp index 39a734b17..89c54baf5 100644 --- a/src/dolphintabwidget.cpp +++ b/src/dolphintabwidget.cpp @@ -206,7 +206,7 @@ void DolphinTabWidget::openDirectories(const QList& dirs, bool splitView) } else { tabPage->secondaryViewContainer()->setActive(true); } - // BUG: 147230 + // BUG: 417230 // Required for updateViewState() call in openFiles() to work as expected // If there is a selection, updateViewState() calls are effectively a no-op tabPage->activeViewContainer()->view()->clearSelection();