summaryrefslogtreecommitdiffstats
path: root/desktop-plasma/patches
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-plasma/patches')
-rw-r--r--desktop-plasma/patches/kde-frameworks/kio/0001-Pass-arguments-to-weltschmerz-correctly.patch55
1 files changed, 55 insertions, 0 deletions
diff --git a/desktop-plasma/patches/kde-frameworks/kio/0001-Pass-arguments-to-weltschmerz-correctly.patch b/desktop-plasma/patches/kde-frameworks/kio/0001-Pass-arguments-to-weltschmerz-correctly.patch
new file mode 100644
index 0000000..b7e19fb
--- /dev/null
+++ b/desktop-plasma/patches/kde-frameworks/kio/0001-Pass-arguments-to-weltschmerz-correctly.patch
@@ -0,0 +1,55 @@
+From 532a7c03a4c5cc26a1f06ce4882b1d2010b6c44d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Wolfgang=20M=C3=BCller?= <wolf@oriole.systems>
+Date: Tue, 10 Sep 2024 23:11:02 +0200
+Subject: [PATCH] Pass arguments to weltschmerz correctly
+
+Since weltschmerz does not support the -e flag, we have to drop it for
+both desktop file handling and KTerminalLauncherJob.
+---
+ src/core/desktopexecparser.cpp | 5 ++++-
+ src/gui/kterminallauncherjob.cpp | 6 +++++-
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/src/core/desktopexecparser.cpp b/src/core/desktopexecparser.cpp
+index 63c924737..b2851077e 100644
+--- a/src/core/desktopexecparser.cpp
++++ b/src/core/desktopexecparser.cpp
+@@ -493,6 +493,7 @@ QStringList KIO::DesktopExecParser::resultingArguments() const
+ QString terminal = cg.readPathEntry("TerminalApplication", QStringLiteral("konsole"));
+
+ const bool isKonsole = (terminal == QLatin1String("konsole"));
++ const bool isWeltschmerz = (terminal == QLatin1String("weltschmerz"));
+ QStringList terminalParts = KShell::splitArgs(terminal);
+ QString terminalPath;
+ if (!terminalParts.isEmpty()) {
+@@ -523,7 +524,9 @@ QStringList KIO::DesktopExecParser::resultingArguments() const
+ }
+ mx2.expandMacrosShellQuote(terminal);
+ result = KShell::splitArgs(terminal); // assuming that the term spec never needs a shell!
+- result << QStringLiteral("-e");
++ if (!isWeltschmerz) {
++ result << QStringLiteral("-e");
++ }
+ }
+
+ KShell::Errors err;
+diff --git a/src/gui/kterminallauncherjob.cpp b/src/gui/kterminallauncherjob.cpp
+index edd99327b..beb80b090 100644
+--- a/src/gui/kterminallauncherjob.cpp
++++ b/src/gui/kterminallauncherjob.cpp
+@@ -136,7 +136,11 @@ void KTerminalLauncherJob::determineFullCommand(bool fallbackToKonsoleService /*
+ exec += QLatin1String(" --workdir %1").arg(KShell::quoteArg(workingDir));
+ }
+ if (!d->m_command.isEmpty()) {
+- exec += QLatin1String(" -e ") + d->m_command;
++ if (exec == QLatin1String("weltschmerz")) {
++ exec += d->m_command;
++ } else {
++ exec += QLatin1String(" -e ") + d->m_command;
++ }
+ }
+ #else
+ const QString windowsTerminal = QStringLiteral("wt.exe");
+--
+2.46.0
+