forked from qt-creator/qt-creator
ProjectExplorer: Remove some explicit QTextCodec use
Default in Utils::Process implementation is now good enough. Change-Id: I3840c60b019f10949f0ba625a197cae41e103b8e Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -42,7 +42,6 @@
|
|||||||
|
|
||||||
#include <QLoggingCategory>
|
#include <QLoggingCategory>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QTextCodec>
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
#if defined (WITH_JOURNALD)
|
#if defined (WITH_JOURNALD)
|
||||||
@@ -1522,15 +1521,14 @@ void SimpleTargetRunnerPrivate::handleStandardError()
|
|||||||
|
|
||||||
void SimpleTargetRunnerPrivate::start()
|
void SimpleTargetRunnerPrivate::start()
|
||||||
{
|
{
|
||||||
const bool isLocal = !m_command.executable().needsDevice();
|
|
||||||
|
|
||||||
CommandLine cmdLine = m_command;
|
CommandLine cmdLine = m_command;
|
||||||
Environment env = m_environment;
|
Environment env = m_environment;
|
||||||
|
|
||||||
m_resultData = {};
|
m_resultData = {};
|
||||||
QTC_ASSERT(m_state == Inactive, return);
|
QTC_ASSERT(m_state == Inactive, return);
|
||||||
|
|
||||||
if (isLocal) {
|
if (!m_command.executable().needsDevice()) {
|
||||||
|
// Running locally.
|
||||||
if (m_runAsRoot)
|
if (m_runAsRoot)
|
||||||
RunControl::provideAskPassEntry(env);
|
RunControl::provideAskPassEntry(env);
|
||||||
|
|
||||||
@@ -1565,7 +1563,6 @@ void SimpleTargetRunnerPrivate::start()
|
|||||||
|
|
||||||
m_state = Run;
|
m_state = Run;
|
||||||
m_process.setWorkingDirectory(m_workingDirectory);
|
m_process.setWorkingDirectory(m_workingDirectory);
|
||||||
m_process.setCodec(isLocal ? QTextCodec::codecForLocale() : QTextCodec::codecForName("utf8"));
|
|
||||||
m_process.setForceDefaultErrorModeOnWindows(true);
|
m_process.setForceDefaultErrorModeOnWindows(true);
|
||||||
m_process.start();
|
m_process.start();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user