aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonsettings.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Python: use DataFromProcess to fetch python version outputDavid Schulz3 hours1-7/+1
| | | | | | | and remove duplicated calls and caches Change-Id: I39f73354035f2ad427e7f2360ccba7143aeb2b84 Reviewed-by: hjk <hjk@qt.io>
* Python: Switch row/column order in settingshjk26 hours1-13/+13
| | | | | | | The details kind of belong to the list only. Change-Id: I71acb1c0477fd6152662700af586cda2bf4bc03e Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: Use more direct child widget setup in settingshjk26 hours1-64/+59
| | | | | Change-Id: Ia6abe99d13974c7a448a0baa71503255bf0c7a7b Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: Move interpreter access from option page to option page widgethjk5 days1-143/+125
| | | | | Change-Id: I70f893911e4ffae0485dda80ecea951f3ca7be33 Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: Add debugger kit aspect to python kitsDavid Schulz2025-11-251-1/+4
| | | | | | | This allows to configure and use a C++ Debugger for Python projects. Change-Id: I976cff8a3e45f1ed732ee71874459009c6fd24ef Reviewed-by: hjk <hjk@qt.io>
* Python: fix visualizing default interpreter in settingsDavid Schulz2025-11-201-4/+8
| | | | | | | | This got lost in 79774519ccaa19fbee58c8a191281f286eb83be2 Fixes: QTCREATORBUG-33667 Change-Id: Id8405b42a6b7a4d83e6c669e8d811e4e18c89219 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* TaskTree: Switch to qt-ified QtTaskTreeJarek Kobus2025-10-311-1/+1
| | | | | | | Remove the old Tasking lib. Change-Id: Iacb4939cc873e25d6039efae7dd23510a7baa5f9 Reviewed-by: hjk <hjk@qt.io>
* Fix various translatable stringsEike Ziller2025-10-061-3/+3
| | | | | | Change-Id: I9fccebbcbddda2e310f668d30ec803d7a859ec6c Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Python: use a map for saving interpretersDavid Schulz2025-08-221-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 <marcus.tillmanns@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* 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 <marcus.tillmanns@qt.io>
* ProjectExplorer: Change KitAspectFactory::autoDetect to use DetectionSourceMarcus Tillmanns2025-07-231-6/+3
| | | | | Change-Id: I6d1520d1d7b9ba4608aeb9b46a1f5d03fcc5e5b0 Reviewed-by: hjk <hjk@qt.io>
* Python: Don't save temporary InterpretersMarcus Tillmanns2025-07-231-0/+3
| | | | | Change-Id: If752942ad862da8ce36f48d301b0520859b8d84e Reviewed-by: hjk <hjk@qt.io>
* 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 <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* ProjectExplorer: Use DetectionSource in KitMarcus Tillmanns2025-07-221-3/+4
| | | | | Change-Id: Ia57c0140a5173eecb27a1dab9ac8be145976e8fb Reviewed-by: hjk <hjk@qt.io>
* Python: Move auto detection functions into SettingsMarcus Tillmanns2025-07-171-0/+49
| | | | | Change-Id: I2e99390ff9522c19e9db5a9383bf4a8febd31d74 Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: Remove old fallback code for Interpreter list and add detectionSourceMarcus Tillmanns2025-07-171-28/+22
| | | | | Change-Id: I9e07a33b9750009e559a16c4d3d052dbea5deab5 Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: Store Interpreter detectionSourceMarcus Tillmanns2025-07-161-2/+4
| | | | | Change-Id: If38a58dfb14852bdd4771a90fcc9ce52fde32bf0 Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: Implement KitAspectFactory auto detectionMarcus Tillmanns2025-07-161-36/+16
| | | | | Change-Id: I4f77b9312899ec3ff2f09360837e8f43ccf3b246 Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: Connect auto detected kits to their deviceMarcus Tillmanns2025-07-161-1/+2
| | | | | Change-Id: Ic6f08c761cc427c5e5cbcc0ff9e1cec0051d44cb Reviewed-by: hjk <hjk@qt.io>
* 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 <christian.stenger@qt.io>
* 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 <Friedemann.Kleint@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* 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 <david.schulz@qt.io>
* 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 <eike.ziller@qt.io>
* 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 <christian.stenger@qt.io>
* 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 <christian.stenger@qt.io>
* 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 <marcus.tillmanns@qt.io>
* 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 <hjk@qt.io>
* 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 <eike.ziller@qt.io>
* Fix some translated stringsEike Ziller2024-10-241-1/+1
| | | | | | Change-Id: I7ffcad62b31e6236dba5fc2116afa297ffcef0a5 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* Python: do not access deleted widget in settingspageDavid Schulz2024-10-231-14/+5
| | | | | Change-Id: Ibf7148255ac5a3bb26ec41684f7c96dd5c357ca5 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Python: Simplify PythonKitAspectChristian Kandeler2024-10-111-1/+6
| | | | | | | ... using base class convenience functionality. Change-Id: Ibfbfd588d32c34e2181ce3080b4d1d4e558b204c Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: Fix accidentally inverted conditionChristian Kandeler2024-10-101-1/+1
| | | | | | | Amends 79774519ccaa19fbee58c8a191281f286eb83be2. Change-Id: Iba8c1f4d7d2f11e262aafd6b5f0564550484fb6b Reviewed-by: David Schulz <david.schulz@qt.io>
* 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 <david.schulz@qt.io>
* 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 <david.schulz@qt.io>
| * 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 <david.schulz@qt.io>
* | 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 <david.schulz@qt.io>
* 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: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* 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 <christian.stenger@qt.io>
* | 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 <david.schulz@qt.io>
* | 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 <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* PythonSettings: Reuse Tasking::nullItemJarek Kobus2024-02-161-1/+1
| | | | | | Change-Id: I50675730fa7a7e228b151213610996456a8eacf4 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* 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 <david.schulz@qt.io>
* Python: Remove pluginInstance() and convert usershjk2024-02-051-4/+3
| | | | | | Change-Id: I43179961cdee855b710fc082568a7d0d9a0f0719 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* 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 <jaroslaw.kobus@qt.io>
* Python: Don't needlessly store default valueMarcus Tillmanns2024-02-011-1/+5
| | | | | | Task-number: QTCREATORBUG-24762 Change-Id: I3ca495b2696747d5323cc7eea4aac4d99e3adfd1 Reviewed-by: David Schulz <david.schulz@qt.io>
* Use more std::chrono and std::chrono_literals namespacesJarek Kobus2024-01-231-1/+2
| | | | | Change-Id: Ib8c83988d7afe35d81b87ff8c5c87eef2082f12d Reviewed-by: hjk <hjk@qt.io>
* 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 <orgads@gmail.com>