summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@theqtcompany.com>2015-09-22 11:56:30 +0200
committerAlexander Görtz <alexander.goertz@tu-dortmund.de>2015-09-22 10:34:28 +0000
commitee42dcb66c508533fbacca1e8f926c73def80ffb (patch)
tree40377e0978ae91f731a90d4fbd9854e4be1bcf4d
parent335f6e4363ba47c15da50baa6ca3982138c2fc9d (diff)
downloadqt-creator-ee42dcb66c508533fbacca1e8f926c73def80ffb.tar.gz
Journald: Do not emit signals for kernel messages
Those have no _PID set, which we treated as 0. This is also the PID we set when an application is finished. This leads to journald messages showing up in the application output *after* the application was finished. Change-Id: I980199740a85c4e68221399eceb543affa12387f Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com> Reviewed-by: Alexander Görtz <alexander.goertz@tu-dortmund.de>
-rw-r--r--src/plugins/projectexplorer/journaldwatcher.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/journaldwatcher.cpp b/src/plugins/projectexplorer/journaldwatcher.cpp
index 1ea4587add..33aef0e19d 100644
--- a/src/plugins/projectexplorer/journaldwatcher.cpp
+++ b/src/plugins/projectexplorer/journaldwatcher.cpp
@@ -227,7 +227,10 @@ void JournaldWatcher::handleEntry()
continue;
const QByteArray pid = logEntry.value(QByteArrayLiteral("_PID"));
- quint64 pidNum = pid.isEmpty() ? 0 : QString::fromLatin1(pid).toInt();
+ if (pid.isEmpty())
+ continue;
+
+ quint64 pidNum = QString::fromLatin1(pid).toInt();
QString message = QString::fromUtf8(logEntry.value(QByteArrayLiteral("MESSAGE")));
message.append(QLatin1Char('\n')); // Add newline.