summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/projectwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* ProjectExplorer: SimplifyNikolai Kosjar2019-11-011-2/+0
| | | | | | | | bugprone-branch-clone readability-simplify-boolean-expr Change-Id: Iaaac21e96a3e9db6b9819d77fdae623ede373e59 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Add convenience Project::addTargetFor{Default,}Kithjk2019-08-011-6/+2
| | | | | | | Less noise on the user side. Change-Id: I5cdf4af4910a3cc1ee0af1b43fcbc7329a6d59db Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* connect() to ambiguous signals/slots: Replace static_cast with QOverloadAlessandro Portale2019-05-281-1/+1
| | | | | Change-Id: I473d7a2a16509cee944a2a21b022a3f6f02cfd8d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Utils: Rename FileName to FilePathhjk2019-05-281-1/+1
| | | | | | | | 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: Collapse BuildInfo hierarchyhjk2019-01-301-7/+4
| | | | | | | | | | | | | | ... to pass it around as real values, avoiding, among others, the need of occasional explicit deletion. The formerly extra members of the derived stuff are handled via an extra variant (for data) and via a functor in the build configuration factory. The change is mechanical. Change-Id: I19ca4e0c5f0a5b196fc16dfb98bb005dc679f855 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Modernize even moreTobias Hunger2018-07-241-5/+2
| | | | | | | | 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-7/+7
| | | | | | | | | | | | | | 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>
* ProjectExplorer: Use unique_ptr to hold targets in projectsTobias Hunger2018-05-241-3/+4
| | | | | Change-Id: I8f793f5e552b65939d6c7c5e0eb42b89f9f45c3d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Make "Manage..." kits button work againhjk2018-04-241-4/+2
| | | | | | | | | | When configuring a newly opened or created project you are able to press a 'Manage...' button that brings up the options page of the kits. Was broken with the rework done on the global object pool. Change-Id: I87d91351c5769655c1192431a53784de1bca77aa Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Improve "Import Existing Build..." in project paneTasuku Suzuki2018-03-151-1/+1
| | | | | | | | The action is for active project. The button should be under active project. Change-Id: Ie0029bff02f58dbd5cb4c2a17bc086c168a522dc Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Avoid some memory leaks at shutdownUlf Hermann2018-03-071-1/+2
| | | | | | | | | | StatusBarManager needs to delete its contexts when dropping them, QActions should be parented, and in ProjectWindow we can save an allocation. Change-Id: Idee075d4f2ce8014f22f73453987d1ab6539cf18 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* iOS: Fix crash on startup when a device is connectedVikas Pachdha2017-05-241-0/+2
| | | | | | | | | | | In a rare but plausible scenario panel might be updated on device connection while project is not yet loaded. The panel update will happen again when project loading is complete. Task-number: QTCREATORBUG-18226 Change-Id: I566e2d23adee529f0536ae644cef420c66578d54 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Make imported buildconfiguration activeTobias Hunger2017-04-251-0/+10
| | | | | | | | | | | Make the new buildconfiguration active after it was imported via Project Mode. Before the buildconfiguration was added but the current one was still set, which lead people to believe that the build directory was wrong. Task-number: QTCREATORBUG-18082 Change-Id: I10412d94326d9e21820dfcac89adbe2c5da948ae Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Project explorer: Fix UI text capitalizationLeena Miettinen2017-04-051-1/+1
| | | | | Change-Id: I59c391b1d910ad74e30592217451a956463bd804 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Remove spaces in initializer listsTim Jenssen2017-02-221-1/+1
| | | | | | | Format initializer lists code style like. Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013 Reviewed-by: hjk <hjk@qt.io>
* Utils: Introduce TreeItem::{begin,end}hjk2017-02-081-3/+3
| | | | | | | | | | | ... and use this to reduce the number of explicit uses of m_children. Despite of being shorter code by itself it is a step towards having an explicit LeafItem object that doesn't explicitly store a(n empty) vector of child nodes. Change-Id: If8db85e2f1134dd1578a78d31235bf57a28f863a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Add space between treeview entrieshjk2017-02-031-1/+7
| | | | | | | | Task-number: QTCREATORBUG-17481 Change-Id: I27c304d1a63477c6ad081dd843ec3a6e9b6b2a4e Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* KitManager: Get rid of KitMatcher classTobias Hunger2017-01-181-2/+2
| | | | | | | | Use std::function instead. Clean up API while at it. Change-Id: I6e401ab57f5375e36710c30508c596af3f4b3385 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectWindow: Add a PanelsWidget convenience constructorhjk2016-12-151-6/+4
| | | | | | | | ... combining default construction plus a single invocation of addPropertiesPanel(), the only way it is ever used. Change-Id: I2080e8b8fa25a2d7e429b7c18f5272466bc4eb79 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectWindow: Rename SelectorModel to ProjectWindowPrivatehjk2016-12-121-62/+68
| | | | | | | Less quirky, and that's what it is now. Change-Id: Iae18f289ab498eb409579235e96325a7d0341e1a Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Merge remote-tracking branch 'origin/4.2'Eike Ziller2016-12-091-31/+61
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/ios/iosdevice.cpp src/plugins/ios/iossimulator.cpp src/plugins/projectexplorer/projectwindow.cpp src/plugins/qmakeprojectmanager/librarydetailscontroller.cpp src/shared/qbs Change-Id: Ie98e2401a2259903141a13170c78388f2da467d2
| * Projects mode: Disable "Import" button if not supported by projectEike Ziller2016-12-081-0/+3
| | | | | | | | | | | | Task-number: QTCREATORBUG-17399 Change-Id: I79b64298c902776282d54d70efdc0eef03415a51 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
| * ProjectWindow: Add a buttons to import builds to project treehjk2016-12-061-30/+59
| | | | | | | | | | | | | | | | | | | | ... to a shortcut to the Kits setup page. This duplicates the functionality from the context menu but can be directly spotted. Change-Id: Ia5c2e1208346dc7191a04fbb9c2569ccab9aab31 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ProjectExplorer: Avoid possible nullptr dereferenceTobias Hunger2016-12-011-6/+8
|/ | | | | Change-Id: I1c82c4187e075055a44746879df1513e48853c22 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ProjectExplorer: Don't show context menu when it makes no sensehjk2016-11-151-9/+3
| | | | | | Task-number: QTCREATORBUG-17152 Change-Id: Ic67386bdfd6d6d79e8a15bc6394a22cb46305335 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Fix lacks of Q_OBJECT macroSergey Belyashov2016-11-111-2/+2
| | | | | | Change-Id: I0de19ed983c45260c957ea88422093bf7faca6a1 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* ProjectExplorer: Fix possible use-after-free in Project comboboxTobias Hunger2016-11-031-1/+2
| | | | | | | | | Make sure the combobox values are set to null. Otherwise the ComboBoxItem might try to read from that value while it is being removed from the model. Task-number: QTCREATORBUG-17223 Change-Id: I6588aaddf39736846878593a8e6844dab96de408 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Revive project importerhjk2016-10-171-12/+63
| | | | | | | | | | Fixes a regression introduced in recent changes. Import project from build is now available again on the target setup page (shown when no kit is active) and in the context menu of the left pane. Task-number: QTCREATORBUG-17046 Change-Id: I5a1285624084f0cb6e0947560516ae88d4b3e376 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Add an "Active Project" label to Project windowhjk2016-10-171-0/+8
| | | | | | | Change-Id: I9036d25f9cde0849c8a2fed5b2c3ce97f1315f55 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* ProjectExplorer: Filter out unusable kitshjk2016-10-141-7/+9
| | | | | | | | | As side-effect, fix missing expansion of subitems in some cases. Task-number: QTCREATORBUG-17110 Change-Id: Ib0c74e968d6d814f9dadbb37b323c8ac68cda310 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectWindow: More tree polishhjk2016-10-101-9/+5
| | | | | | | | | | | | | | | | | | | - Remove 'panel memory effect' when switching kits Previously, each target entry memorized when its Build or Run page was used, and when switching to the target, that page came up. Now, don't use that when switching targets, but instead take the same page as is selected on the target we are switching from. - Disable selection of the Build&Run and Project Settings "group entries" Change-Id: I2214f8edc38be2e76a50f8984aa75d8f78b62026 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* ProjectWindow: Some code cosmeticshjk2016-10-071-6/+5
| | | | | | | Mainly remove unneeded stuff from the header. No functional changes, Change-Id: I1dfcc97a0aeeca46a3b8891a97a805efea6cb349 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectWindow: Fix display of kit list after loading new projectshjk2016-10-061-249/+198
| | | | | | | | | | | It is still unclear what the original problem was. setRootIndex() on changing model contents seems to be involved. This patch works around the issue by splitting the original big tree containing all projects into separate per-project trees. Change-Id: I13295fc827d750d11300313ffb19cc085837f5bd Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Remove PropertiesPanel structhjk2016-10-041-6/+3
| | | | | | | | | Parameter structs are convenient if they get passed around a lot or are regularly changed. This isn't the case here, so make the user code more compact instead. Change-Id: Idd5e5cc1f70b1547607532cd3e6515c27983c169 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectWindow: Make switched-to project active againhjk2016-09-301-1/+2
| | | | | | | | | This fixes a regression introduced in the recent ProjectWindow reorganization and keeps the active project, the target selector and the active item in the project combobox synchronized again. Change-Id: If2baf4336d5da5d74f1cbf8ddc4e8cb056d49369 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectWindow: Don't show icons in project comboboxhjk2016-09-291-10/+0
| | | | | Change-Id: I5438ebbcea598a6972fad1f89ab9ac4ee1ba67aa Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectWindow: Move Project combobox back from top barhjk2016-09-281-5/+6
| | | | | | | Better discoverable. Change-Id: Ifae3311b566fc5e5e8b05f2b39abf1520aefde48 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Projects mode: Make plus icon dark and get rid of branch indicatorsEike Ziller2016-09-211-0/+6
| | | | | | | | | | The PLUS icon was actually PLUS_TOOLBAR, so name it that way and add an actual PLUS icon. Remove the drawing of the branch indicators from the kit tree view by overriding the method that does it. Change-Id: I395e5187c1738faaee3e122b4f3f359261b514d7 Reviewed-by: hjk <hjk@qt.io>
* ProjectWindow: Make kit activation easierhjk2016-09-191-1/+2
| | | | | | | | Add a [+] icon for inactive kit entries, add a "Click to activate" to the tool tip, and allow single click activation. Change-Id: I1219eb54b4e3a077ef133afaf71134bb35e14fb7 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Some polishing of the new ProjectWindow layouthjk2016-09-141-72/+266
| | | | | | | | | | | | This moves all non-Build&Run entries under a separate 'Project settings' entry. Internally, this mainly makes the information flow on what item a user selected and in which direction in the tree information needs updated a bit more explicit. Change-Id: I4583151356ef50b244b1d05dd77f04de2355105f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* TreeModel: Introduce a TreeItem::indexInParent() convenience functionhjk2016-08-031-1/+1
| | | | | | | To shorten user code and hide the ugly const_cast. Change-Id: I798bd105932004ea17cb95b243fc38ccfcda0a2c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* TreeModel: Move some base TreeItem code out-of-linehjk2016-08-031-1/+1
| | | | | | | Avoid code explosion. Change-Id: I7d239a4560e90b68cc4991341adf940a98776254 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Streamline TreeModel APIhjk2016-07-271-5/+4
| | | | | | | | | | | | | | The LeveledTreeModel case is general enough to cover the UniformTreeModel case, so merge them and rename to TreeModel. The former TreeModel is now BaseTreeModel. BaseTreeModels should not be instantiated directly, a tree model with non-uniform basic items is available as TreeModel<>. Done-with: Eike Ziller <eike.ziller@qt.io> Change-Id: I64a65617ab68c0cde39cf65f4bc092ef808ee6fb Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: Rework mode main windowhjk2016-07-261-260/+308
| | | | | | | | | | | | | | | | | | The existing solution with the special-style horizontal kit selector comes from a time when there was typically one, at most four targets. Today's setup can easily reach half a dozen targets with several toolchain versions each and can't be sensibly handled with the overflowing horizontal bar. This here replaces the horizontal kit selector bar as well as the top level project "tab bar" with a normal tree view. All targets are visible (but possibly disabled) at once, and can be enabled/disabled using the context menu on the tree items. Change-Id: I1ce7401ca96109bf34bc8c0ae19d265e5845aa88 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Projectexplorer: Modernize codebaseTobias Hunger2016-04-151-7/+5
| | | | | | Change-Id: I4793b58aa77bcd46af99f8b843c0f7439cdc9269 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
* ProjectExplorer: ModernizeTobias Hunger2016-02-031-4/+0
| | | | | | | | | * Use override where appropriate * Use pragma once * Make more constructors explicit Change-Id: I2865fe10f288e3de570826058e43b70a0cb4ee37 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* ProjectExplorer: Use Qt5-style connectsOrgad Shaneh2016-02-011-15/+13
| | | | | | | The heavy lifting was done by clazy. Change-Id: I619db09a79760186b72e7662490ed1205155c1a7 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update files in src/plugins Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Fix crash on closing CreatorDaniel Teske2015-07-291-12/+4
| | | | | | | | | | | | | | | | | | Removing a target setup widget might lead to removing a kit, due to some kits being temporary for importers. A kit removal then would lead to a target removal and this would make the code recurse into the widget cache. Fix that by ensuring that we disconnect from the project first in ProjectWindow::deregisterProject. And also remove the clearing of the project window, instead simply clear the widget cache as each project is closed. Change-Id: I278c43ef4ba77217428c5c36f0a07d0d96cb3022 Task-number: QTCREATORBUG-14694 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com> Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>