Commit Graph

7 Commits

Author SHA1 Message Date
David Schulz
3df6a29d4f Python: remove reference to out of scope variable
Change-Id: Idd4dbab5ee01fda331452fefd27de71625afa5af
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
2019-11-04 08:03:17 +00:00
Christian Stenger
b2ede6ff51 Python: Check for changes before applying
Storing the python settings seems to be rather costly
and may take some time.
Perform an early return if nothing has changed.

Change-Id: I509e83f503d2af31a7464df893e0e4e69e99a277
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-10-30 13:21:29 +00:00
David Schulz
6664d78ded Python: detect virtual environments for documents and projects
After opening a document or project the directory hierarchy is looked up
for a Scripts/(activate && python.exe) on windows or bin/(activate &&
python) on unix. This is the usual structure of python virtual
environments. If such a folder is found add the python from that folder
to the list of configured interpreters in the settings, set it as the
current interpreter for the project and try to open the corresponding
language server.

Change-Id: I038c309ea2988f9370194330d250d1515beac0a0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-30 08:46:12 +00:00
David Schulz
95bd328c31 Python: export Interpreter generator
Change-Id: I591bd6c14706e1699f028a9a3a6dfd9b89eec66a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-10-25 12:50:46 +00:00
David Schulz
6d5c61b164 Python: Add virtual env name to auto detected interpreters
Change-Id: Ia4d2e5399aa983b6bca510ca8b0e6848da5f769a
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-10-02 10:32:31 +00:00
Christian Stenger
fd4c04407f Python: Fix compile for gcc < 6.0
Change-Id: Ia7ef177677a65aa565755313ee9d023aa8e53ef0
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-07-30 08:42:31 +00:00
David Schulz
a99e5af1da Python: make interpreter configurable
Add settings page to setup python interpreter and use a combo box in the
run configuration to switch between those configured interpreter.

Change-Id: I51014b785ea822ee138d39c788149f1d22901e55
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2019-07-30 07:41:30 +00:00