summaryrefslogtreecommitdiff
path: root/src/plugins/python/pythonproject.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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 <eike.ziller@qt.io>
* 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: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* 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 <christian.stenger@qt.io>
* 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 <hjk@qt.io>
* 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 <eike.ziller@qt.io>
* Python: Convert to Tr::trhjk2022-07-211-16/+15
| | | | | | Change-Id: I0241053b0d51dbb1a60c43351cbff543fd52573d Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Drop Qt5: ProjectExplorer: Get rid of QOverloadJarek Kobus2022-07-201-1/+1
| | | | | | Change-Id: Id8b28efa7b31a92a5e24485803322c586a23802d Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* 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 <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* 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 <christian.stenger@qt.io>
* Python: only add python files as targetsDavid Schulz2022-06-241-1/+2
| | | | | Change-Id: I21f0ca6035aed6306d6cbe55a6c6df0838e49f45 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* 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 <christian.stenger@qt.io>
* Remove algorithm.h from buildtargetinfo.hJarek Kobus2022-05-181-0/+1
| | | | | | | Change-Id: I777212fb94d46c1c71f017288b7e38dd5db62a91 Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Python: add pyside build configurationDavid Schulz2022-05-031-1/+0
| | | | | | Task-number: QTCREATORBUG-27219 Change-Id: I19340c57789933c7104ec5d6fec628ed810c5f3e Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Python: Use relative file path as run config nameDavid Schulz2022-03-231-0/+1
| | | | | | Change-Id: Ifac28b9e4b066ea62b43a7da04b71e2c4317a898 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* 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 <hjk@qt.io>
* ProjectExplorer: Use FilePaths in project tree nodeshjk2021-07-161-10/+10
| | | | | Change-Id: I31b15c428d9b962333947b1e32641fd80f61d069 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Core: filepathify file renamingDavid Schulz2021-06-171-4/+6
| | | | | | Change-Id: I3d4f39e34e65cde3df7b7c19570e3a54d0625d53 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io>
* Core: filepathify expected document changesDavid Schulz2021-06-171-3/+4
| | | | | Change-Id: Ifa9341e55c79459db9ecef3c441da9b2816695bf Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: add FilePath::completeBaseNameDavid Schulz2021-06-041-2/+2
| | | | | | | Removing some FilePath::toFileInfo() calls again. Change-Id: I6610beebf2c30754fde525b71f4c4a34ceb5e30b Reviewed-by: hjk <hjk@qt.io>
* Utils: filepathify fileutilsDavid Schulz2021-05-181-2/+2
| | | | | Change-Id: Ic9048369f64d793f5f567cdb0c715488fb5a4ff6 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* 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 <jaroslaw.kobus@qt.io>
* 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 <cristian.maureira-fredes@qt.io> Reviewed-by: hjk <hjk@qt.io>
* 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 <cristian.maureira-fredes@qt.io> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: hjk <hjk@qt.io>
* Add qmlImportPaths property to .pyproject fileAlexander Mishin2020-09-221-35/+84
| | | | | | | | | | | Users should be able to add custom QML import paths for Python/PySide2/PyQt5 projects in Qt Creator in order to get syntax highlighting and code completion for custom QML modules. Fixes: QTCREATORBUG-23679 Change-Id: Iec7c691c4b8709c48a790cd27ac7c6e755967796 Reviewed-by: hjk <hjk@qt.io>
* More QRegularExpression and include for Qt 6hjk2020-06-251-5/+6
| | | | | | Task-number: QTCREATORBUG-24098 Change-Id: Ia537e26efd3f37319c38d906e569b255768371f9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Use dialogParent() instead of mainWindow()Eike Ziller2020-06-021-3/+3
| | | | | | | | | | There are very few reasons to use mainWindow() directly. Especially for modal dialogs, using dialogParent() is important, since that guarantees the stacking order in case of other dialogs currently being open. Change-Id: I7ad2c23c5034b43195eb35cfe405932a7ea003e6 Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.11'Orgad Shaneh2019-12-071-7/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs qtcreator_ide_branding.pri src/plugins/mcusupport/mcusupportrunconfiguration.cpp src/plugins/python/pythonproject.cpp src/plugins/qmakeprojectmanager/qmakestep.cpp src/plugins/qmlprojectmanager/qmlproject.cpp src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp Change-Id: I22507be28fd80c49c9fee0dff5937a40db176a82
| * Make resources of Python projects accessible from Qt DesignerFriedemann Kleint2019-11-301-2/+16
| | | | | | | | | | | | | | | | Set node types for the various file types. Fixes: QTCREATORBUG-23248 Change-Id: I0ce01f70103cf79fd6f8d07119cda7922367595c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
* | ProjectExplorer: Introduce and use a Target::buildSystemUpdated signalhjk2019-11-211-0/+2
| | | | | | | | | | Change-Id: I497d46866146600a1ed9162bd720c574ee4d4769 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Introduce per-buildsystem setRootProjectNodehjk2019-11-211-1/+1
| | | | | | | | | | | | | | | | Currently diverting to the original Project::setRootProjectNode. Idea is to focus on the BuildSystem <-> generated tree relation. Change-Id: I8b20173e364713f0919cf4f8b76a2f79ef8770bb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Move BuildSystem owership to BuildConfigurationhjk2019-11-191-29/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... or Target. This patch moves build system from conceptually "one per project" to "one per target (i.e. per project-and-kit)" or "per BuildConfigurations" for targets where the builds differ significantly. Building requires usually items from the kit (Qt version, compiler, ...) so a target-agnostic build is practically almost always wrong. Moving the build system to the target also has the potential to solve issues caused by switching targets while parsing, that used Project::activeTarget() regularly, with potentially different results before and after the switch. This patch might create performance/size regressions when several targets are set up per project as the build system implementation's internal data are duplicated in this case. The idea is to fix that by sharing per-project pieces again in the project implementation once these problems occur. Change-Id: I87f640ce418b93175b5029124eaa55f3b8721dca Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Python: Restrict creating run configurationsChristian Stenger2019-11-151-5/+11
| | | | | | | | | | | | | | | | | | Some upcoming wizards will have other files beside python scripts. (e.g. qml, ui) Ensure that these files do not get a run configuration. Change-Id: I0fe55edc6ccfe2db64537401e6a46fd4bdd7e153 Reviewed-by: hjk <hjk@qt.io>
* | ProjectExplorer: Use a functor for BuildSystem creationhjk2019-10-251-4/+4
| | | | | | | | | | | | | | | | | | | | ... instead of creating the BuildSystem direct. This will help the shift of BuildSystem owner ship as a Project will have potentially multiple BuildSystem instances (one per BuildConfiguration), but still be responsible for creating them with the Targets. Change-Id: I2dd71c7687ed41af9e42c874b3f932ce704e7ee3 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Qbs, Qmake, Python, Generic: Introduce BuildSystem derived classeshjk2019-10-251-56/+75
|/ | | | | | | | | | | | ... and move context menu action handling there. This is a temporary measure to be able to move that functionality alongside the actual BuildSystem to the BuildConfiguration. There is a lot to be cleaned up left, to keep the patch small. Change-Id: If4b0820a13b376fc97b70785052924972ce22705 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Python: Remove unused functionChristian Stenger2019-09-171-10/+0
| | | | | Change-Id: If464646dfad66a1afabb9b5b9c6366a35597f370 Reviewed-by: David Schulz <david.schulz@qt.io>
* Python: extract PythonRunConfiguration and PythonProjectDavid Schulz2019-09-171-0/+454
Change-Id: I4ff0f43fdb8beb9a7f2f7816197de0c796da8d89 Reviewed-by: Christian Stenger <christian.stenger@qt.io>