From 75c6927883342ec533aea4663b7b5dfcf8d699a6 Mon Sep 17 00:00:00 2001 From: Alexander Lohnau 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 #include -#include #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()); } });