Thanks for pointing relevant place in source code.
It seems the way applications are started by desktop environment is pretty important thing which many users would be interested to know about more. Putting aside source code is the way KDE starts applications documented somewhere?
Would you mind taking a look at my other question How to limit memory size used by specific application in KDE? where I’m asking how to use systemd directives to control specific application?