From e28d2a88b257b216a2431e50fec39176a102ece3 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 24 Jan 2022 12:20:37 +0100 Subject: PythonUtils: Use QtcProcess in terminal mode instead of ConsoleProcess Change-Id: Icd8a481a03a2a13f5556327ce5caf661a5d19321 Reviewed-by: hjk Reviewed-by: Qt CI Bot --- src/plugins/python/pythonutils.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/plugins/python/pythonutils.cpp') diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index 89e897b350..8902ec48ed 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -36,8 +36,8 @@ #include #include -#include #include +#include using namespace Utils; @@ -107,13 +107,13 @@ void openPythonRepl(QObject *parent, const FilePath &file, ReplType type) }; const auto args = QStringList{"-i"} + replImportArgs(file, type); - auto process = new ConsoleProcess(parent); + auto process = new QtcProcess(QtcProcess::TerminalOn, parent); const FilePath pythonCommand = detectPython(file); process->setCommand({pythonCommand, args}); process->setWorkingDirectory(workingDir(file)); const QString commandLine = process->commandLine().toUserOutput(); QObject::connect(process, - &ConsoleProcess::errorOccurred, + &QtcProcess::errorOccurred, process, [process, commandLine] { Core::MessageManager::writeDisrupting( @@ -122,7 +122,7 @@ void openPythonRepl(QObject *parent, const FilePath &file, ReplType type) .arg(commandLine, process->errorString())); process->deleteLater(); }); - QObject::connect(process, &ConsoleProcess::finished, process, &QObject::deleteLater); + QObject::connect(process, &QtcProcess::finished, process, &QObject::deleteLater); process->start(); } -- cgit v1.2.1