diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-01-24 12:20:37 +0100 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2022-01-25 15:07:50 +0000 |
commit | e28d2a88b257b216a2431e50fec39176a102ece3 (patch) | |
tree | f6878b6676a9d3d6e8b9197f4f507c65bd0ef72a /src/plugins/python/pythonutils.cpp | |
parent | a09630d50e17e2b5f916c967515620f1945ea492 (diff) | |
download | qt-creator-e28d2a88b257b216a2431e50fec39176a102ece3.tar.gz |
PythonUtils: Use QtcProcess in terminal mode instead of ConsoleProcess
Change-Id: Icd8a481a03a2a13f5556327ce5caf661a5d19321
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
-rw-r--r-- | src/plugins/python/pythonutils.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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 <projectexplorer/target.h> #include <utils/algorithm.h> -#include <utils/consoleprocess.h> #include <utils/mimetypes/mimedatabase.h> +#include <utils/qtcprocess.h> 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(); } |