diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 73f25b2b1bd..f0df6164b20 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -952,21 +952,24 @@ RunControl::RunControl(RunConfiguration *runConfiguration, Core::Id mode) : d(std::make_unique(this, runConfiguration, mode)) { #ifdef WITH_JOURNALD - JournaldWatcher::instance()->subscribe(this, [this](const JournaldWatcher::LogEntry &entry) { - if (entry.value("_MACHINE_ID") != JournaldWatcher::instance()->machineId()) - return; + if (!device().isNull() && device()->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) { + JournaldWatcher::instance()->subscribe(this, [this](const JournaldWatcher::LogEntry &entry) { - const QByteArray pid = entry.value("_PID"); - if (pid.isEmpty()) - return; + if (entry.value("_MACHINE_ID") != JournaldWatcher::instance()->machineId()) + return; - const qint64 pidNum = static_cast(QString::fromLatin1(pid).toInt()); - if (pidNum != d->applicationProcessHandle.pid()) - return; + const QByteArray pid = entry.value("_PID"); + if (pid.isEmpty()) + return; - const QString message = QString::fromUtf8(entry.value("MESSAGE")) + "\n"; - appendMessageRequested(this, message, Utils::OutputFormat::LogMessageFormat); - }); + const qint64 pidNum = static_cast(QString::fromLatin1(pid).toInt()); + if (pidNum != d->applicationProcessHandle.pid()) + return; + + const QString message = QString::fromUtf8(entry.value("MESSAGE")) + "\n"; + appendMessageRequested(this, message, Utils::OutputFormat::LogMessageFormat); + }); + } #endif }