diff --git a/main_wayland.cpp b/main_wayland.cpp --- a/main_wayland.cpp +++ b/main_wayland.cpp @@ -234,9 +234,8 @@ } ); p->setProcessEnvironment(environment); - p->setProgram(m_inputMethodServerToStart); - p->start(); - p->waitForStarted(); //do we really need to wait? + p->start(m_inputMethodServerToStart); + p->waitForStarted(); } } @@ -259,8 +258,7 @@ QCoreApplication::exit(code); }); - p->setProgram(m_sessionArgument); - p->start(); + p->start(m_sessionArgument); } // start the applications passed to us as command line arguments if (!m_applicationsToStart.isEmpty()) { @@ -270,9 +268,7 @@ QProcess *p = new Process(this); p->setProcessChannelMode(QProcess::ForwardedErrorChannel); p->setProcessEnvironment(processStartupEnvironment()); - p->setProgram(application); - p->startDetached(); - p->deleteLater(); + p->start(application); } } }