Commit Graph

38 Commits

Author SHA1 Message Date
David Schulz
f5c41a7f83 Python: Allow installing multiple pip packages in one task
Change-Id: If6cc1373cd38c07b29ac48fa51bf0ed35d6f104b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-06 04:44:55 +00:00
Jarek Kobus
3fae8fdc36 Python: Use QtConcurrent invocation for async run
Change-Id: I26254d5c78c3b6ea06ed9baec8e52b988a6e9608
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-10 07:20:18 +00:00
hjk
3e7d93c788 ProjectExplorer: Move some not-fully-session related bits
... out of SessionManager.

The idea is to later move SessionManager into the Core plugin,
which both is sensible conceptually and also prerequisite to
merge the Bookmark plugin into TextEditor plugin.

Currently, only the interface is split, as the load/save
implemetations are non-mechanical to disentangle.

Change-Id: I31631db3094ea192825a2ccaa6add6188662940b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-01 09:26:50 +00:00
David Schulz
e592e0e83f Python: remove outdated pyls install toolbar earlier
Change-Id: I9ba67bffcff159523eb44b4f486c11fc37085fa8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-01-20 12:51:07 +00:00
Jarek Kobus
c99ce1f455 ExtraCompiler: Expose TaskItem for compile task
This is an intermediate state before employing one common TaskTree
inside CppProjectUpdater. Use multiple one-task TaskTrees for now.

Refactor ExtraCompiler so that there is only one pure virtual method
to be implemented (taskItem()) instead of two (2 run() overloads).
Use TaskTree inside ExtraCompiler for running the compilation process.

Change-Id: I6884934508e043594589d117f6d3f0aed94b84c2
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-11 15:22:56 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
David Schulz
2d0456f085 LSP: Support remote LSP file paths
Change-Id: If3cf1b8d675ef091427dbcd703c7d14b384a1b3a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-12-15 09:49:48 +00:00
Jarek Kobus
834f89acf2 Remove unused variables
Change-Id: I653f6fa71bb04e049d4e1848a7e38a606692e678
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-12-09 13:01:53 +00:00
Jarek Kobus
c021fb5179 Don't call non-const methods on temporary QList
Otherwise it may unnecessarily detach. Either store a local
const reference or call const equivalent (e.g. constFirst()).

Change-Id: I96d665487cf28c17e72bea17f1b8f164ce06cc70
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-12-08 10:21:57 +00:00
Jarek Kobus
bf0d716b51 Remove unused includes of QGridLayout
Change-Id: Ia0823fe1dbadb7c68efc431c3bf0f1ba621a9484
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-11-18 15:29:15 +00:00
David Schulz
497b20ade7 Python: use consistent pyls naming in settings
Change-Id: I8a36e4089812802c3629ac52ce52499dde53eba8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-09-05 10:57:54 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
hjk
26dd8aef2a Python: Convert to Tr::tr
Change-Id: I0241053b0d51dbb1a60c43351cbff543fd52573d
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-21 08:25:04 +00:00
David Schulz
1956fa0365 Python: prevent setting local env to remote pyls
Change-Id: Id0eea5420c897687e6931bf640e3a37ba2638b8f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-27 11:23:54 +00:00
David Schulz
591fc12ffa Python: remove static cast of client interface in client constructor
Change-Id: I475a2b79438b8392085f1d9bf2cdb8b7369efa68
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-20 13:11:31 +00:00
David Schulz
4c20a880e6 Python: remove python specific language client settings
Change-Id: Ic993d525f29c1925f7e64dfc6f5e053234fb4904
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:47:23 +00:00
David Schulz
ed22ef7854 Python: globalize Python language server settings
Change-Id: I84fcee6462064f0c788492fcfa12a77379af2bd7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-10 12:40:43 +00:00
David Schulz
2029fe8c99 LanguageClient: fix todo
Change-Id: Ia6b3b5fe6e595c32a8b8a13b869f3178afb37ed8
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-06-07 06:29:42 +00:00
David Schulz
b9034e8426 Python: support python 3 mime type in language client
Change-Id: I9319442aecc61e854aaeb0778b959086a70d431b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-02 13:29:17 +00:00
David Schulz
b9627ddba7 Python: add pyside uic extra compiler
To be able to autocomplete code from .ui forms we need to feed the
python language server the compiled form. The uic extra compiler
generates a temporary ui_name.py file for uncompiled or unsaved ui
files. These files are inside a folder that gets appended to the python
path environment variable for the python language server.

Change-Id: I9f48d2012162f33986639315189c41e0a7e0dad2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-06-02 09:09:22 +00:00
David Schulz
7c86d1a195 LanguageClient: pimpl Client and cleanup includes
Change-Id: I653861e29baeaddcbcd21a5e738be6bd85514617
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-05-23 11:58:09 +00:00
David Schulz
a493970e05 LanguageServerProtocol: remove IContent
Do not pretend to support multiple message types, while no other
messages are actually implemented by us or even known to exist in the
wild.

Change-Id: I49ee2118b2e10f265ac641c195df8a9e5c97951c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-05-20 06:35:47 +00:00
hjk
6008d05b71 Python: Split complex call
Change-Id: I6f301342a1841d2734f0598edfcd7b3327a943c9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-05-09 05:56:06 +00:00
hjk
0da130c4ef Python: Apply 'static' pattern for singleton members
Plus some cosmetics.

Change-Id: Ia2c8f425f0491fbe6a0bbf2e508857a5550e4d38
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-27 08:55:02 +00:00
hjk
28cfdf388a Promote previously python-specific InterpreterAspect
... and drop PythonRunConfiguration, which is a plain RunConfiguration now.

Change-Id: I540cb738180fc1424f730d6d1998886915ce527b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-04-27 08:54:22 +00:00
David Schulz
64170a788a Python: extract pythonProjectForFile function to utils
Change-Id: I4055527302cab09f55cd4b06bfd3896accb4832a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-28 09:29:15 +00:00
David Schulz
ff686f5679 Python: move python name cache to utils
Change-Id: I7f6d13a465be6de90aea64e7f19c92bca3ee6c19
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-28 09:29:08 +00:00
David Schulz
b8c8e0ccae Python: Use specialized document to check for pylsp
Change-Id: I9ea13df7fc04a4fe35d901da179b9c0ebaf57bb6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-28 09:29:01 +00:00
David Schulz
7c3d6c1fc1 Python: remove unused variable
Change-Id: I1c16e4b3795f83e1107d39f0265465b0926d4c97
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-23 09:28:12 +00:00
David Schulz
6f520f8783 Python: extract pip installation task
Make it reusable for pyside and other packages.

Change-Id: If97e65a506d36916aaa61f48b9a2f71c458d4fe9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-21 11:38:06 +00:00
David Schulz
9d1fe1df14 Python: ensure opened file is inside a workspace
The Python language server seems to dislike files that are not part of a
workspace resulting in very long lookup times for specific symbols.

Fixes: QTCREATORBUG-26230
Fixes: QTCREATORBUG-24704
Fixes: QTCREATORBUG-24140
Change-Id: Iceb7a2b3d57aea6554225a74587f619e530e10c9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-21 09:08:19 +00:00
David Schulz
1a88f26d8b LanguageClient: rename clientForSetting -> clientsForSetting
Change-Id: Idf4055769fba4c2551ac968c0232ddb3916acb6c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-21 08:48:24 +00:00
David Schulz
5924268568 LanguageClient: unify client container
Change-Id: I17b5e7ca4999cd5a9ca8e79577f29854082b6c6b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-03-21 08:48:17 +00:00
Jarek Kobus
8e0ae8ba96 QtcProcess: Limit the inclusion of qtcprocess.h
Move the rest of QtcProcess enums to processenums.h.
Move ExitCodeInterpreter into processenums.h.
Remove superfluous Utils:: prefix.

Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-02 13:30:39 +00:00
David Schulz
c9cd00f2ce Python: add lsp configuration widget
Change-Id: I688981293e3bbbee64fc2d714146fcdfa8126458
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-09 09:03:30 +00:00
David Schulz
7f4342b687 Python: add python specific language client settings
Change-Id: I1b9a194f32f3f13381954539229b02e03e3af058
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-18 13:21:53 +00:00
Eike Ziller
3749cfc896 InfoBar: Make adding more buttons possible
Change-Id: Ic0c946cf3f87fe46cd06391f38e0bc71374ad340
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-18 09:33:20 +00:00
David Schulz
49ac087955 Python: move language client functionality out of utils
There will be more lsp specific functionality so moving it into its own
space is reasonable.

Change-Id: Ic87d437182d68673b53f662c804707138fef5b6c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-18 08:14:57 +00:00