forked from qt-creator/qt-creator
Clang: Merge channels from clangbackend on Windows
DebugView app can't view error channel therefore logging output from clangbackend is not visible. Merging both channels solves the issue. Change-Id: Iadfd97e3ec8c48afddd880647d9c3fe1c707e241 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
This commit is contained in:
@@ -36,6 +36,13 @@ namespace ClangBackEnd {
|
|||||||
|
|
||||||
using namespace std::chrono_literals;
|
using namespace std::chrono_literals;
|
||||||
|
|
||||||
|
static QProcess::ProcessChannelMode kProcessChannelMode
|
||||||
|
#ifdef Q_OS_WIN
|
||||||
|
= QProcess::MergedChannels;
|
||||||
|
#else
|
||||||
|
= QProcess::ForwardedChannels;
|
||||||
|
#endif
|
||||||
|
|
||||||
ProcessCreator::ProcessCreator()
|
ProcessCreator::ProcessCreator()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@@ -66,7 +73,7 @@ std::future<QProcessUniquePointer> ProcessCreator::createProcess() const
|
|||||||
return std::async(std::launch::async, [&] {
|
return std::async(std::launch::async, [&] {
|
||||||
checkIfProcessPathExists();
|
checkIfProcessPathExists();
|
||||||
auto process = QProcessUniquePointer(new QProcess);
|
auto process = QProcessUniquePointer(new QProcess);
|
||||||
process->setProcessChannelMode(QProcess::QProcess::ForwardedChannels);
|
process->setProcessChannelMode(kProcessChannelMode);
|
||||||
process->setProcessEnvironment(processEnvironment());
|
process->setProcessEnvironment(processEnvironment());
|
||||||
process->start(m_processPath, m_arguments);
|
process->start(m_processPath, m_arguments);
|
||||||
process->waitForStarted(5000);
|
process->waitForStarted(5000);
|
||||||
|
Reference in New Issue
Block a user