Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Plasma Workspace
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Service Desk
Milestones
Merge Requests
64
Merge Requests
64
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Plasma
Plasma Workspace
Commits
0cc0c32c
Commit
0cc0c32c
authored
Dec 01, 2017
by
Aleix Pol Gonzalez
🐧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Readability
No need to instantiate a process Properly warn when something didn't work
parent
e3b3e039
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
ksmserver/startup.cpp
ksmserver/startup.cpp
+4
-9
No files found.
ksmserver/startup.cpp
View file @
0cc0c32c
...
...
@@ -677,20 +677,15 @@ void KSMServer::slotAutoStart()
return
;
}
KService
service
(
serviceName
);
qCInfo
(
KSMSERVER
)
<<
"Starting autostart service "
<<
serviceName
;
auto
p
=
new
KProcess
(
this
);
auto
arguments
=
KIO
::
DesktopExecParser
(
service
,
QList
<
QUrl
>
()).
resultingArguments
();
if
(
arguments
.
isEmpty
())
{
qC
Info
(
KSMSERVER
)
<<
"failed to parse"
<<
serviceName
<<
"for autostart"
;
qC
Warning
(
KSMSERVER
)
<<
"failed to parse"
<<
serviceName
<<
"for autostart"
;
continue
;
}
qCInfo
(
KSMSERVER
)
<<
"Starting autostart service "
<<
serviceName
<<
arguments
;
auto
program
=
arguments
.
takeFirst
();
p
->
setProgram
(
program
,
arguments
);
p
->
start
();
connect
(
p
,
static_cast
<
void
(
QProcess
::*
)(
int
)
>
(
&
QProcess
::
finished
),
[
p
](
int
exitCode
)
{
qCInfo
(
KSMSERVER
)
<<
"autostart service"
<<
p
->
program
()
<<
"finished with exit code "
<<
exitCode
;
p
->
deleteLater
();
});
if
(
!
QProcess
::
startDetached
(
program
,
arguments
))
qCWarning
(
KSMSERVER
)
<<
"could not start"
<<
serviceName
<<
":"
<<
program
<<
arguments
;
}
while
(
true
);
// Loop till we find a service that we can start.
}
...
...
Write
Preview
Markdown
is supported
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