Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Add-ons
Commits
4854cd0e
Commit
4854cd0e
authored
Jul 21, 2020
by
Alexander Lohnau
💬
Browse files
Fix timer applet commands with arguments
BUG: 424349
parent
d33b482b
Changes
2
Hide whitespace changes
Inline
Side-by-side
applets/timer/CMakeLists.txt
View file @
4854cd0e
...
...
@@ -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
)
...
...
applets/timer/plugin/timer.cpp
View file @
4854cd0e
...
...
@@ -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
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment