Commit 4854cd0e authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Fix timer applet commands with arguments

BUG: 424349
parent d33b482b
......@@ -12,6 +12,7 @@ add_library(timerplugin SHARED ${timer_SRCS})
target_link_libraries(timerplugin
Qt5::Core
Qt5::Qml
KF5::CoreAddons
)
install(TARGETS timerplugin DESTINATION ${KDE_INSTALL_QMLDIR}/org/kde/plasma/private/timer)
......
......@@ -19,7 +19,8 @@
#include "timer.h"
#include <QProcess>
#include <KProcess>
#include <KShell>
Timer::Timer(QObject *parent) : QObject(parent)
{
......@@ -28,6 +29,10 @@ Timer::Timer(QObject *parent) : QObject(parent)
void Timer::runCommand(const QString &command)
{
QProcess::startDetached(command, QStringList());
if (!command.isEmpty()) {
QStringList split = KShell::splitArgs(command);
const QString program = split.takeFirst();
QProcess::startDetached(program, split);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment