summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/project.cpp
Commit message (Collapse)AuthorAgeFilesLines
* CMakeProjectManager: Add lib and app binaries to project treeChristian Kandeler2023-03-211-3/+14
| | | | | | | Task-number: QTCREATORBUG-28815 Change-Id: I58ebcd2a6935eb4b6746b5fd58e6ab8b97fdef43 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* QmakeProjectManager: Add lib and app binaries to project treeChristian Kandeler2023-03-201-1/+0
| | | | | | | | Task-number: QTCREATORBUG-28815 Change-Id: I4a3bbab54ce4f5cf6553d61f50b047f63b88cfa3 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* ProjectExplorer: Add functionality for mapping source files to binariesChristian Kandeler2023-03-161-11/+36
| | | | | | | | | Works out of the box with qbs. cmake and qmake need backend adaptations. Task-number: QTCREATORBUG-28815 Change-Id: I0238416a23c1574bc2b6121e2ef942a9260d94d9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
* ProjectExplorer: Add infrastructure for source -> binary mappingChristian Kandeler2023-03-161-0/+77
| | | | | | | Task-number: QTCREATORBUG-28815 Change-Id: Ib692981e92f5a395dbe400c2cd48042479f12c78 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: David Schulz <david.schulz@qt.io>
* ProjectExplorer: Move some not-fully-session related bitshjk2023-03-011-12/+34
| | | | | | | | | | | | | | | ... out of SessionManager. The idea is to later move SessionManager into the Core plugin, which both is sensible conceptually and also prerequisite to merge the Bookmark plugin into TextEditor plugin. Currently, only the interface is split, as the load/save implemetations are non-mechanical to disentangle. Change-Id: I31631db3094ea192825a2ccaa6add6188662940b Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Utils: Add FilePath::copyRecursivelyMarcus Tillmanns2023-01-251-4/+3
| | | | | | | Change-Id: I0cb07158906a5e163ea35670f46f3b4fd9ec40b8 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* ProjectExplorer: Tr::trhjk2023-01-161-26/+27
| | | | | Change-Id: I8f1b463c5cc7a53627f7a9ad261998b92f13e56a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* MacroExpander: Generalize registration of project variablesEike Ziller2023-01-091-0/+125
| | | | | | | | | | We provide global macros for ActiveProject and CurrentDocument:Project, but these were completely separate, and the CurrentDocument:Project one comparatively incomplete. Unifiy them. Change-Id: I2622012f2c760e9f5b328766eca9d64c0bf9c5b1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* 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>
* ProjectExplorer: Add infastructure for build system specific generatorsChristian Kandeler2022-12-151-1/+11
| | | | | | | | Task-number: QTCREATORBUG-28149 Change-Id: I95c5657db5d551bc5708b755418f27ebfb08a6ee Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Add "Generate" sub-menu to build menuChristian Kandeler2022-12-081-0/+23
| | | | | | | | Preparation for adding more generators. Task-number: QTCREATORBUG-28149 Change-Id: I4afa183a6fbd8ee88fc978b382f28cf9e52f09e9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Remove FilePath::operator+()hjk2022-11-301-2/+2
| | | | | | | | | This was a alias for .stringAppended(), but can be used too easily when .pathAppended() is meant. Change-Id: Ia3b64d39828d4074b43d87c923ce3a6a87038948 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* QmlJS: Fix Follow under cursorMarcus Tillmanns2022-11-081-0/+4
| | | | | | | | | | | | | | | | | | | | 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>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-3/+3
| | | | | | | | | | | | | | 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>
* Code cosmeticshjk2022-06-241-0/+2
| | | | | | | | | | 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>
* ProjectExplorer: Move makeInstallCommand()hjk2022-06-131-15/+0
| | | | | | | | | ... from Project to BuildSystem. More direct and less use of Target::activeBuildConfiguration(). Change-Id: I148381d23be0f9ab0750ed1440e1b2b3e25aded0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Use FilePath in installRoot machineryhjk2022-06-101-2/+2
| | | | | | | Helps to get path delimiters right. Change-Id: Ifaab593a530c667488b7b5e6546041d8c212ece8 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ProjectExplorer: Use CommandLine in MakeInstallCommandhjk2022-06-101-2/+3
| | | | | | | Instead a FilePath/QStringList pair. Change-Id: I55340795266699e448ec1e17681a5e788eaae37a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ProjectExplorer: Make BuildSystem:Name variable availableChristian Kandeler2022-06-031-1/+2
| | | | | | | | ... for use in the default build dir template. Task-number: QTCREATORBUG-26147 Change-Id: I1a32d60e0d5e2db514ac315c48c615c55ccda51f Reviewed-by: hjk <hjk@qt.io>
* Do not enter edit mode when opening a .qmlproject as QDSThomas Hartmann2022-02-071-0/+5
| | | | | | | | | | | | If the user opens a .qmlproject in QDS mode we do not want to enter the edit mode by default. We check the startup project after opening and calling openEditMode() will determine if we keep the default of opening the edit mode or not. Change-Id: Ic8a7fbefa007d487ec680099544c07fe007c0b29 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* ProjectExplorer: Prevent cascading "Replacement for" kit namesChristian Kandeler2021-10-201-2/+3
| | | | | | Fixes: QTCREATORBUG-26330 Change-Id: Id7abd00afb70fe2d2e3c1a43e2ea1298c0ff20cc Reviewed-by: David Schulz <david.schulz@qt.io>
* Don't call DocumentManager::addDocument() from non-main threadJarek Kobus2021-10-201-1/+2
| | | | | | | | | | | | | | | | | | | | Detect that constructor of ResourceTopLevelNode is being run from non-main thread and omit creation of ResourceFileWatcher in this case. The construction of ResourceFileWatcher will be postponed until the node tree returns back to the main thread. This happens later inside Project::setRootProjectNode() when ProjectTree::applyTreeManager() is called for the second time - this time it's done from the main thread. In order to setup the lacking resource file watchers we install an additional folder node visitor only in case when the handler is called from main thread. The visitor sets up the lacking resource watchers if that's still needed. Amends: 0bcab32657f1511892eda53194dce259e40edf21 Fixes: QTCREATORBUG-26417 Change-Id: Ia1bfb7f284afb833b6b4291accc4d0a91bd0d6c5 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix build with C++20Eike Ziller2021-10-191-1/+1
| | | | | | | | | | | "erase" without namespace conflicts with std::erase, with the latter taking precedence. Amends 9929d3dd7332ae6509e53c60d60b7f053e7ec92f Fixes: QTCREATORBUG-26386 Change-Id: I7fa64827ad61f1da262ce48082854975bc431c69 Reviewed-by: Christian Kandeler <christian.kandeler@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: prevent using QFileInfo on remote pathsDavid Schulz2021-09-091-1/+1
| | | | | Change-Id: Icf5dc9a80af69e8e1c3d733847e227486fa8c897 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: De-noise project.cpphjk2021-08-261-147/+129
| | | | | | | Namespaces, some inlining. Change-Id: Ib6e8e0440e69492c1f486ae0358d8d59bafbfefb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Streamline access to buildDirectoryTemplate datahjk2021-08-241-6/+4
| | | | | | | There's only one kind of use, in the context of BuildConfiguration. Change-Id: I09628ff443ef08e28738125a614c17d5d979189b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Pass dialog parent to Utils::* file dialoghjk2021-08-171-0/+1
| | | | | | | | | | | | | Amends 3edc5673b58e55. Turns out quite a few potential uses have other parents than ICore::dialogParent(). Use a nullptr parent to mean ICore::dialogParent() to keep the caller side simple. Change-Id: Icfe1daafd710ae273d286679e0c8e2a3a27da552 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Introduce a FilePath constructor from char arrayshjk2021-08-171-2/+2
| | | | | | | | | | | | Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for decorations in user code. At the same time, drop some convenience constructors and functions in CommandLine and Icon essentially serving the same purpose. Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Use the new file dialog wrappers in some placeshjk2021-08-061-6/+4
| | | | | Change-Id: I326c883f2f76593e6fcb0f3e376d387273312982 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Use FilePath in ProjectExplorer::openProject{,s}()hjk2021-07-271-2/+1
| | | | | Change-Id: Ibfb7ab5ef7226b85452bd37b840408708935453b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectTree: Improve performance of finding nodesEike Ziller2021-07-141-1/+1
| | | | | | | | | | Using projectNode->forEachGenericNode(...) to find a node is much slower than using project->nodeForFilePath(...), since the latter uses a binary search. Fixes: QTCREATORBUG-25845 Change-Id: I91be577a11b03915d1f21fe86a4cdd9ab0381f51 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Project: Remove knowsAllBuildExecutables featureCristian Adam2021-07-011-11/+0
| | | | | | | | | | This is feature is no longer needed. Change-Id: Ia0798402fcb4c06fb4dd38225359738306211176 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alexis Jeandet <alexis.jeandet@member.fsf.org> Reviewed-by: hjk <hjk@qt.io>
* Avoid registering individual files for watchingEike Ziller2021-06-111-3/+6
| | | | | | | | | | | if we can do it en bloc. This reduces the freeze happening after loading a project, at least on macOS with QFSEventsFileSystemWatcher, which doesn't like getting 1000 files added one by one. Task-number: QTCREATORBUG-25783 Change-Id: I2d508ac3334520cb8805a2179d42b86c9ba840d6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Core: Add FilePath based overloads to EditorManager::openEditor{,at}hjk2021-05-251-1/+1
| | | | | | | | | | Part of the overall FilePath migration. Keep the original version for a while to allow using code to catch up. Change-Id: Ia7c5ea14416a06e679e8661c0e4045981db87b9b Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Revert "Revert "Merge remote-tracking branch 'origin/4.15'""Eike Ziller2021-05-071-0/+18
| | | | | | | | | | | This reverts commit f0a86d45104f585b7aeef07fcc68cea24061aedb. Reverting a merge doesn't "undo" it - the changes would be lost forever even with subsequent merges. So we need to revert the revert to get the changes. Change-Id: I65928f876f4dc886561bed17c4b2aa42b388c1e3 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
* Revert "Merge remote-tracking branch 'origin/4.15'"Marco Bubke2021-05-061-18/+0
| | | | | | | | | This reverts commit 888ca0dd20ff647970fc85340e108cfa34d78c3a. Reason for revert: wrong patchset Change-Id: I1291789938601aaf606c59917ff938e3c24c78dd Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Merge remote-tracking branch 'origin/4.15'Tim Jenssen2021-05-061-0/+18
|\ | | | | | | | | | | | | | | Conflicts: src/libs/sqlite/sqlitebasestatement.h src/plugins/qmldesigner/qmldesignerplugin.cpp Change-Id: I0fa0a8a7feffed24c0d2bc26eca86590f1156755
| * ProjectExplorer: Enable to easily check if a project has dirty filesTapani Mattila2021-05-051-0/+18
| | | | | | | | | | | | | | Task-number: QDS-4241 Change-Id: I2fec5f411cdff9fabfa31bbd73971c0308df0783 Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Prevent target switch on project that's to be removedChristian Kandeler2021-05-061-1/+71
|/ | | | | | | | | | | | Switching targets starts up a lot of machinery that is undesired for a project that's going away. The same goes for switching build configurations on a target that is being removed. Fixes: QTCREATORBUG-25655 Change-Id: I0cb6e395cca8f89bfeb70fcdf571bbcb64f94247 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QmakeProjectManager: Fix possible crash on project document reloadChristian Kandeler2021-04-131-0/+19
| | | | | | | | | ... while a parse is going on. Fixes: QTCREATORBUG-25137 Change-Id: I02a914332ef120caee044139581e1901b4537bff Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Aspects: Remove some more default valuesOrgad Shaneh2020-11-101-1/+2
| | | | | Change-Id: Iadee8b8f1eeb3ff009a667d45a51f6f5a94329ca Reviewed-by: hjk <hjk@qt.io>
* Project explorer: Fix UI textLeena Miettinen2020-11-091-1/+1
| | | | | | | | Fix punctuation. Task-number: QTCREATORBUG-24873 Change-Id: I5cc5e80915b891efa2cd2268e3302feb39b7a576 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* projectexplorer: avoid crash if recovery of kit failsFawzi Mohamed2020-09-291-0/+1
| | | | | Change-Id: I8bf3a24b1485da2bfd1eb13e61c2712b66b30a70 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmakeProjectManager: Fix crash on reparsingChristian Kandeler2020-09-281-1/+6
| | | | | | | | | | | | | After a re-parse, the existing IDocuments need to be updated with the new QmakePriFile object, as the old one may no longer be valid and thus cause a crash on the next re-parse. Amends f3bd07efd1. Fixes: QTCREATORBUG-24683 Change-Id: Ib03d3005cb7831f1e05cb116aa3cdfe6cf5e72ad Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Remove replacement kitsChristian Kandeler2020-09-211-0/+1
| | | | | | | | | ... for which the original kit has turned up again. Otherwise we'd have more than one kit with the same id. Fixes: QTCREATORBUG-24589 Change-Id: I7ce16615694d3d2c5a5441f676ecb7dc85c2239c Reviewed-by: David Schulz <david.schulz@qt.io>
* QmakeProjectManager: Restore incremental re-parsingChristian Kandeler2020-09-151-4/+23
| | | | | | | | | | | This was broken in commit 37aecdd112, where we overlooked that a special type of IDocument was used that triggers a re-parse of only the affected part of the project tree. As a result, all changes to a .pri or .pro file would trigger a re-parse of the entire project. Fixes: QTCREATORBUG-24572 Change-Id: I480cff4e53cf86a17e1eaac0eb9b32901bc87051 Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/qds-1.59' into 4.13Tim Jenssen2020-08-131-0/+15
|\ | | | | | | Change-Id: Ic720f3adab305c5ef8cd10e713ccabf510eff0c0
| * projectexplorer: add availableQmlPreviewTranslations()Tim Jenssen2020-07-151-0/+15
| | | | | | | | | | | | | | Preparation for a test translations feature. Change-Id: I1a7ccecab803f5838cd765b7dca99bcf5bb9e8a1 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>