aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/project.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ProjectExplorer: remove confusing function from ProjectDavid Schulz2024-05-021-14/+1
| | | | | Change-Id: Ifaed5d8293dadd2ae3cfdab3b027434d4f8caa3e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Do not use original ID when creating kit for vanished targetEike Ziller2024-03-131-3/+1
| | | | | | | | | | | | | | If we use the same ID for the new kit as for the original, we get into problems if the original kit re-appears. This can happen when uninstalling a Qt version with the online installer, and later re-installing it. Or when changing the install settings path to a different online installation and back again via the command line or the "Link with Qt" functionality. Change-Id: Id99a3560ebed6264ad13dab5ff48945b30a8229f Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Rename NameValueItem to EnvironmentItem (1/2)hjk2024-02-141-2/+2
| | | | | | | Only used in Environments nowadays. Change-Id: I64a645ebebd5cb57c50d5d8f72a5e4dba40e122f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Move plugin unit tests definition to new classhjk2024-02-061-13/+18
| | | | | | | | This removes it from the central public header. Change-Id: Icf1c552f9136a2e262e1bc48ae164b2fdd8edc79 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Rename a few more ToolChain items to Toolchainhjk2024-01-231-1/+1
| | | | | Change-Id: I78e12e6923242fcb72cdde6284185574b8792fc6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Do not create replacement kits automaticallyEike Ziller2024-01-121-24/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead keep a list of "vanished targets". These are shown in Projects mode in a separate list under the list of kits. Via the context menus of those items (or with single-click), the user can choose to either copy the steps of the vanished target to another kit (already configured or not), or to create a new replacement kit for it (similar to the previous replacement kits, with the same device type and the steps restored, but no other parameters from the kit restored - the project doesn't save that information), or remove them. The vanished targets are not removed from the project's settings as long as the user doesn't create a kit or copy the steps, so if the kit re-appears on a later run of Qt Creator, the original target is restored for that kit and the entry in the "vanished targets" list automatically vanishes. This has the advantage that in contrast to the replacement kits, the vanished targets are clearly separate from "normal" kits, and that they are local to the project. Nothing is left behind after closing the project. Change-Id: Iccec04fea38cd55ff683665c9cf4edc9a2388c82 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* ProjectExplorer: Some more ToolChain->Toolchain renamingshjk2023-12-121-2/+2
| | | | | Change-Id: I5cb2adf544a846f45f7fe7ce60f67b10ad100d91 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Rename ToolchainManager signals and membershjk2023-11-271-1/+1
| | | | | Change-Id: I5195cb785f91dbaafdeeb8bb8c71939a6e3ff9e5 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Rename ToolChainManager to ToolchainManagerhjk2023-11-271-2/+2
| | | | | | | Plus the private and some comments. Change-Id: I95d72d77f25cb1c969a1a6148e7186150a697d1f Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Rename Tool{C,c}hainKitAspecthjk2023-11-271-2/+2
| | | | | | Change-Id: I74460b6402ab00f972c208023f03fac617982a11 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* ProjectExplorer: add function to setup a single BuildInfoDavid Schulz2023-11-231-20/+25
| | | | | Change-Id: I418c7bae6a1519126b75b6ce535379facc332062 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Revert "QmlProject: Fix crash"Christian Kandeler2023-11-171-2/+0
| | | | | | | | | This reverts commit 4d55d6be189a70ab30d1a0089c2229992743520a, which broke all project loading. The crash was properly fixed elsewhere. Change-Id: I49f42dce1d7f69d6a1c3c769dc6a1399f26650d5 Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/12.0' into qds/devTim Jenssen2023-11-161-1/+5
|\ | | | | | | Change-Id: Ic6e557806a3209e2c6d983d3c3fcfad66f6e3066
| * ProjectExplorer: Really don't create replacment kits for Design Studiohjk2023-11-141-1/+5
| | | | | | | | | | | | | | Amends b5dec80d6b6. Change-Id: I34b263626c66dfec2676ff311d1f5e460333b924 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | QmlProject: Fix crashThomas Hartmann2023-11-021-0/+2
|/ | | | | | | | If no replacment kit is created we have to return. Task-number: QTCREATORBUG-29717 Change-Id: I7c91eeb5a3710640adfa0a561aaac4fefc8f1431 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ProjectExplorer: Don't create Replacement kits for Design Studiohjk2023-10-171-1/+1
| | | | | | | | | It's not wanted in this use case Fixes: QTCREATORBUG-29717 Change-Id: I04ccd4c9e8bfe15e76294a42f3f0bd9d879599e5 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* ProjectExplorer tests: Do not use QVERIFY2() for std::expected valuesChristian Kandeler2023-09-201-2/+6
| | | | | | | | QVERIFY2 evaluates its second argument even if the first one is false. Uncovered by 768f12e0334efeb350aedb94fb893a737bb1309f. Change-Id: I57a175791c21fe416efaabd69920cdcb5e6da38c Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* ProjectExplorer: reduce the perceived startup timeDavid Schulz2023-09-151-2/+8
| | | | | | | ... by moving restoreKits to the delayed initialize phase. Change-Id: If72e41b64ee71f2917b3f7a317d9887afc6e29e8 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Use numberedKey(Key, int) more wildlyhjk2023-08-301-2/+2
| | | | | | | Will ease transition to a key class that doen's have ::number() Change-Id: Ib2f2957c916f41b0731a2033422bfbf7e429bcc8 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Utils: Introduce variantFromStore and storeFromVarianthjk2023-08-281-6/+6
| | | | | | | | | | | | | | These are functional replacements for QVariant::fromValue(QVariantMap) (or QVariant::fromValue(Store)) and QVariant::toMap() (or QVariant::toValue<Store>()) We will have a few code paths in the end that need to explicitly operarate on both QVariantMap and Store (e.g. actual reading/writing to keep format compatibility etc), so these can't in the end be simple to/fromValue(OneType) but need an internal 'if' or such. Change-Id: I954f3cb24fa8fe123162b72bbd25d891dd19b768 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Some more Key and Storehjk2023-08-251-7/+7
| | | | | Change-Id: I78d2c7cfda1f8ece3c6fd9a7d741ec526a9aa6e4 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Utils/ProjectExplorer: More Key and Storehjk2023-08-251-19/+19
| | | | | Change-Id: Ic9cc3a36b320c7413c362d1a1cdf024298d25027 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* Utils: Rename the new Storage to Storehjk2023-08-241-2/+2
| | | | | | | | | Apparently that's what the young people on the web use for such a thing. Change-Id: I75d5396ff3cb3c26efd6008b5f2261354c4f7896 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Use Utils::Storage instead of QVariantMap in a few placeshjk2023-08-231-2/+2
| | | | | Change-Id: I02833cf2bc3caaadc22ff93ae530e4aebe4c3868 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* ProjectExplorer: Rename kitinformation.{h,cpp} to kitaspects.{h,cpp}hjk2023-08-151-1/+1
| | | | | Change-Id: I069bddeb457366210d339edcbb8ffb359a40fab8 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ProjectExplorer: Simplify return statementsJarek Kobus2023-08-021-8/+8
| | | | | Change-Id: Ifef006cd2dcc567097ce16376eab9ccedb092f04 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Change signature to Project::toMap(QVariantMap &)hjk2023-07-271-6/+6
| | | | | | | More aspect-friendly. Change-Id: Ia107dbab65f3772b315d735e4c46f9dfe1043d5a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* Fix lupdate issuesEike Ziller2023-06-121-56/+74
| | | | | | | Some failures to find the right tr() without fully qualifying Change-Id: I6566786dc93b07dcf01f3bdce83ebd404f4fd6e8 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Tr: Various small fixesEike Ziller2023-05-261-1/+1
| | | | | | Change-Id: Ic86d6b6a4aae7b301557eaa4296beb9a31399e03 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* 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>