diff options
| author | hjk <hjk@qt.io> | 2025-11-04 11:13:25 +0100 |
|---|---|---|
| committer | hjk <hjk@qt.io> | 2025-11-05 07:55:58 +0000 |
| commit | 98e25f3861098789cbed44f28c524f1af749964c (patch) | |
| tree | 0b23ed33231094d7b6de44d8e7ea655a7c846ea0 /src/plugins/python/pythonutils.cpp | |
| parent | 8210f001ebf0240673f8846b06e9b7f857bf1198 (diff) | |
Python: Remove unused createVenv()
Flagged by Axivion.
Change-Id: I23a69cd805371b76cfb584e37e2b4feb256cd505
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/python/pythonutils.cpp')
| -rw-r--r-- | src/plugins/python/pythonutils.cpp | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/plugins/python/pythonutils.cpp b/src/plugins/python/pythonutils.cpp index 1bc72aed0f4..2936d4f4c5d 100644 --- a/src/plugins/python/pythonutils.cpp +++ b/src/plugins/python/pythonutils.cpp @@ -167,26 +167,6 @@ PythonProject *pythonProjectForFile(const FilePath &file) return nullptr; } -void createVenv(const FilePath &python, - const FilePath &venvPath, - const std::function<void(bool)> &callback) -{ - QTC_ASSERT(python.isExecutableFile(), callback(false); return); - QTC_ASSERT(!venvPath.exists() || venvPath.isDir(), callback(false); return); - - const CommandLine command(python, QStringList{"-m", "venv", venvPath.toUserOutput()}); - - auto process = new Process; - auto progress = new Core::ProcessProgress(process); - progress->setDisplayName(Tr::tr("Create Python venv")); - QObject::connect(process, &Process::done, [process, callback](){ - callback(process->result() == ProcessResult::FinishedWithSuccess); - process->deleteLater(); - }); - process->setCommand(command); - process->start(); -} - bool isVenvPython(const FilePath &python) { return python.parentDir().parentDir().pathAppended("pyvenv.cfg").exists(); |
