From 7d4f123842ea937de4390b2ba783c7c13f9ea55a Mon Sep 17 00:00:00 2001 From: David Schulz Date: Mon, 23 Jan 2023 13:43:58 +0100 Subject: Python: add create venv action The action can be triggered from the interpreter chooser of the editor toolbar. Change-Id: Ie23b68a3790525ea02883ef359b357a0d317b2f5 Reviewed-by: Christian Stenger Reviewed-by: --- src/plugins/python/pythonsettings.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/plugins/python/pythonsettings.h') diff --git a/src/plugins/python/pythonsettings.h b/src/plugins/python/pythonsettings.h index 693c732208..2e27e26616 100644 --- a/src/plugins/python/pythonsettings.h +++ b/src/plugins/python/pythonsettings.h @@ -24,12 +24,14 @@ public: static Interpreter interpreter(const QString &interpreterId); static void setInterpreter(const QList &interpreters, const QString &defaultId); static void addInterpreter(const Interpreter &interpreter, bool isDefault = false); + static Interpreter addInterpreter(const Utils::FilePath &interpreterPath, + bool isDefault = false); static void setPyLSConfiguration(const QString &configuration); static bool pylsEnabled(); static void setPylsEnabled(const bool &enabled); static QString pylsConfiguration(); static PythonSettings *instance(); - + static void createVirtualEnvironment(const Utils::FilePath &startDirectory, const Interpreter &defaultInterpreter, const std::function)> &callback); static QList detectPythonVenvs(const Utils::FilePath &path); signals: -- cgit v1.2.1