don't print an empty line if system() produces no stderr

Change-Id: I88d85c70334de2a5f913b6c67d0d253094979fd8
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
This commit is contained in:
Oswald Buddenhagen
2012-08-01 12:11:42 +02:00
parent 76db45fafe
commit 459d6f8e40

View File

@@ -265,9 +265,11 @@ void QMakeEvaluator::runProcess(QProcess *proc, const QString &command,
proc->waitForFinished(-1); proc->waitForFinished(-1);
proc->setReadChannel(chan); proc->setReadChannel(chan);
QByteArray errout = proc->readAll(); QByteArray errout = proc->readAll();
if (errout.endsWith('\n')) if (!errout.isEmpty()) {
errout.chop(1); if (errout.endsWith('\n'))
m_handler->message(QMakeHandler::EvalError, QString::fromLocal8Bit(errout)); errout.chop(1);
m_handler->message(QMakeHandler::EvalError, QString::fromLocal8Bit(errout));
}
} }
#endif #endif