Commit b525767c authored by Fabian Vogt's avatar Fabian Vogt
Browse files

startkde: Forward stdout/stderr of started processes

QProcess::start defaults to capturing all output, but that got lost as it is
never read. Set QProcess::ForwardedChannels explicitly where it was missing,
so that output ends up in the correct place again.

(cherry picked from commit d1155030)
parent 9b307559
Pipeline #141725 passed with stage
in 8 minutes and 38 seconds
......@@ -246,6 +246,7 @@ bool Startup::startDetached(const QString &program, const QStringList &args)
bool Startup::startDetached(QProcess *process)
{
process->setProcessChannelMode(QProcess::ForwardedChannels);
process->start();
const bool ret = process->waitForStarted();
if (ret) {
......@@ -428,6 +429,7 @@ StartProcessJob::StartProcessJob(const QString &process, const QStringList &args
{
m_process->setProgram(process);
m_process->setArguments(args);
m_process->setProcessChannelMode(QProcess::ForwardedChannels);
auto env = QProcessEnvironment::systemEnvironment();
env.insert(additionalEnv);
m_process->setProcessEnvironment(env);
......
......@@ -500,6 +500,7 @@ QProcess *setupKSplash()
KConfigGroup ksplashCfg = cfg.group("KSplash");
if (ksplashCfg.readEntry("Engine", QStringLiteral("KSplashQML")) == QLatin1String("KSplashQML")) {
p = new QProcess;
p->setProcessChannelMode(QProcess::ForwardedChannels);
p->start(QStringLiteral("ksplashqml"), {ksplashCfg.readEntry("Theme", QStringLiteral("Breeze"))});
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment