summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/kit.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ProjectExplorer: Tr::trhjk2023-01-161-12/+10
| | | | | Change-Id: I8f1b463c5cc7a53627f7a9ad261998b92f13e56a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* MacroExpanders: Remove legacy "Current(Project|Build|Kit)" variablesEike Ziller2023-01-091-13/+0
| | | | | | | | | Should use "CurrentDocument:....." now. Change-Id: Ie47f0e0f77b506bef6fc7a173aec8cfdcf863e5e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> 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>
* Utils: Add sorted() functionChristian Kandeler2022-10-251-2/+1
| | | | | | | | | For simpler calling code. Change-Id: Ia0a16a28770fd172f74d06a626148248bf5d3c0c Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* 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>
* Utils: Remove Utils::optionalEike Ziller2022-09-011-2/+2
| | | | | | | | | | Since we are now requiring macOS 10.14 we can remove our local implementation of optional and use std::optional for macOS too. Change-Id: I2bd018261b68da64f7f031a812045dd7784697e1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Marco Bubke <marco.bubke@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>
* docker: Fix run environment setupMarcus Tillmanns2022-07-121-2/+5
| | | | | | | | | | | When starting a debug session the systemEnvironment() was used as the basis for the debugger process. If the docker device did not have the same shell installed as the host, this would break gdb as the SHELL= env variable might point to a non-existing shell binary. Change-Id: I7253ad3c4995eed857279146f1b258febe1ca710 Reviewed-by: hjk <hjk@qt.io>
* Improve various HTML-based tooltipsAlessandro Portale2022-05-161-3/+4
| | | | | | | | | | | | | | | | | | A couple of tooltips in Qt Creator, contain rich text (HTML). These tooltips tend to have line breaks in unfavorable places, making the content sometimes hard to read. This is fixed in this change by using: style="white-space:pre" Another issue with some tooltips is that they show key/value definitions in a <table>, which, especially with longer keys makes looking up the value quite hard. Also the length of the key column is dependent on the (translated) content. This change implements an alternative: using "description lists" <dl>, which indent the values nicely independent from the key length. Fixes: QTCREATORBUG-27553 Change-Id: If047627193413f23d868c52f005f22aa9a0752a9 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Remove foreach / Q_FOREACH usage part 2Artem Sokolovskii2022-05-121-7/+8
| | | | | | | | Task-number: QTCREATORBUG-27464 Change-Id: Ibfacf5a3b9789a3cf0ea229d1b0d22639101bf9a Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Project Explorer: Fix UI textLeena Miettinen2022-02-171-2/+2
| | | | | | Task-number: QTCREATORBUG-27055 Change-Id: I9b0e4f02ea7d1ebb14a9581f21c76b8908589334 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Clean up some #includeshjk2021-09-291-4/+1
| | | | | Change-Id: Id5a826ff0681a1990f4eeebf1bfc7573e162e861 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Split Kit::*environment into build and runhjk2021-05-271-2/+22
| | | | | | | They may differ in a containerized setup. Change-Id: Ib7e60fdd69f56e8e22bad3dfbc246e7de2fe9cd4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Clean up variablesChristian Kandeler2020-10-021-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Global variables with names such as "CurrentProject*", "CurrentKit*" etc are harmful, because the term "current project" as used in Qt Creator does not refer to the "active project", but simply stands for the project that contains the node that is currently selected in the project tree, which in turn may or may not correspond to the current editor document, depending on the "sync with editor" setting. In other words, the "current project" is almost a random value with little meaning outside the project tree itself. Therefore, we remove "CurrentProject*" and friends, except the ones that are currently intentionally in use. The latter get renamed to "CurrentDocument:Project*", so their purpose becomes clear. Their old names are kept around for backward compatibility, but are not suggested by the variable chooser anymore, so new usages are unlikely and we can remove them at some point. We also add some ActiveProject* variants that have been requested in the past. Also remove the "CurrentSession" prefix that was deprecated six years ago. Fixes: QTCREATORBUG-12724 Fixes: QTCREATORBUG-24606 Change-Id: Ibba5d0e0ce3d2beb444a5eec01fbb9b745d90a1d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Remove replacement kitsChristian Kandeler2020-09-211-0/+13
| | | | | | | | | ... 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>
* Core/Utils: Migrate further to Utils::Idhjk2020-07-061-2/+2
| | | | | | | | The coreplugin/id.h header is kept for downstream for now. Change-Id: I8c44590f7b988b3770ecdc177c40783e12353e66 (cherry picked from commit 430a33dcd9ac80ddb848e41f8f059102857c88aa) Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge output formatters and output parsersChristian Kandeler2020-04-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Now only one piece of code needs to be written to both linkify output in an output pane and create tasks for it in the issues pane. The calling sites are also simplified. For instance, until now, build steps had to feed their output parsers manually and then push the created tasks up the signal stack in parallel with the actual output, which the build manager relied upon for cross-linking the output pane content. Afterwards, the output would get forwarded to the formatter (and parsed for ANSI escape codes a second time). In contrast, a build step now just forwards the process output, and task parsing as well as output formatting is done centrally further up the stack. Concrete user-visible improvements so far: - File paths in compiler/linker messages are clickable links now. - QtTest applications now create clickable links also when run as part of a build step, not just in the app output pane. Task-number: QTCREATORBUG-22665 Change-Id: Ic9fb95b2d97f2520ab3ec653315e9219466ec08d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Split up the IOutputParser classChristian Kandeler2020-04-161-2/+2
| | | | | | | | For symmetry with Utils::OutputFormatter. Task-number: QTCREATORBUG-22665 Change-Id: I148fed69dba042ad3ef26e080829c31cd3f357fd Reviewed-by: hjk <hjk@qt.io>
* Output parsers: Replace the chaining approachChristian Kandeler2020-04-091-4/+4
| | | | | | | | | | | Use "flat" aggregation instead. This is another step towards the formatter/parser merger. Along the way, also fix some some subclasses (mostly in BareMetal) that erroneously forwarded handled output to other parsers. Task-number: QTCREATORBUG-22665 Change-Id: I12947349ca663d2e6bbfc99efd069d69e2b54969 Reviewed-by: hjk <hjk@qt.io>
* TargetSetupPage: Improve reporting on invalid kitsTobias Hunger2020-02-061-1/+4
| | | | | | | | | | | | | Give the reason for a kit being disabled in the tooltip. E.g. for a CMake project you will now get "Kit is invalid: No CMake tool set." instead of a generic error message about the kit being invalid. Change-Id: Ic776dc24149d65ebf27163b605ec2e52a3a504a7 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Kit: Define a default predicateTobias Hunger2020-01-231-2/+7
| | | | | | | | Define a default predicate that just checks whether or not a kit is valid. Change-Id: Ibfa38a3c802bc1442bf922eccbedd650d89703c9 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Improve target setup pageChristian Kandeler2019-08-121-0/+1
| | | | | | | | | | | | | | - Do not hide any kits, as that it not transparent to the user. Instead, show all of them and disable the unsuitable ones, with an explanatory tool tip. - Keep the list of kits sorted after new ones have been added. - Do not do tons of unnecessary layout operations when setting the kit list up from scratch. - Code clean-up. Fixes: QTCREATORBUG-20018 Change-Id: I7823ec9c3e5be00c6791e61926999cea0d7e43df Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Use Utils::DisplayName for KitsChristian Kandeler2019-08-051-13/+11
| | | | | Change-Id: I1ca25fef2c488ca5ea07d102fb7321a6cf89f007 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Do not emit notifications from Kit::copyFrom()Christian Kandeler2019-07-011-2/+0
| | | | | | | | | This function is a building block for other operations. Emitting a signal from it will likely provide subscribers with invalid state. Fixes: QTCREATORBUG-22628 Change-Id: I975638dfa3b453a54c747186b0f6b834c02be035 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Let the KitChooser optionally show iconshjk2019-06-121-0/+15
| | | | | | | | | There are cases in the debugger where it's more convenient or with the current state of Abi matching even needed to use non-matching kits. Still, visual hints are helpful. Change-Id: I66ca89cbd1664f43864873e3b4d81a9c8e1b36fa Reviewed-by: David Schulz <david.schulz@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-4/+4
| | | | | | | | More in line with QFileInfo terminonlogy which appears to be best-of-breed within Qt. Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Introduce a alias for QList<Tasks>hjk2019-05-281-3/+3
| | | | | Change-Id: I91391ad22b420926b0f512cac23cfe009048b218 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Factor out common parts of Kit::{clone(), copyFrom()}Christian Kandeler2019-05-081-15/+14
| | | | | | | | It's annoying having to update both functions whenever new members are added. Change-Id: I799e9f542974095dc5e5f41ece3e037e5d2acd6c Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Offer device icons as kit iconsChristian Kandeler2019-05-031-2/+20
| | | | | | | | | ... in the dialog that lets users choose an icon for their kit. In addition, users can still choose icon files from the file systems. Fixes: QTCREATORBUG-9029 Change-Id: I0ee7d2f532ef637d65ac718b8eaaabe4b81e7fb3 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Try harder to give new kits a unique nameChristian Kandeler2019-05-021-2/+15
| | | | | | Fixes: QTCREATORBUG-16203 Change-Id: Id79b5f2e84359b1ad96b95393cc7fb60a965e63e Reviewed-by: hjk <hjk@qt.io>
* Improve kit auto-detectionChristian Kandeler2019-03-191-0/+11
| | | | | | | | | | | | The old code was too simplistic: Basically, we just took a random toolchain, slapped a random Qt onto it and made that the default kit. Instead, we now go through all toolchains, try to find a matching Qt version, debugger etc and create a kit for that combination unless there is a better one. Fixes: QTCREATORBUG-22138 Change-Id: Ib57ca4453a93ee9253c75398328c3bca33087dc6 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Drop KitAspect::defaultValue()Christian Kandeler2019-03-151-2/+0
| | | | | | | | | | | The functionality of this function overlapped with KitAspect::setup(), leading to unclear responsibilities and resulting in bugs such as the one fixed by 776d54e435. Therefore, we drop the defaultValue() function, merging its implementation with setup() where applicable. Change-Id: Iefa9c3df8b76e97ddf9ad388516621f7ea6558d4 Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.9'Eike Ziller2019-03-141-4/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/debugger/debuggerkitinformation.cpp src/plugins/languageclient/languageclientmanager.cpp src/plugins/plugins.pro src/plugins/projectexplorer/kit.cpp src/plugins/projectexplorer/kitmanager.cpp Change-Id: I66fb941202991f35f7d7761430b21e42dfc678a8
| * ProjectExplorer: Fix Kit::setup()Christian Kandeler2019-03-061-5/+3
| | | | | | | | | | | | | | | | This function traversed the kit aspects in the wrong order, presumably based on outdated assumptions. Change-Id: I1cbb9ed74b9ef165f410b88cac3f1ca9983d1647 Reviewed-by: hjk <hjk@qt.io>
* | Let the user choose which kit settings to displayChristian Kandeler2019-02-141-1/+24
| | | | | | | | | | | | | | | | | | Almost every single aspect of a kit is probably irrelevant to some users, so let them configure which ones they want to see. Fixes: QTCREATORBUG-9134 Change-Id: I218d43bd1d00479130278259dff552c9624afa30 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ProjectExplorer: Code cosmeticshjk2019-02-121-37/+32
| | | | | | | | | | | | | | | | | | rename KitManager::kitInformation() to kitAspects, make it return a const list to be able to use clutter-free ranged for. Polish vicinity. Change-Id: Ibe187586152eb0053efa8c571adbd73158f109c4 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Rename KitInformation to KitAspectChristian Kandeler2019-02-111-19/+19
|/ | | | | | | | | | | The name "KitInformation" does not properly convey the fact that it represents a certain *aspect* of a kit. The same goes for "KitConfigWidget", which in addition was inconsistent with "KitInformation". We now use "KitAspect" and "KitAspectWidget". Change-Id: I9804ee4cedc4d61fad533ea1dd4e4720e67fde97 Reviewed-by: hjk <hjk@qt.io>
* Simplify IDeviceFactory usehjk2018-10-051-2/+2
| | | | | | | | | | With a 1:1 mapping of factory and created device types, the signatures of the device factory methods are much simpler, and yield even in the cases where a factory created more than one device type (WinRt and Qdb) less code after duplication of the factory. Change-Id: I1c6279a88e8483001e5603cfe1922029243be610 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Modernize even moreTobias Hunger2018-07-241-6/+3
| | | | | | | | Use unique_ptr for all *Private classes, except for those in singletons. Change-Id: Ib56c31ddedc6e9cf321f15de1f1e697a27ad4089 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* ProjectExplorer: ModernizeAlessandro Portale2018-07-161-1/+1
| | | | | | | | | | | | | | modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using modernize-use-default-member-init modernize-use-equals-default modernize-use-transparent-functors Change-Id: Iebed22caa2e733d292f334e956e3d16b844e14e3 Reviewed-by: Orgad Shaneh <orgads@gmail.com> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Kit: When loading from a map, allow empty IDsUlf Hermann2018-06-191-9/+4
| | | | | | | | | | | When setting the information, or when saving it on toMap() we don't care about empty IDs. Therefore we should also load them in the ctor. Otherwise saving and loading has side effects if any of the child items forgets to set the ID. Change-Id: I1b933ee6e9e88f8eb44fd8a43ea2c3ada4644434 Task-number: QTCREATORBUG-20636 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Report project-specific kit errors/warningsTobias Hunger2018-04-191-12/+7
| | | | | | | | | Report project-specific warnings about the kit used in Project Mode. E.g. a python project should not complain about missing toolchains, while a qmake project should. Change-Id: I5ce6742683cdeffc7ff3f1a3e8f0b89aee9aa0b4 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* ProjectExplorer: Fix loop in toHtml callTobias Hunger2018-04-191-1/+1
| | | | | Change-Id: Ic32209dbb13897575cbc1845c4afca1b01da1c64 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* ProjectExplorer: Add toHtml(QList<Task>) and use that in kit.cppTobias Hunger2018-04-181-25/+6
| | | | | | | This makes the code more reusable. Change-Id: I1b2eebf8673a4a08a2a87a1e9ff1ac845a091467 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* De-emphasize PluginManager::getObjects<Type>()hjk2017-12-151-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... by additionally keeping local (currently non-owning) pools per "interesting" type. Current situation: - The global object pool does not scale well for looking up objects, as iteration plus qobject_cast typically iterates over all pooled objects. - User code that can use typed results from the object pool need to have access to the full type definition anyway, i.e. depend on the plugin of the target class anyway. The patch here solves the scaling problem is to have local type-specific pools to which objects register in their constructors and deregister in their destructors. This patch here does *not* change the ownership model of the pooled objects, however, it opens the possibility to change the ownership model per type (e.g. by not putting things into the global pool at all anymore and make the local pool 'owning') and the intent is to handle that in later patchs. Even without the follow-up patches this here is a performance improvement for the cases that access the local pools instead the global one, i.e. "practically all". Change-Id: Ib11a42df2c4ecf5e1155534730083a520dd1995b Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer.Kit: do not warn if icon path is emptyNikita Baryshnikov2017-08-231-1/+1
| | | | | Change-Id: I0dff382a1b80c511a72667839bca429114f4a279 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* ProjectExplorer: Don't call kitUpdated() if nothing has changedUlf Hermann2017-03-201-0/+14
| | | | | | | | | | | Otherwise this can lead to infinite recursion. The android integration reacts to kit changes by examining the available Qt versions and creating additional android kits. This crashes, eventually. Also, kitUpdated() is rather expensive, so we shouldn't call it if we don't have to. Change-Id: Ic5fe26f6b174c5b96a6ed8280bf744bf642863b2 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Merge remote-tracking branch 'origin/4.2'Eike Ziller2016-12-201-0/+9
|\ | | | | | | | | | | | | | | | | Conflicts: qbs/modules/qtc/qtc.qbs qtcreator.pri src/plugins/projectexplorer/kitinformation.cpp Change-Id: I94299b069418586db97d1d596a252794e4037556
| * Kits: Upgrade SDK-Kits before trying to them upTobias Hunger2016-12-141-0/+9
| | | | | | | | | | | | | | This makes sure all keys have the expected names. Change-Id: I063a88c705de44c4ac079d790ad865e222259b53 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ProjectExplorer: Remove IDevice::[set]IconAlessandro Portale2016-11-301-9/+0
| | | | | | | | | | | | | | | | It turned out that IDeviceFactory::iconForId is a better solution which supercedes the IDevice specific icon. Change-Id: I82cd7aefc97e515849d00f59b87a8ba34082d0a4 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>