Skip to content

fix KTerminalLauncherJob working with exec

Harald Sitter requested to merge work/emitresult-terminaljob into master

in start we've incorrectly passed along the result signal from the subjob but that left the KTerminalLauncherJob itself unfinished (as in: the internal private state of the KJob was not finished). this then also had the side effect that the eventloop that potentially gets spun up when KJob::exec is used wouldn't get terminated and the exec() would run forever.

instead replicate the logic from KCompositeJob so now error details from the subjob are forwarded and we emit the result through emitResult() which internally switches the job state to finished and quits the eventloop etc.

for kf6 we probably should revisit the public inheritance here and derive from KCompositeJob to make use of its subjob handling code instead of replicating it

Merge request reports