forked from qt-creator/qt-creator
ProjectExplorer: Fix switching build console to Utf8 for MSVC
Wrap make command into the script to switch console code page to Utf8 before make (when the Kit check is on). Task-number: QTCREATORBUG-20327 Change-Id: Ie3e372e52a09b93a41c5ac7ad63b7b14384655fb Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -25,6 +25,7 @@
|
||||
|
||||
#include "abstractprocessstep.h"
|
||||
#include "ansifilterparser.h"
|
||||
#include "buildconfiguration.h"
|
||||
#include "buildstep.h"
|
||||
#include "project.h"
|
||||
#include "task.h"
|
||||
@@ -305,8 +306,11 @@ void AbstractProcessStep::processReadyReadStdOutput()
|
||||
if (!m_process)
|
||||
return;
|
||||
m_process->setReadChannel(QProcess::StandardOutput);
|
||||
const bool utf8Output = buildConfiguration()->environment().hasKey("VSLANG");
|
||||
|
||||
while (m_process->canReadLine()) {
|
||||
QString line = QString::fromLocal8Bit(m_process->readLine());
|
||||
QString line = utf8Output ? QString::fromUtf8(m_process->readLine())
|
||||
: QString::fromLocal8Bit(m_process->readLine());
|
||||
stdOutput(line);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user