aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/python/pythonbuildsystem.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use QString::size() instead QString::length()hjk2025-11-131-1/+1
| | | | | | | Minor gain in debug builds and when stepping. Change-Id: I2540d309661e4babfd7331b068c17657ded2a098 Reviewed-by: David Schulz <david.schulz@qt.io>
* Use Utils::FilePaths instead of QList<Utils::FilePath>Alessandro Portale2025-10-021-1/+1
| | | | | | | And remove unnecessary Utils:: for FilePath[s] in affected files. Change-Id: I3eba81519c22cded8a48a197c7b1a5d7835673f4 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix UI text 2Leena Miettinen2025-10-011-2/+2
| | | | | | | | | | | | - Fix capitalization - Fix punctuation - Replaced '%1' with \"%1\" - Fixed the path to Preferences > Extensions Change-Id: Ib202c9a65b7f8c37efa365ab8901e22709ed60ba Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Avoid calling throwing functionsEike Ziller2025-09-011-1/+1
| | | | | | | | | | | | Result is a std::expected, so Result::value() throws. We don't use or handle exceptions and always explicitly check before accessing, so this is not useful, and static analyzers complain. Use the non-checking and non-throwing operator* and operator-> instead. Change-Id: I03cc9a97fa9f04da557837c2a5076828dcb7d0e0 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* PE: Add convenience function for clearing and removing a TaskChristian Kandeler2025-07-181-4/+1
| | | | | Change-Id: I819cb6ae31bc6f83fffeb9f406108cc4a7b17025 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Python: Prefer issues pane to general messagesChristian Kandeler2025-07-181-8/+24
| | | | | Change-Id: I287cd73cca5c0e366a1e0a2cb39be2d5c69b5038 Reviewed-by: David Schulz <david.schulz@qt.io>
* Utils: Return QString from FilePath::relativePathFromDir()hjk2025-07-151-3/+3
| | | | | | | | | | | | | | | | | | FilePathification went a bit too far there: The result here can only be used in connection to another "anchor" path, and almost all users immediately converted it to a string, one way or the other. So paddle back, and adjust callers. For the few places that wanted to use the native separators in the result, provide FilePath::relativeNativePathFromDir() as the OS cannot be determined from the string alone. Api: Utils::FilePath::relativePathFromDir() returns now QString instead of Utils::FilePath Change-Id: Ide9683989930f960fa19f8e778036abde6801e89 Reviewed-by: David Schulz <david.schulz@qt.io>
* ProjectExplorer: Better separation between project managers and QmlJShjk2025-07-111-14/+9
| | | | | | | | | | | | | | | | | | | | | Previously, individual project managers depended on QmlJS, and for updates they pulled a pre-filled ProjectInfo struct from QmlJS, amended it, and pushed it back. In the new approach, indvidual project managers can add to a similar pre-filled structure from the buildsystem base implementation, after which the base implementation emits a signal containing the data, which is caught by QmlJSTool::ModelManager and there translated into QmlJS's own ProjectInfo struct. Advantage here is that the more of the necessary amending can be done centrally in the new BuildSystem::updateQmlCodeModel() and the indvidual project managers do not have to depend on QmlJS anymore. Change-Id: Ic3fbc55b9e3d980c55ac478bdf5672391214fa7b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* ProjectExplorer: Add convenience overload to TaskHubChristian Kandeler2025-06-251-2/+2
| | | | | Change-Id: I6ad3c6b4b923eaf22458e167554f3b6027e196e2 Reviewed-by: hjk <hjk@qt.io>
* Utils: Make file contents part of TextFileFormat::ReadResulthjk2025-05-091-3/+2
| | | | | Change-Id: I8e54c183b83569b4feeda5627b5fefd6616f4edb Reviewed-by: David Schulz <david.schulz@qt.io>
* Utils: Make TextFileFormat::ReadResult a classhjk2025-04-231-4/+3
| | | | | | | | | | ... containing the previous enum plus an error string, remove the *errorString out-parameter from the static functions and adjust all callers. Change-Id: I9eab8b40cd28492906a1336fc6bab55cf1ae1122 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Replace most expected_str by Utils::Resulthjk2025-04-111-4/+4
| | | | | | | | Keep it in Axivion dto, which is generated. Change-Id: I83a12de6234ac7b0218b369875bdc72d25dbadfb Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Avoid potential detach of non-const Qt containers in range-loops 2/2Alessandro Portale2025-03-241-1/+1
| | | | | | | By using std::as_const Change-Id: I8be5cbdbdd677bd9c6d849f701a7eef95b1c6792 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Add pyproject.toml support for Python projectsJaime Resano2025-03-111-17/+56
| | | | | | | | | | | 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 <hjk@qt.io> Reviewed-by: Jaime Resano <Jaime.RESANO-AISA@qt.io>
* Utils: Simplify FilePath::relativePathFromhjk2025-03-041-3/+3
| | | | | | | | | File system accesses are better avoided at this level, so shift the responsibility of having a directory as anchor to the caller side. Change-Id: Ibca6edcdaaf2f6d24dfaa51bcae401909b77f101 Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix adding duplicated project filesJaime Resano2025-02-131-26/+34
| | | | | | | | | | This patch fixes a bug which occurs when the user adds a file to a project that already belongs to the project. In addition, clang-format was executed in the file. Change-Id: I54e6bca12d3b5a0bcb8442e570bf887f3eec3711 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* ProjectExplorer: Switch BuildSystem to "per build config" approachChristian Kandeler2025-02-111-1/+1
| | | | | | | | - Create BuildSystem object centrally in BuildConfiguration - Remove fallback BuildSystem from Target Change-Id: Iff808a1ea7798180f3675b91f18cb3c66e927b8f Reviewed-by: hjk <hjk@qt.io>
* Python: Remove unneeded BuildSystem constructor and memberChristian Kandeler2025-01-301-18/+1
| | | | | Change-Id: I8e4fcef4278f493c9647a50b2aa4e24750ae63af 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>
* Plugins M-V: Make static QRegularExpression instances static constAlessandro Portale2024-11-201-1/+1
| | | | | Change-Id: I291e61ac30786dfceda330d3dc73352da719c7d0 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Let build systems do renamings in bulkChristian Kandeler2024-09-161-7/+23
| | | | | | | Like for the add and remove operations. Change-Id: I734396b1b0f5a4ffb9cf193a0e32c8f7f60259ae Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Debugger: add python debugger setting in run configurationDavid Schulz2023-12-041-0/+7
| | | | | | Change-Id: Ifa5d72566007e0bb006523433dcef97689677fbf Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Python: Create a default BuildSystem for Python targetsDavid Schulz2023-12-011-0/+10
| | | | | | | | | | 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 <christian.stenger@qt.io>
* Python: use kits page in python wizardsDavid Schulz2023-11-281-4/+17
| | | | | Change-Id: I1f7aaf145443481546abb868c8c167186600b848 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: split buildsystem and project into separate filesDavid Schulz2023-11-141-0/+364
Change-Id: Ic226ff6685cb6657a5e83258aab151754d80b3bf Reviewed-by: Christian Stenger <christian.stenger@qt.io>