aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonsettings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Python: use a map for saving interpretersDavid Schulz27 hours1-5/+19
| | | | | | | | | Keep the saving to a list for a few versions to allow graceful transitions between multiple versions of Qt Creator. Change-Id: Icceed5e033e20984b69a31d653a09d9d917ed17b Reviewed-by: Marcus Tillmanns <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
* TaskTree: Make usages more consistentJarek Kobus2025-08-081-7/+9
| | | | | | | | | | | | Mostly cosmetic changes. Name top level groups as "recipe". Make recipes const. Inline one-line recipes into TaskTreeRunner::start(). Remove unnecessary Group statements. Change-Id: I391702fc94af2929d3e6d9d3ba7f99c744bd09e1 Reviewed-by: Marcus Tillmanns <[email protected]>
* ProjectExplorer: Change KitAspectFactory::autoDetect to use DetectionSourceMarcus Tillmanns2025-07-231-6/+3
| | | | | Change-Id: I6d1520d1d7b9ba4608aeb9b46a1f5d03fcc5e5b0 Reviewed-by: hjk <[email protected]>
* Python: Don't save temporary InterpretersMarcus Tillmanns2025-07-231-0/+3
| | | | | Change-Id: If752942ad862da8ce36f48d301b0520859b8d84e Reviewed-by: hjk <[email protected]>
* Python: Use DetectionSourceMarcus Tillmanns2025-07-231-17/+31
| | | | | | | | | Api: ProjectExplorer::Interpreter::autoDetected => ProjectExplorer::Interpreter::detectionSource.isAutoDetected() Api: ProjectExplorer::Interpreter::detectionSource => ProjectExplorer::Interpreter::detectionSource.id Change-Id: Ic1d1d1913b983337ad72fc0a3590667c8083bc9b Reviewed-by: hjk <[email protected]> Reviewed-by: David Schulz <[email protected]>
* ProjectExplorer: Use DetectionSource in KitMarcus Tillmanns2025-07-221-3/+4
| | | | | Change-Id: Ia57c0140a5173eecb27a1dab9ac8be145976e8fb Reviewed-by: hjk <[email protected]>
* Python: Move auto detection functions into SettingsMarcus Tillmanns2025-07-171-0/+49
| | | | | Change-Id: I2e99390ff9522c19e9db5a9383bf4a8febd31d74 Reviewed-by: David Schulz <[email protected]>
* Python: Remove old fallback code for Interpreter list and add detectionSourceMarcus Tillmanns2025-07-171-28/+22
| | | | | Change-Id: I9e07a33b9750009e559a16c4d3d052dbea5deab5 Reviewed-by: David Schulz <[email protected]>
* Python: Store Interpreter detectionSourceMarcus Tillmanns2025-07-161-2/+4
| | | | | Change-Id: If38a58dfb14852bdd4771a90fcc9ce52fde32bf0 Reviewed-by: David Schulz <[email protected]>
* Python: Implement KitAspectFactory auto detectionMarcus Tillmanns2025-07-161-36/+16
| | | | | Change-Id: I4f77b9312899ec3ff2f09360837e8f43ccf3b246 Reviewed-by: David Schulz <[email protected]>
* Python: Connect auto detected kits to their deviceMarcus Tillmanns2025-07-161-1/+2
| | | | | Change-Id: Ic6f08c761cc427c5e5cbcc0ff9e1cec0051d44cb Reviewed-by: hjk <[email protected]>
* Avoid potential detach of non-const Qt containers in range-loops 2/2Alessandro Portale2025-03-241-3/+3
| | | | | | | By using std::as_const Change-Id: I8be5cbdbdd677bd9c6d849f701a7eef95b1c6792 Reviewed-by: Christian Stenger <[email protected]>
* Python: use thread pool to cache venv and pip usabilityDavid Schulz2025-03-061-2/+3
| | | | | | | | | | | | If no threadpool is passed to async run we use the global thread pool that has an unlimited max thread count that results in potentially opening more file handles than the operating system allows. Using an own threadpool reduces the number of parallel running checks to ideal thread count which should be lower than the maximum open file handle limit. Change-Id: I248c325cbdb0068a89eb301ee3ba04b86bc58783 Reviewed-by: Friedemann Kleint <[email protected]> Reviewed-by: David Schulz <[email protected]>
* Utils: Add a way to (shutdown-)guard pre-created objectshjk2025-01-141-3/+3
| | | | | | | | | | | | | | | | | | | | Some classes use private c'tors and a friend function for creation. Since friendship is not transitive this cannot (nicely) be extended to the GuardedObject implementation. In the quest to achieve a uniform 'void setupFoo()' signature to the outside, keep the creation of the guarded object were it is, but allow it to be taken over bey a GuardedObject. This setup still requires the _d_'tor to be public, but less "dangerous" then a public c'tor - assuming there is some danger in having that at all. Use it for the PythoSettings and LanguageClientManager setup. Change-Id: Ica114a0bb901d33d79c847910a2383ac1bc9e49a Reviewed-by: David Schulz <[email protected]>
* Utils: Rename FilePath::toString() into toUrlishString()hjk2025-01-101-3/+3
| | | | | | | | | | | | | | | | toString() is almost always the wrong conversion, but unfortunately too easy to find and often even working at least for local setup. This here raises the bar as the non-availability of the "obvious" toString() hopefully helps people to think about the semantics of the needed conversion and choose the right toXXX() function. The chosen new name is intentional ugly to reduce the likelihood that this (still almost always wrong) function is used out of convenience. Change-Id: I57f1618dd95ef2629d7d978688d130275e096c0f Reviewed-by: Eike Ziller <[email protected]>
* Python: optimize the pip and venv checksDavid Schulz2025-01-071-4/+13
| | | | | | | | | Those checks can take an considerable amount of time. So instead of running them the first time we want to check this info run them in the background as soon as we have loaded the python settings. Change-Id: I287acd2a5fd7b053873257238f7dfbaa9cf00170 Reviewed-by: Christian Stenger <[email protected]>
* Disambiguate translations for "None"Eike Ziller2025-01-061-1/+1
| | | | | | | | | Translations can be different depending on context. Give each usage a disambiguation text. Task-number: QTCREATORBUG-31978 Change-Id: I44ac524d7448787360e825fad1d430ded3f07659 Reviewed-by: Christian Stenger <[email protected]>
* Utils: Add FilePath::isLocal() and use it instead of !needsDevice()hjk2024-12-091-5/+5
| | | | | | | | "needsDevice()" is an odd name, but keep it for now until downstream has caught up. Change-Id: I1fdb65d55e84e31512edb8f0bea8a0a3f7b2879c Reviewed-by: Marcus Tillmanns <[email protected]>
* ProjectExplorer: Dissolve kitaspects.{h,cpp}Christian Kandeler2024-11-201-1/+1
| | | | | | | Move the remaining classes into their own files. Change-Id: I301e72004c21446fa9b8f15942bb042218b0ecef Reviewed-by: hjk <[email protected]>
* Core: Provide settings categories centrallyChristian Kandeler2024-11-151-2/+0
| | | | | | | | | It was conceptually wrong that an options page was supposed to set its category's display name and icon. Instead, categories are now explicitly registered with name and icon. Change-Id: Ic10b3791c8068176f55470e6845ab4832160b8e7 Reviewed-by: Eike Ziller <[email protected]>
* Fix some translated stringsEike Ziller2024-10-241-1/+1
| | | | | | Change-Id: I7ffcad62b31e6236dba5fc2116afa297ffcef0a5 Reviewed-by: Christian Stenger <[email protected]> Reviewed-by: Leena Miettinen <[email protected]>
* Python: do not access deleted widget in settingspageDavid Schulz2024-10-231-14/+5
| | | | | Change-Id: Ibf7148255ac5a3bb26ec41684f7c96dd5c357ca5 Reviewed-by: Marcus Tillmanns <[email protected]>
* Python: Simplify PythonKitAspectChristian Kandeler2024-10-111-1/+6
| | | | | | | ... using base class convenience functionality. Change-Id: Ibfbfd588d32c34e2181ce3080b4d1d4e558b204c Reviewed-by: David Schulz <[email protected]>
* Python: Fix accidentally inverted conditionChristian Kandeler2024-10-101-1/+1
| | | | | | | Amends 79774519ccaa19fbee58c8a191281f286eb83be2. Change-Id: Iba8c1f4d7d2f11e262aafd6b5f0564550484fb6b Reviewed-by: David Schulz <[email protected]>
* Python: Use model in aspect combo boxChristian Kandeler2024-10-091-55/+71
| | | | | | | | For icons and tooltips consistent with the settings page. Task-number: QTCREATORBUG-31574 Change-Id: Ib567f43e0b29fa058770eefb4b16e8610fd28adf Reviewed-by: David Schulz <[email protected]>
* Merge remote-tracking branch 'origin/14.0'Eike Ziller2024-09-251-13/+24
|\ | | | | | | | | | | | | | | | | Conflicts: coin/instructions/build.yaml src/plugins/cppeditor/cpptoolsreuse.cpp src/plugins/projectexplorer/projectexplorer.cpp Change-Id: I26748c67ed58114b392704bbf4eba978b1048c80
| * Python: Allow kit creation for virtual environmentsChristian Stenger2024-09-181-9/+10
| | | | | | | | | | | | | | | | | | This had been intentionally disabled before, but we still should permit to explicitly create a kit for a registered virtual environment if the user requests so. Change-Id: I677c0c5093bedd1a9f50e73da173db09195e128e Reviewed-by: David Schulz <[email protected]>
| * Python: Fix enabled state for generate kit buttonChristian Stenger2024-09-181-4/+14
| | | | | | | | | | | | | | | | | | Ensure the generate kit button for a python interpreter is only enabled if we can add a kit for this python. Basically disallows (local) python with incorrect paths. Change-Id: I3ca7b1fefb453837894a7ad6f39a446394fe2c4b Reviewed-by: David Schulz <[email protected]>
* | LanguageClient: Rename jsonEditor()Marcus Tillmanns2024-07-151-3/+1
|/ | | | | | | Also adds QObject *parent argument for ease of use. Change-Id: I25d23186d398d35ebc8519b5964da637bf4d028d Reviewed-by: David Schulz <[email protected]>
* AsyncTask: Centralize setting global future synchronizerEike Ziller2024-05-211-2/+0
| | | | | | | | | | | Move the global FutureSynchronizer to Utils and use it by default for AsyncTask (if that is in the main thread). This way setting a synchronizer is less prone to be forgotten. Individual uses can still override this. Change-Id: I1a12bf4d7f4cb5be99668bf0a4797108c2fe6448 Reviewed-by: <[email protected]> Reviewed-by: Jarek Kobus <[email protected]>
* Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-05-021-2/+0
|\ | | | | | | Change-Id: I4817ff528f92dcb2ffb00c92ca1039f1ae31c7f1
| * Python: remove rope_completion language server settingDavid Schulz2024-05-021-2/+0
| | | | | | | | | | | | | | | | | | Rope is not part of the default installation of the python-lsp-server pypi package and enabling it by default results in an error at startup. Fixes: QTCREATORBUG-30757 Change-Id: I975ac98d9f4c5b25f5be085461e5b626d3a93fbc Reviewed-by: Christian Stenger <[email protected]>
* | Merge remote-tracking branch 'origin/13.0'Eike Ziller2024-03-141-0/+1
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/cmakeprojectmanager/cmaketool.cpp src/plugins/python/pythonutils.cpp src/plugins/qtsupport/baseqtversion.cpp Change-Id: Ia3e35c763ff9475d17ad922718b54152209893b8
| * PyLSConfigureWidget: Don't leak the editorJarek Kobus2024-03-131-0/+1
| | | | | | | | | | Change-Id: Idc283b2cfabfcd1120520c5bbb4258b085c410a0 Reviewed-by: David Schulz <[email protected]>
* | Utils: Fix build with MSVC with C++20Eike Ziller2024-02-281-1/+1
|/ | | | | | | | | | | | | | | | | Rename process.h back to qtcprocess.h MSVC's "threads" standard header includes <process.h>, and that ends up including our process.h from Utils. There already was a hacky workaround in place for a similar issue with MINGW, but that doesn't work with MSVC because that doesn't have Simply use a name that doesn't conflict. Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: <[email protected]> Reviewed-by: hjk <[email protected]>
* PythonSettings: Reuse Tasking::nullItemJarek Kobus2024-02-161-1/+1
| | | | | | Change-Id: I50675730fa7a7e228b151213610996456a8eacf4 Reviewed-by: <[email protected]> Reviewed-by: David Schulz <[email protected]>
* PythonSettings: Don't leak running watchersJarek Kobus2024-02-161-41/+40
| | | | | | | | | | | | | | | | | Detected by memory analyzer. When shutdown comes while pythonsFromRegistry() or pythonsFromPath() is still running, the corresponding QFutureWatcher is leaked. Employ TaskTreeRunner instead. It handles the cancellation of the running tasks automatically on its destruction. Make pythonsFromRegistry() and pythonsFromPath() cancelable, by providing QPromise as a parameter and check for canceled state on every iteration. Change-Id: Iae7c7d1ed764646b8203bd7ca8b9580cb999b80c Reviewed-by: David Schulz <[email protected]>
* Python: Remove pluginInstance() and convert usershjk2024-02-051-4/+3
| | | | | | Change-Id: I43179961cdee855b710fc082568a7d0d9a0f0719 Reviewed-by: David Schulz <[email protected]> Reviewed-by: <[email protected]>
* Python: Use setup function for remaining plugin itemshjk2024-02-051-0/+6
| | | | | | | ... and remove the now-empty plugin pimpl. Change-Id: I0db27757e832a0e3ac52b938a4d6ad820adfc195 Reviewed-by: Jarek Kobus <[email protected]>
* Python: Don't needlessly store default valueMarcus Tillmanns2024-02-011-1/+5
| | | | | | Task-number: QTCREATORBUG-24762 Change-Id: I3ca495b2696747d5323cc7eea4aac4d99e3adfd1 Reviewed-by: David Schulz <[email protected]>
* Use more std::chrono and std::chrono_literals namespacesJarek Kobus2024-01-231-1/+2
| | | | | Change-Id: Ib8c83988d7afe35d81b87ff8c5c87eef2082f12d Reviewed-by: hjk <[email protected]>
* Process: Get rid of setTimeoutS()Jarek Kobus2024-01-221-2/+1
| | | | | | | | Add an extra arg to runBlocking() function instead. Use std::chrono::seconds for timeout. Change-Id: I7c3c21e8f26a2ccbed157d15083d6ef0b4cd2f7e Reviewed-by: Orgad Shaneh <[email protected]>
* Python: Move plugin class definition to .cpphjk2024-01-161-1/+1
| | | | | | | | | The plugin classes partially changed there purpose, they are no more meant to provide internal utility functionality. Change-Id: I9b9200995eaa95dcd924c94dcedb28e6d5db0be9 Reviewed-by: <[email protected]> Reviewed-by: David Schulz <[email protected]>
* Python: disable generateKit button after clickingDavid Schulz2024-01-161-0/+1
| | | | | | | | | The button should only be enabled if no kit can be associated with the currently selected python interpreter. Change-Id: I0357bf999c8abd2bc11b4ac5b2e79a10a0d94f01 Reviewed-by: <[email protected]> Reviewed-by: Christian Stenger <[email protected]>
* Python: register python infos to the kits macro expanderDavid Schulz2024-01-101-1/+1
| | | | | | | | ... and use the name in the autogenerated kits display name Change-Id: I928533e6f8238189d64350463897a86ff5512ae7 Reviewed-by: Christian Stenger <[email protected]> Reviewed-by: <[email protected]>
* Python: use kits page in python wizardsDavid Schulz2023-11-281-12/+25
| | | | | Change-Id: I1f7aaf145443481546abb868c8c167186600b848 Reviewed-by: Christian Stenger <[email protected]>
* Python: Limit detection to unique pythonChristian Stenger2023-11-151-2/+5
| | | | | | | | | | 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 <[email protected]>
* Python: avoid detecting pythonw on windowsDavid Schulz2023-11-031-17/+0
| | | | | Change-Id: I75fcba53fa671904405d3411409c6ea67335e81b Reviewed-by: Christian Stenger <[email protected]>
* Python: generate Python kits for new interpreterDavid Schulz2023-11-021-1/+110
| | | | | Change-Id: Ie4b23aae296f66900fba85a9e243bbf656e49ed4 Reviewed-by: Christian Kandeler <[email protected]>
* Python: reduce freezes in settings page with remote interpreterDavid Schulz2023-10-181-0/+4
| | | | | | | | | 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 <[email protected]>