diff --git a/src/plugins/projectexplorer/applicationlauncher.cpp b/src/plugins/projectexplorer/applicationlauncher.cpp index f0d84760c54..290931cfd5b 100644 --- a/src/plugins/projectexplorer/applicationlauncher.cpp +++ b/src/plugins/projectexplorer/applicationlauncher.cpp @@ -306,7 +306,7 @@ void ApplicationLauncherPrivate::readLocalStandardOutput() QByteArray data = m_guiProcess.readAllStandardOutput(); QString msg = m_outputCodec->toUnicode( data.constData(), data.length(), &m_outputCodecState); - emit q->appendMessage(msg, StdOutFormatSameLine); + emit q->appendMessage(msg, StdOutFormatSameLine, false); } void ApplicationLauncherPrivate::readLocalStandardError() @@ -314,7 +314,7 @@ void ApplicationLauncherPrivate::readLocalStandardError() QByteArray data = m_guiProcess.readAllStandardError(); QString msg = m_outputCodec->toUnicode( data.constData(), data.length(), &m_errorCodecState); - emit q->appendMessage(msg, StdErrFormatSameLine); + emit q->appendMessage(msg, StdErrFormatSameLine, false); } void ApplicationLauncherPrivate::cannotRetrieveLocalDebugOutput() diff --git a/src/plugins/projectexplorer/applicationlauncher.h b/src/plugins/projectexplorer/applicationlauncher.h index 3c6178f815f..a321c2214d1 100644 --- a/src/plugins/projectexplorer/applicationlauncher.h +++ b/src/plugins/projectexplorer/applicationlauncher.h @@ -70,7 +70,7 @@ public: static QString msgWinCannotRetrieveDebuggingOutput(); signals: - void appendMessage(const QString &message, Utils::OutputFormat format); + void appendMessage(const QString &message, Utils::OutputFormat format, bool appendNewLine = true); void processStarted(); void processExited(int exitCode, QProcess::ExitStatus); void error(QProcess::ProcessError error); diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp index 02cdeace6eb..9613768eaaf 100644 --- a/src/plugins/projectexplorer/runconfiguration.cpp +++ b/src/plugins/projectexplorer/runconfiguration.cpp @@ -1810,9 +1810,9 @@ void RunWorker::reportFailure(const QString &msg) * Appends a message in the specified \a format to * the owning RunControl's \uicontrol{Application Output} pane. */ -void RunWorker::appendMessage(const QString &msg, OutputFormat format) +void RunWorker::appendMessage(const QString &msg, OutputFormat format, bool appendNewLine) { - if (msg.endsWith('\n')) + if (!appendNewLine || msg.endsWith('\n')) d->runControl->appendMessage(msg, format); else d->runControl->appendMessage(msg + '\n', format); diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h index 75cdab63f17..0bd1115bf53 100644 --- a/src/plugins/projectexplorer/runconfiguration.h +++ b/src/plugins/projectexplorer/runconfiguration.h @@ -362,7 +362,7 @@ public: QVariant recordedData(const QString &channel) const; // Part of read-only interface of RunControl for convenience. - void appendMessage(const QString &msg, Utils::OutputFormat format); + void appendMessage(const QString &msg, Utils::OutputFormat format, bool appendNewLine = true); IDevice::ConstPtr device() const; const Runnable &runnable() const; Core::Id runMode() const;