forked from qt-creator/qt-creator
Use QtcProcess for console process
Change-Id: I1510c576992ce5a28f42cf3c7e1a7333ae7981ac Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -99,7 +99,7 @@ public:
|
|||||||
QSettings *m_settings = nullptr;
|
QSettings *m_settings = nullptr;
|
||||||
|
|
||||||
// Used on Unix only
|
// Used on Unix only
|
||||||
QProcess m_process;
|
QtcProcess m_process;
|
||||||
bool m_stubConnected = false;
|
bool m_stubConnected = false;
|
||||||
QTimer *m_stubConnectTimer = nullptr;
|
QTimer *m_stubConnectTimer = nullptr;
|
||||||
QByteArray m_stubServerDir;
|
QByteArray m_stubServerDir;
|
||||||
@@ -590,8 +590,9 @@ bool ConsoleProcess::start()
|
|||||||
if (terminal.needsQuotes)
|
if (terminal.needsQuotes)
|
||||||
allArgs = QStringList { ProcessArgs::joinArgs(allArgs) };
|
allArgs = QStringList { ProcessArgs::joinArgs(allArgs) };
|
||||||
|
|
||||||
d->m_process.setEnvironment(env);
|
d->m_process.setEnvironment(d->m_environment);
|
||||||
d->m_process.start(terminal.command, allArgs);
|
d->m_process.setCommand({FilePath::fromString(terminal.command), allArgs});
|
||||||
|
d->m_process.start();
|
||||||
if (!d->m_process.waitForStarted()) {
|
if (!d->m_process.waitForStarted()) {
|
||||||
stubServerShutdown();
|
stubServerShutdown();
|
||||||
emitError(QProcess::UnknownError, tr("Cannot start the terminal emulator \"%1\", change the setting in the "
|
emitError(QProcess::UnknownError, tr("Cannot start the terminal emulator \"%1\", change the setting in the "
|
||||||
|
Reference in New Issue
Block a user