Commit Graph

378 Commits

Author SHA1 Message Date
Serg Kryvonos
c3a7279f05 Work on lambdas C++20 compatibility
Change-Id: I0d391c02ae1e1c5a1751b33ca7e83902e1cfe269
Reviewed-by: hjk <hjk@qt.io>
2023-12-13 13:24:22 +00:00
David Schulz
fbe054116a Python: Avoid polluting global or virtual environments with pylsp
Install the language server into the Qt Creator resource directory
instead. Reuse the server for all interpreters with the same
version. This also reduces the amount of editor toolbars asking the user
to install a language server for a specific interpreter.

Change-Id: I48ef4ad30fe0097ee8d2b855b0f278e98be5ce57
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-13 11:26:16 +00:00
Eike Ziller
10e5a27c27 Merge remote-tracking branch 'origin/12.0'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakeprojectmanager.cpp

Change-Id: If96d0f0a3d48c2581e765e4afb8b23924c48bdd6
2023-12-12 10:17:39 +01:00
Cristián Maureira-Fredes
c4464eb072 Add logo and title to PySide install dialog
Change-Id: I7888ee906334de2c93c24c5da2394c9e73101a28
Fixes: QTCREATORBUG-30041
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-12-12 08:51:44 +00:00
David Schulz
f4bf7c5b00 Python: show warnings if pip or venv is missing
Change-Id: Ib38c1eb3b0f31d6988d3a5f084ac6eda08ec0619
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-11 11:39:11 +00:00
David Schulz
d5ddf391c1 Python: optimize loading projects
Loading .pyprojects file now doesnt add a target for the default kit but
results in showing the target setup page which is filtered for usable
kits.

Change-Id: I4c407960a90a27457314281b79dc8878510eca80
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-11 09:33:26 +00:00
David Schulz
eb740bdd95 Debugger: add python debugger setting in run configuration
Change-Id: Ifa5d72566007e0bb006523433dcef97689677fbf
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-12-04 14:56:27 +00:00
David Schulz
c0a3565362 Python: Create a default BuildSystem for Python targets
This makes sure the project can be parsed even if we do not have a valid
build configuration for that target.

Amends 09e94ae4ac

Change-Id: I92214474f581af228bd5c2aaf2f3e4b620ffc9d5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-12-01 07:01:10 +00:00
David Schulz
09e94ae4ac Python: use kits page in python wizards
Change-Id: I1f7aaf145443481546abb868c8c167186600b848
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-28 12:17:14 +00:00
Eike Ziller
c77128e698 Merge remote-tracking branch 'origin/12.0'
Change-Id: I7971dd83798e975d4e10b77a352c9d7ef7b14ec0
2023-11-23 10:43:00 +01:00
David Schulz
06595222ff Python: fix commercial pyside installation
Change-Id: I6a89b9a9f32e07db91e67df248d94c78ae731455
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-21 14:03:13 +00:00
Christian Stenger
7125862212 Add some include guards
Change-Id: If306f95f206e2b1cba48df806c822b8e2d27cf72
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-21 13:58:36 +00:00
Christian Stenger
4f7865eb4d Python: Limit detection to unique python
In case we are having symbolic links on python or its parent
path(s) we added an interpreter for each of these.
Resolve the python path explicitly and only add them if they
are unique.

Change-Id: I21b9d7d85e82c5ec3a18e182dfcde2b98936a8af
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-15 12:02:40 +00:00
David Schulz
f6e403b219 Python: split buildsystem and project into separate files
Change-Id: Ic226ff6685cb6657a5e83258aab151754d80b3bf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-14 11:03:24 +00:00
hjk
fc7c11fb65 ProjectExplorer: Consolidate creation of KitAspect's "Manage..."
Change-Id: I001a21f41bcd5ff0614bdf98893b56137c06546f
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-08 09:52:26 +00:00
Jarek Kobus
4c38f68d0f TaskTree: Rename StopWithDone -> StopWithSuccess
Make naming consistent with recent changes.
"Done" is meant to be an event name when the task / group
finishes. "Done" may finish with "Success" or an "Error".

This addresses the 26th point in the task below.

Task-number: QTCREATORBUG-28741
Change-Id: I53ed6905b1c385c398f49e122e8ca60aa3ad0806
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-11-07 14:09:23 +00:00
Eike Ziller
f9d4697371 Merge remote-tracking branch 'origin/12.0'
Change-Id: Ice9c78147917fc13b6cf81ba781a37bdcd870e17
2023-11-03 14:58:00 +01:00
David Schulz
024f653806 Python: initialize run configuration with kit python
Change-Id: I85ebe906bee2d9bc88c443f0189a685ac97ee30d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-03 08:09:17 +00:00
David Schulz
f5e12237a2 Python: avoid detecting pythonw on windows
Change-Id: I75fcba53fa671904405d3411409c6ea67335e81b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-03 07:37:54 +00:00
David Schulz
b2cb87f06e Python: add a python kit aspect
Change-Id: If7aaa52025ec5834a44e9196548fbcc7456c89a8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-11-02 09:18:19 +00:00
David Schulz
28b70672b4 Python: generate Python kits for new interpreter
Change-Id: Ie4b23aae296f66900fba85a9e243bbf656e49ed4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-02 09:08:14 +00:00
Christian Stenger
b39476dd47 Python: Avoid warning in QFutureWatcher
Re-using a watcher will trigger the warning as the future had been
set on the "old" watcher even though it may have finished or
disconnected.

Change-Id: I32d937b1d73d8bba9ec5639c62393da84638099e
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-11-01 07:07:52 +00:00
David Schulz
0117b1669b Python: use correct python language server after installation
Change-Id: Ie5e26eedffc51e8916d849121fa60ea3d56e5a66
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-10-30 09:44:22 +00:00
Eike Ziller
ad7d559028 Tr: More small fixes
Change-Id: I5d9324d3f64eaa522fa1d435efa39fa43d84798a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2023-10-18 12:10:45 +00:00
David Schulz
18c00cd381 Python: reduce freezes in settings page with remote interpreter
Do not check the existence of remote interpreters when opening the
settingspage since we could run into device timeouts for unreachable
devices.

Change-Id: I5d0d1316961fc4ecbd2be55f6df70091ff65ecd5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-10-18 09:53:45 +00:00
David Schulz
ed6595a66e Python: improve pyside tool detection
Look right next to the used python. For virtual env setups this should
be a lot faster than asking pip for the installed files. Additionally
this should work for pyside devenvs.

Change-Id: I2a8cf6877636785453426c348cfac252645aa4e1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-29 09:19:52 +00:00
Eike Ziller
a0a4d9024e Merge remote-tracking branch 'origin/12.0'
Conflicts:
	src/plugins/python/pyside.cpp

Change-Id: I1f84ed56d38355cef6076797c72693fff4c1aa78
2023-09-28 11:02:38 +02:00
David Schulz
51a406900c Python: fix installing PySide wheels on Mac
Change-Id: I3f9f9ee5580176a65ca8e6b5c62b793fed170462
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-28 08:43:21 +00:00
David Schulz
b9e327bb10 Python: read installer settings for pyside wheel requirement
This should be more stable than relying on a specific folder structure
in the Qt Package.

Change-Id: I20dea176df43c9f6e768f4db69ac4eb70633f01a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-28 08:42:50 +00:00
hjk
342e066886 Utils, all: Standardize on QtcSettings
Change-Id: Id222016f15b1c3bfe6710fe5d0297666d4565ef1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 13:25:31 +00:00
David Schulz
2c298097e9 Python: detect pythons async
Change-Id: I74484a4f2c33c4fd7754f87bfbf3b9d711542741
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-27 12:08:36 +00:00
Eike Ziller
13c12f33e5 Merge remote-tracking branch 'origin/11.0'
Change-Id: I397dde2f95f62eb4843c39dd861522ae63d7f2c9
2023-09-20 10:43:54 +02:00
David Schulz
0a7eebc9c4 Python: add build target infos for .pyw files
Change-Id: I7f36fb14f79edf69f043b0ac566c9493e043c6f1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-19 09:03:40 +00:00
David Schulz
03e50d4d7a Python: fix unguarded optional access
Change-Id: I4131343aab2f193336e81f2e76cbb95ef3ff2805
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-09-07 12:06:17 +00:00
Artem Sokolovskii
12fb4e93bd Python: Fix debugger start
Change-Id: I9a26c591d174f5f079c4a673a6bf1aedd5cd709c
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-29 09:11:33 +00:00
David Schulz
be54b3db2f Python: check for pyside in qt installation
Fixes: PYSIDE-2153
Change-Id: I91ec24eb6a71d4f29edaf7a707b3c49a4deb725a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-08-28 06:04:08 +00:00
David Schulz
f8005cced8 Python: use internal terminal for pip install task
Change-Id: I4125f8a12c7a6d2f7d5ebaaf5150051e330b6832
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-08-24 13:53:43 +00:00
David Schulz
7fd8df9300 Python: Allow installing requirement files
Change-Id: If4ac1470fdba4b9f1070fc37d35d5d738a18865f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-08-24 13:47:42 +00:00
hjk
6e307be365 Utils: Rename the new Storage to Store
Apparently that's what the young people on the web use for such a thing.

Change-Id: I75d5396ff3cb3c26efd6008b5f2261354c4f7896
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-24 05:56:57 +00:00
hjk
dc6b40a5c0 Use Utils::Storage instead of QVariantMap in a few places
Change-Id: I02833cf2bc3caaadc22ff93ae530e4aebe4c3868
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-23 14:30:50 +00:00
hjk
b48e10717f ProjectExplorer: Self-register JsonWizardPage related factories
Moves the using code closer to the common factory setup pattern.

Change-Id: I2ee85b911d43b63730ff994a4b07568b23b14f00
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-08-18 10:17:24 +00:00
hjk
26db9f2c95 Core: De-QObject-ify editor factories
Change-Id: Iaf39ad29576638e994dd2f28d323e445ce2ee93f
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-18 07:25:44 +00:00
David Schulz
01cac8299b ProjectExplorer: fix Interpreter::changed emits
Only emit changed if the current interpreter changes.
This is more in line with the other aspects.

This fixes the pyside detection since the changed signal was not
emitted in all relevant code paths.

Change-Id: I53409b17f260b35914e39de894b48d7bd1ce27c0
Reviewed-by: hjk <hjk@qt.io>
2023-08-15 10:44:53 +00:00
hjk
017d7c0e47 ProjectExplorer: Rename kitinformation.{h,cpp} to kitaspects.{h,cpp}
Change-Id: I069bddeb457366210d339edcbb8ffb359a40fab8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 07:31:03 +00:00
hjk
bcb083bd99 Python: Use a connect that will remain valid
... after a StringAspect/FileAspect split, instead of relying on
the  current inheritance.

Change-Id: I7dd91f402636d35a15e9d1618b73c0981777b06e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-26 10:00:51 +00:00
Eike Ziller
a419670ff5 Build: Change plugin json.in files to CMake style
They were still using variables in qmake style.
Directly use CMake variables in the json.in files and remove the no
longer needed escaping of quotes.

Adds a fatal message if it detects the old style in a .json.in file for
easier porting.

Change-Id: I8de88d8db2da55781f0e9d72eda03f943723188e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-07-25 13:21:16 +00:00
hjk
b14b7b1a5f Replace a few more Aspect::value() calls with operator() uses
Change-Id: I9343e74bfb51af41df02a411976b82b9260be2fb
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-20 09:31:09 +00:00
Jarek Kobus
47ac604aea AbstractProcessStep: Use task tree for all subclasses
Introduce AbstractProcessStep::runRecipe() virtual method
with the default implementation.

Task-number: QTCREATORBUG-29168
Change-Id: Iac75f4c38f8ee91ad8ac9324bb27881a3722911f
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-07-14 06:48:58 +00:00
Jarek Kobus
4d2b4d0ab1 PySideBuildStep: Employ task tree for running
Task-number: QTCREATORBUG-29168
Change-Id: Ia665e8eb79f41e5cbb0bdd1394d7dbf9b85fea14
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-07-14 06:44:11 +00:00
hjk
4cf878aecf Python: Base MainScriptAspect on FilePathAspect
Instead of StringAspect.

Change-Id: Idc5cbe4a28ece5b053eee9f260be9a5f22912f81
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-13 10:21:57 +00:00