aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonproject.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ProjectExplorer: Rename Project::id() to Project::type()hjk2025-07-171-1/+1
| | | | | | | | | | | id() gives the (wrong) impression that this is something specific to a particulart project instance. Api: Project::id() -> Project::type() Project::setId() -> Project::setType() Change-Id: If19da9f3d49846818e635fb9a694771d9fa724a5 Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Make build system name available in ProjectChristian Kandeler2025-03-121-1/+1
| | | | | | | | | There is a one-to-one correspondence between the types of Project and BuildSystem, so we shouldn't need access to a BuildSystem object to get at the build system name. Change-Id: Ic09c58e42e609d5db8cbf9f85bbe87d1ec3221c2 Reviewed-by: hjk <[email protected]>
* Add pyproject.toml support for Python projectsJaime Resano2025-03-111-2/+2
| | | | | | | | | | | This patch adds support for the standard Python project configuration file: pyproject.toml. It is intended to replace *.pyproject files. Task-number: QTCREATORBUG-22492 Task-number: PYSIDE-2714 Change-Id: I783ee7b49be23c61b0a501ef9bbd722cc652ad14 Reviewed-by: hjk <[email protected]> Reviewed-by: Jaime Resano <[email protected]>
* ProjectExplorer: Allow to retrieve project-specific kit issuesChristian Kandeler2025-02-171-10/+0
| | | | | | | | | | ... without a Project object. Otherwise, we cannot show these issues in the wizard's target setup page, which is an annoying inconsistency. Task-number: QTCREATORBUG-32490 Change-Id: I1b654961ad92c44f7219af5c06fab773834b2667 Reviewed-by: Christian Stenger <[email protected]>
* ProjectExplorer: Switch BuildSystem to "per build config" approachChristian Kandeler2025-02-111-0/+1
| | | | | | | | - Create BuildSystem object centrally in BuildConfiguration - Remove fallback BuildSystem from Target Change-Id: Iff808a1ea7798180f3675b91f18cb3c66e927b8f Reviewed-by: hjk <[email protected]>
* Python: Remove unneeded BuildSystem constructor and memberChristian Kandeler2025-01-301-2/+0
| | | | | Change-Id: I8e4fcef4278f493c9647a50b2aa4e24750ae63af Reviewed-by: David Schulz <[email protected]>
* ProjectManager: Simplify Project::setBuildSystemCreator()Jarek Kobus2024-07-161-1/+1
| | | | | | | Make it a template method. Change-Id: I3f0510c89d7f0bfe2f814dadc4d8de01c0e1cc89 Reviewed-by: Christian Kandeler <[email protected]>
* Translations: Fix various \n, full stops, spacesEike Ziller2024-04-181-3/+2
| | | | | | | | Add missing full stops, remove space at beginning and end, remove end lines at end Change-Id: I4ce28f578e13e100dcfbd8ef70630462faf407fc Reviewed-by: Leena Miettinen <[email protected]>
* Python: Fix capitalization of Python in UI textLeena Miettinen2024-02-271-1/+1
| | | | | | | Change-Id: I55beeb658eb583a74c4d79f3dc2f121010080101 Reviewed-by: <[email protected]> Reviewed-by: David Schulz <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
* Python: Wrap some file paths and kit name with quotesEike Ziller2024-02-261-2/+3
| | | | | Change-Id: If147eae864013d410239d69184cdb9a4bc4479eb Reviewed-by: Leena Miettinen <[email protected]>
* Python: optimize loading projectsDavid Schulz2023-12-111-8/+7
| | | | | | | | | 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 <[email protected]>
* Python: Create a default BuildSystem for Python targetsDavid Schulz2023-12-011-0/+2
| | | | | | | | | | This makes sure the project can be parsed even if we do not have a valid build configuration for that target. Amends 09e94ae4ac040ad313b7b86e62489dee7cd3804a Change-Id: I92214474f581af228bd5c2aaf2f3e4b620ffc9d5 Reviewed-by: Christian Stenger <[email protected]>
* Python: use kits page in python wizardsDavid Schulz2023-11-281-4/+2
| | | | | Change-Id: I1f7aaf145443481546abb868c8c167186600b848 Reviewed-by: Christian Stenger <[email protected]>
* Python: split buildsystem and project into separate filesDavid Schulz2023-11-141-410/+15
| | | | | Change-Id: Ic226ff6685cb6657a5e83258aab151754d80b3bf Reviewed-by: Christian Stenger <[email protected]>
* Merge remote-tracking branch 'origin/11.0'Eike Ziller2023-09-201-1/+2
|\ | | | | | | Change-Id: I397dde2f95f62eb4843c39dd861522ae63d7f2c9
| * Python: add build target infos for .pyw filesDavid Schulz2023-09-191-1/+2
| | | | | | | | | | Change-Id: I7f36fb14f79edf69f043b0ac566c9493e043c6f1 Reviewed-by: Christian Stenger <[email protected]>
* | Utils: Rename the new Storage to Storehjk2023-08-241-1/+1
| | | | | | | | | | | | | | | | | | Apparently that's what the young people on the web use for such a thing. Change-Id: I75d5396ff3cb3c26efd6008b5f2261354c4f7896 Reviewed-by: Marcus Tillmanns <[email protected]> Reviewed-by: Jarek Kobus <[email protected]> Reviewed-by: <[email protected]>
* | Use Utils::Storage instead of QVariantMap in a few placeshjk2023-08-231-1/+1
| | | | | | | | | | Change-Id: I02833cf2bc3caaadc22ff93ae530e4aebe4c3868 Reviewed-by: Marcus Tillmanns <[email protected]>
* | Fix occurrences of the contains/insert anti-patternChristian Kandeler2023-06-231-6/+3
|/ | | | | | | | | Introduce and make use of Utils::insert() for QSet with a return value that indicates whether insertion actually happened. Change-Id: I655e4bc3553b74fea5ae8956205e4d8070118d63 Reviewed-by: hjk <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
* Python: preserve sorted state of project filesDavid Schulz2023-06-151-0/+9
| | | | | Change-Id: I77cd9d9bac93a04d0e30beda8541862a1cd5371f Reviewed-by: Christian Stenger <[email protected]>
* Python: exclude the project file from the list of files to saveDavid Schulz2023-06-141-11/+12
| | | | | | | | Amends 8d733f95e68b25003ea14906379750870bdd37ec Change-Id: Ia9d1f29dd85a9560f4fe4e808cba625f1b24ad2c Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: David Schulz <[email protected]>
* Python: simplify project file savingDavid Schulz2023-06-091-44/+18
| | | | | | | | | | | use QJsonDocument to save the new style project files. This improves the formatting and prevents replacing the newly introduced qml import path field. Also used FilePath::fileContents/writeFileContents to support remote projects. Fixes: QTCREATORBUG-28541 Change-Id: Ie614726b6775dad2361437dc5d410438c7d01141 Reviewed-by: hjk <[email protected]>
* Python: Use FilePath for absolute paths to project filesDavid Schulz2023-06-091-84/+62
| | | | | | Change-Id: Ied4db237fe6a3b9532fced7c575a8a3717b405fc Reviewed-by: <[email protected]> Reviewed-by: hjk <[email protected]>
* Python: use the system environment of the project dirDavid Schulz2023-06-091-2/+2
| | | | | | | to expand variables in the python project files. Change-Id: Iff8d2445bad9a7ae15e720b65ac5c894c8efdb02 Reviewed-by: hjk <[email protected]>
* Python: unify reading project filesDavid Schulz2023-06-091-12/+12
| | | | | | | | Also support remote file paths for old style project files and do not change order of files in the new project file. Change-Id: I49b0781b26ca33b605aef674a04ee676f1848986 Reviewed-by: hjk <[email protected]>
* Python: support remote file paths when loading projectsDavid Schulz2023-06-061-6/+5
| | | | | Change-Id: I94f709275d3b226685439ac55d58b029d3323d12 Reviewed-by: hjk <[email protected]>
* Python: filepathify python project path for savingDavid Schulz2023-06-061-13/+12
| | | | | Change-Id: Ibcea9de6c8844cb826b61aa40357890153923854 Reviewed-by: hjk <[email protected]>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | 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 <[email protected]>
* QmlJS: Fix Follow under cursorMarcus Tillmanns2022-11-081-1/+2
| | | | | | | | | | | | | | | | | | | | When trying to jump to a symbol in a qml file the Qml Model may find the location in a generated .qml file in the build folder. QtCreator searches in all generated .qrc files to try and find the source file so it can jump to it instead. Previously not all auto-generated ".rcc" folders would be found as only the folders of targets (executables) were searched. Plugins or Static Libraries were not searched. With this fix, all projects nodes are searched for the ".rcc" folder and therefore also finds them for Dynamic / Static libraries and plugins. Fixes: QTCREATORBUG-27173 Change-Id: Ic51ac8fbc82c15785cbefd76787942a512ecf3db Reviewed-by: <[email protected]> Reviewed-by: hjk <[email protected]>
* Python: trigger parse in build system creatorDavid Schulz2022-10-201-1/+1
| | | | | | | | Otherwise we do not have any app targets for the python run configuration after a kit setup. Change-Id: Ib7648a72280a1d68246c11139775a23366fda286 Reviewed-by: Christian Stenger <[email protected]>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-2/+2
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-08-261-24/+2
| | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Task-number: QTBUG-67283 Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813 Reviewed-by: Eike Ziller <[email protected]>
* Python: Convert to Tr::trhjk2022-07-211-16/+15
| | | | | | Change-Id: I0241053b0d51dbb1a60c43351cbff543fd52573d Reviewed-by: Eike Ziller <[email protected]> Reviewed-by: <[email protected]>
* Drop Qt5: ProjectExplorer: Get rid of QOverloadJarek Kobus2022-07-201-1/+1
| | | | | | Change-Id: Id8b28efa7b31a92a5e24485803322c586a23802d Reviewed-by: Eike Ziller <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>
* Code cosmeticshjk2022-06-241-0/+1
| | | | | | | | | | Mostly unused #include's, also sort them or reduce scope. A few namespaces, ... Change-Id: I9ee71e07de7157c9942125672addf87dd41e78f1 Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: hjk <[email protected]>
* Python: improve initializing python run configurationDavid Schulz2022-06-241-0/+1
| | | | | | | | Sets main.py as the default script. If we cannot find a main.py we create a runconfig for every py file in the project. Change-Id: I93f4c9a5c9e2825a592eee3707439e69a8aea566 Reviewed-by: Christian Stenger <[email protected]>
* Python: only add python files as targetsDavid Schulz2022-06-241-1/+2
| | | | | Change-Id: I21f0ca6035aed6306d6cbe55a6c6df0838e49f45 Reviewed-by: Christian Stenger <[email protected]>
* Python: add pyside uic extra compilerDavid Schulz2022-06-021-1/+0
| | | | | | | | | | | 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 <[email protected]>
* Remove algorithm.h from buildtargetinfo.hJarek Kobus2022-05-181-0/+1
| | | | | | | Change-Id: I777212fb94d46c1c71f017288b7e38dd5db62a91 Reviewed-by: Cristian Adam <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: <[email protected]>
* Python: add pyside build configurationDavid Schulz2022-05-031-1/+0
| | | | | | Task-number: QTCREATORBUG-27219 Change-Id: I19340c57789933c7104ec5d6fec628ed810c5f3e Reviewed-by: Christian Stenger <[email protected]>
* Python: Use relative file path as run config nameDavid Schulz2022-03-231-0/+1
| | | | | | Change-Id: Ifac28b9e4b066ea62b43a7da04b71e2c4317a898 Reviewed-by: <[email protected]> Reviewed-by: Christian Stenger <[email protected]>
* ProjectExplorer: Give build systems a nameChristian Kandeler2021-09-091-0/+1
| | | | | | | | ... and make it accessible through a variable. Fixes: QTCREATORBUG-26147 Change-Id: I0601c09a74360b91fe8421876207a8f4ae9d75b6 Reviewed-by: hjk <[email protected]>
* ProjectExplorer: Use FilePaths in project tree nodeshjk2021-07-161-10/+10
| | | | | Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069 Reviewed-by: Christian Stenger <[email protected]>
* Core: filepathify file renamingDavid Schulz2021-06-171-4/+6
| | | | | | Change-Id: I3d4f39e34e65cde3df7b7c19570e3a54d0625d53 Reviewed-by: Christian Stenger <[email protected]> Reviewed-by: David Schulz <[email protected]>
* Core: filepathify expected document changesDavid Schulz2021-06-171-3/+4
| | | | | Change-Id: Ifa9341e55c79459db9ecef3c441da9b2816695bf Reviewed-by: Christian Stenger <[email protected]>
* Utils: add FilePath::completeBaseNameDavid Schulz2021-06-041-2/+2
| | | | | | | Removing some FilePath::toFileInfo() calls again. Change-Id: I6610beebf2c30754fde525b71f4c4a34ceb5e30b Reviewed-by: hjk <[email protected]>
* Utils: filepathify fileutilsDavid Schulz2021-05-181-2/+2
| | | | | Change-Id: Ic9048369f64d793f5f567cdb0c715488fb5a4ff6 Reviewed-by: Eike Ziller <[email protected]>
* Use qAsConst with non-const Qt containers in range-loopsAlessandro Portale2021-02-171-1/+1
| | | | | | | ... in various places Change-Id: Ic6c0c1b9437a1ed402105c7a14a1f5f9454a68d4 Reviewed-by: Jarek Kobus <[email protected]>
* Python: Be less disrupting with the messages paneEike Ziller2020-12-171-3/+3
| | | | | | | | | Only pop it open directly after explicit interaction Task-number: QTCREATORBUG-24430 Change-Id: I55025a901cb3d694994614bae21204ab9da49fc0 Reviewed-by: Cristian Maureira-Fredes <[email protected]> Reviewed-by: hjk <[email protected]>
* Python: Do not pretend being C++Christian Stenger2020-12-031-1/+1
| | | | | | | | | | This avoids checking the debugger engine on Windows which may fail when using a wrong kit. Change-Id: I427281f6749cbccc3d3d85f6bdafa0138e1d54f0 Reviewed-by: Cristian Maureira-Fredes <[email protected]> Reviewed-by: David Schulz <[email protected]> Reviewed-by: hjk <[email protected]>