summaryrefslogtreecommitdiffstats
path: root/source/kde/kde/patch/ark/75c6927883342ec533aea4663b7b5dfcf8d699a6.patch
blob: 764708e2bc798793dd6a9a5491b2614adde0a5f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
From 75c6927883342ec533aea4663b7b5dfcf8d699a6 Mon Sep 17 00:00:00 2001
From: Alexander Lohnau <alexander.lohnau@gmx.de>
Date: Sat, 25 Dec 2021 13:00:29 +0100
Subject: [PATCH] Do not highlight file after compression

Dolphin opens a new tab whenever the file is compressed and
is not smart enough to highlight it in the currently open view.
Because people are annoyed by it and the alternatives are complex to implement,
removing it is the best solution.

BUG: 440663


(cherry picked from commit 28f2ef4b22f53200cb8789dbc8fe8ecdba3a377f)
---
 app/compressfileitemaction.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/app/compressfileitemaction.cpp b/app/compressfileitemaction.cpp
index 45e75a6e..692a7195 100644
--- a/app/compressfileitemaction.cpp
+++ b/app/compressfileitemaction.cpp
@@ -16,7 +16,6 @@
 #include <KPluginFactory>
 
 #include <algorithm>
-#include <KIO/OpenFileManagerWindowJob>
 
 #include "pluginmanager.h"
 #include "addtoarchive.h"
@@ -102,10 +101,8 @@ QAction *CompressFileItemAction::createAction(const QIcon& icon, const QString&
             }
         }
         addToArchiveJob->start();
-        connect(addToArchiveJob, &KJob::finished, this, [this, addToArchiveJob](){
-            if (addToArchiveJob->error() == 0) {
-                KIO::highlightInFileManager({QUrl::fromLocalFile(addToArchiveJob->fileName())});
-            } else if (!addToArchiveJob->errorString().isEmpty()) {
+        connect(addToArchiveJob, &KJob::finished, this, [this, addToArchiveJob]() {
+            if (addToArchiveJob->error() != 0) {
                 Q_EMIT error(addToArchiveJob->errorString());
             }
         });