Journald: Do not try to read journal entries for remote applications

Task-number: QTCREATORBUG-20995
Change-Id: I27911183084f8423ab7638b9443949a84c47b953
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Tobias Hunger
2018-08-27 14:09:31 +02:00
parent 2f41886c4b
commit 944aa963a8

View File

@@ -952,7 +952,9 @@ RunControl::RunControl(RunConfiguration *runConfiguration, Core::Id mode) :
d(std::make_unique<RunControlPrivate>(this, runConfiguration, mode))
{
#ifdef WITH_JOURNALD
if (!device().isNull() && device()->type() == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE) {
JournaldWatcher::instance()->subscribe(this, [this](const JournaldWatcher::LogEntry &entry) {
if (entry.value("_MACHINE_ID") != JournaldWatcher::instance()->machineId())
return;
@@ -967,6 +969,7 @@ RunControl::RunControl(RunConfiguration *runConfiguration, Core::Id mode) :
const QString message = QString::fromUtf8(entry.value("MESSAGE")) + "\n";
appendMessageRequested(this, message, Utils::OutputFormat::LogMessageFormat);
});
}
#endif
}