From 98e25f3861098789cbed44f28c524f1af749964c Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 4 Nov 2025 11:13:25 +0100 Subject: Python: Remove unused createVenv() Flagged by Axivion. Change-Id: I23a69cd805371b76cfb584e37e2b4feb256cd505 Reviewed-by: David Schulz --- src/plugins/python/pythonutils.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/plugins/python/pythonutils.cpp') 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 &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(); -- cgit v1.2.3