summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2021-09-02 13:54:51 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2021-09-02 18:49:25 +0200
commita7aa935df69a29543ff2691f0e98b4200cc8a150 (patch)
tree1d0e283e4e316b884853f481a0fcb32839e8338d /kde-apps/dolphin
parentsys-libs/kpmcore: 21.08.1 version bump (diff)
downloadgentoo-a7aa935df69a29543ff2691f0e98b4200cc8a150.tar.gz
gentoo-a7aa935df69a29543ff2691f0e98b4200cc8a150.tar.bz2
gentoo-a7aa935df69a29543ff2691f0e98b4200cc8a150.zip
kde-apps/dolphin: Port to KTerminalLauncherJob
See also: https://mail.kde.org/pipermail/distributions/2021-September/001048.html KDE-bug: https://bugs.kde.org/show_bug.cgi?id=441072 Upstream commit 27bfcde4efaf936243fc41e4a61d0cac32105ef6 Package-Manager: Portage-3.0.22, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'kde-apps/dolphin')
-rw-r--r--kde-apps/dolphin/dolphin-21.08.1.ebuild4
-rw-r--r--kde-apps/dolphin/files/dolphin-21.08.1-port-to-KTerminalLauncherJob.patch110
2 files changed, 114 insertions, 0 deletions
diff --git a/kde-apps/dolphin/dolphin-21.08.1.ebuild b/kde-apps/dolphin/dolphin-21.08.1.ebuild
index c0376cb96e25..5f0b15fd29da 100644
--- a/kde-apps/dolphin/dolphin-21.08.1.ebuild
+++ b/kde-apps/dolphin/dolphin-21.08.1.ebuild
@@ -61,6 +61,10 @@ RDEPEND="${DEPEND}
>=kde-apps/kio-extras-${PVCUT}:5
"
+PATCHES=(
+ "${FILESDIR}/${PN}-21.08.1-port-to-KTerminalLauncherJob.patch" # KDE-bug 441072
+)
+
src_configure() {
local mycmakeargs=(
-DCMAKE_DISABLE_FIND_PACKAGE_PackageKitQt5=ON
diff --git a/kde-apps/dolphin/files/dolphin-21.08.1-port-to-KTerminalLauncherJob.patch b/kde-apps/dolphin/files/dolphin-21.08.1-port-to-KTerminalLauncherJob.patch
new file mode 100644
index 000000000000..2189355de6a5
--- /dev/null
+++ b/kde-apps/dolphin/files/dolphin-21.08.1-port-to-KTerminalLauncherJob.patch
@@ -0,0 +1,110 @@
+From 27bfcde4efaf936243fc41e4a61d0cac32105ef6 Mon Sep 17 00:00:00 2001
+From: Nate Graham <nate@kde.org>
+Date: Tue, 31 Aug 2021 09:09:14 -0600
+Subject: [PATCH] Port to KTerminalLauncherJob
+
+Dolphin still uses KToolInvocation::invokeTerminal() which is
+deprecated and requires KInit. However Dolphin was ported away from
+requiring it in other ways, so it is now possible to have Dolphin
+running but not KInit, which breaks the "Open in Terminal"
+functionality.
+
+Using KTerminalLauncherJob fixes this. It was introduced in Frameworks
+5.83, so the CMake dependency version is accordingly increased.
+
+BUG: 441072
+FIXED-IN: 21.12
+---
+ CMakeLists.txt | 2 +-
+ src/dolphinmainwindow.cpp | 14 ++++++++++----
+ src/dolphinpart.cpp | 6 ++++--
+ 3 files changed, 15 insertions(+), 7 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 7d50205bc..ec87cdecc 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -8,7 +8,7 @@ set (RELEASE_SERVICE_VERSION "${RELEASE_SERVICE_VERSION_MAJOR}.${RELEASE_SERVICE
+ project(Dolphin VERSION ${RELEASE_SERVICE_VERSION})
+
+ set(QT_MIN_VERSION "5.15.0")
+-set(KF5_MIN_VERSION "5.81.0")
++set(KF5_MIN_VERSION "5.83.0")
+
+ set(CMAKE_CXX_STANDARD 17)
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
+diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
+index 62e347032..f3a5e3b4e 100644
+--- a/src/dolphinmainwindow.cpp
++++ b/src/dolphinmainwindow.cpp
+@@ -56,10 +56,10 @@
+ #include <KStandardAction>
+ #include <KStartupInfo>
+ #include <KSycoca>
++#include <KTerminalLauncherJob>
+ #include <KToggleAction>
+ #include <KToolBar>
+ #include <KToolBarPopupAction>
+-#include <KToolInvocation>
+ #include <KUrlComboBox>
+ #include <KUrlNavigator>
+ #include <KWindowSystem>
+@@ -1033,7 +1033,9 @@ void DolphinMainWindow::openTerminal()
+ const QUrl url = m_activeViewContainer->url();
+
+ if (url.isLocalFile()) {
+- KToolInvocation::invokeTerminal(QString(), {}, url.toLocalFile());
++ auto job = new KTerminalLauncherJob(QString());
++ job->setWorkingDirectory(url.toLocalFile());
++ job->start();
+ return;
+ }
+
+@@ -1047,14 +1049,18 @@ void DolphinMainWindow::openTerminal()
+ statUrl = job->mostLocalUrl();
+ }
+
+- KToolInvocation::invokeTerminal(QString(), {}, statUrl.isLocalFile() ? statUrl.toLocalFile() : QDir::homePath());
++ auto job = new KTerminalLauncherJob(QString());
++ job->setWorkingDirectory(statUrl.isLocalFile() ? statUrl.toLocalFile() : QDir::homePath());
++ job->start();
+ });
+
+ return;
+ }
+
+ // Nothing worked, just use $HOME
+- KToolInvocation::invokeTerminal(QString(), {}, QDir::homePath());
++ auto job = new KTerminalLauncherJob(QString());
++ job->setWorkingDirectory(QDir::homePath());
++ job->start();
+ }
+
+ void DolphinMainWindow::editSettings()
+diff --git a/src/dolphinpart.cpp b/src/dolphinpart.cpp
+index 9c551d67a..8d528f418 100644
+--- a/src/dolphinpart.cpp
++++ b/src/dolphinpart.cpp
+@@ -32,7 +32,7 @@
+ #include <KPluginFactory>
+ #include <KIO/CommandLauncherJob>
+ #include <KSharedConfig>
+-#include <KToolInvocation>
++#include <KTerminalLauncherJob>
+
+ #include <QActionGroup>
+ #include <QApplication>
+@@ -567,7 +567,9 @@ QString DolphinPart::localFilePathOrHome() const
+
+ void DolphinPart::slotOpenTerminal()
+ {
+- KToolInvocation::invokeTerminal(QString(), {}, localFilePathOrHome());
++ auto job = new KTerminalLauncherJob(QString());
++ job->setWorkingDirectory(localFilePathOrHome());
++ job->start();
+ }
+
+ void DolphinPart::slotFindFile()
+--
+GitLab
+