aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer/projecttreewidget.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove unnecessary removeContextObject callsEike Ziller2020-05-271-11/+4
| | | | | | | They are removed on deletion now. Change-Id: I08461ea4938e24ab450df013a0f8f820032381da Reviewed-by: hjk <hjk@qt.io>
* Project Tree: Add functionality to expand a single node recursivelyChristian Kandeler2020-02-201-0/+14
| | | | | | | | From time to time, I find myself wanting to fully expand a specific sub-tree. Change-Id: Ie49b76a7a7a6fae3684bbdfb5735638bbc41b301 Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.11'Orgad Shaneh2020-02-061-0/+2
|\ | | | | | | Change-Id: I65ce6aa917219a8f8b91b48c7077f8097248375c
| * ProjectExplorer: Fix endless waiting when switching to Git editorsOrgad Shaneh2020-02-051-0/+2
| | | | | | | | | | | | | | | | Show, Diff etc. Change-Id: Ibdd6e61c72a9a8fd797a02d15dae7b8be08b405c Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: hjk <hjk@qt.io>
* | Fix various leaks relating to use of Core::NavigationViewChristian Kandeler2020-01-271-2/+2
| | | | | | | | | | Change-Id: I8ba508b279376047bcf7ae17dbdadba70ec13582 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Revert "ProjectTree: Add per-node "Expand" and "Collapse" actions"Christian Kandeler2019-12-201-10/+0
| | | | | | | | | | | | | | | | This reverts commit a5785e678e56d4711462795ad9639a6d0a4b207a. These actions are already available from the standard tree view UI... Change-Id: If8dfe755ee450a89588ec944ae6ff7601250cdde Reviewed-by: hjk <hjk@qt.io>
* | ProjectTree: Add per-node "Expand" and "Collapse" actionsChristian Kandeler2019-12-201-0/+10
| | | | | | | | | | Change-Id: Ic722598f7bb2665ac7a09c24b7eefa9dc6787808 Reviewed-by: hjk <hjk@qt.io>
* | Merge remote-tracking branch 'origin/4.11'Eike Ziller2019-11-011-4/+1
|\| | | | | | | | | | | | | Conflicts: share/qtcreator/qml/qmlpuppet/qml2puppet/instances/quick3dnodeinstance.cpp Change-Id: I8ea57eba526ab830608fd928c28771c5441749f8
| * ProjectExplorer: SimplifyNikolai Kosjar2019-11-011-4/+1
| | | | | | | | | | | | | | | | bugprone-branch-clone readability-simplify-boolean-expr Change-Id: Iaaac21e96a3e9db6b9819d77fdae623ede373e59 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Project Tree: Allow to hide disabled filesChristian Kandeler2019-10-221-0/+20
|/ | | | | | | | | | | Project manager plugins can mark files as disabled, typically meaning they are not part of the project in the current build configuration. Let's allow users to hide such files altogether. Fixes: QTCREATORBUG-22821 Change-Id: Ie92d523d1f895bee8076de1d7eea1d7a739fe11f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Support bulk renamings in project treeChristian Kandeler2019-08-161-7/+9
| | | | | | | | | | | If a user changes the name of a file abc.cpp to def.cpp, and there is a file abc.h in the same directory, it's likely that the user wants to rename that file to def.h. Detect such circumstances and offer the user to automatically rename the sibling files. Fixes: QTCREATORBUG-21738 Change-Id: Ib3ece08698a3341ef4087066d2289048f6b0fa61 Reviewed-by: hjk <hjk@qt.io>
* Avoid warning on empty expressionshjk2019-07-231-2/+2
| | | | | | | | For some reason, Q_UNUSED includes already a semicolon, adding one on the user side creates an additional empty statement. Change-Id: I9c5e8fac381345a60792cb75e2938fd53958d3b0 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Merge remote-tracking branch 'gerrit/4.9' into 4.10Eike Ziller2019-06-131-0/+7
|\ | | | | | | Change-Id: I033d6baa40af45ae1eb6ed82827ff51213c832f5
| * ProjectTree: Save state of "Hide Empty Directories" filterTobias Hunger2019-06-131-0/+7
| | | | | | | | | | Change-Id: Iafd7248242e95dc0d5205649747f46d98e05873d Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | Utils: Rename FileName to FilePathhjk2019-05-281-3/+3
| | | | | | | | | | | | | | | | 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: Rename ProjectTree::findCurrentNode to currentNodehjk2019-04-301-1/+1
| | | | | | | | | | | | | | | | For consistency, it's straight forwards access, similar to currentProject, not much to search and find. Change-Id: I7ce696bdc24b6a8713d6f11e02443a6f94c605f6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Move Node::nodeType implementationhjk2019-03-041-2/+17
| | | | | | | | | | | | | | ... to the only remaining user, and rename it there. Change-Id: I0bdb3179282e323f5ad7b41d034bb5f3db8f6ffc Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Merge Node::isFileNodeType and asFileNodehjk2019-03-011-1/+1
| | | | | | | | | | | | | | They were identifying the same set of nodes. Change-Id: I3316cbc434ff740547bcf0baf9e5f1544f6e3f56 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Replace Node::setNodeType by virtual functionshjk2019-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not the usual direction of change, but currently there are several systems to identify or invoke node functionality. Virtual functions are likely to stay in this context, so this here attempts to help consolidation by reducing the influence of the node type flags, hopefully leading to full removal by making remaining functionality available through the other mechanisms (virtual functions, asFooNode() 'casts', less so the FileType flag). Change-Id: I12a17ce30b3c8883995b29b4720408020ee0fa3e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | ProjectExplorer: Support Drag and Drop in the project treeChristian Kandeler2019-02-151-1/+3
|/ | | | | | | | | | | | E.g. moving a file from one pri file to another is much simpler for the user now. [ChangeLog] Source files can now be drag-and-dropped between project nodes in the project tree. Fixes: QTCREATORBUG-6446 Change-Id: I8bd4a7588fc5f2830f6585dfcb54ab4a547bc6b0 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Allow users to quickly expand the project treeChristian Kandeler2019-01-161-0/+5
| | | | | | | | | ... by adding an "Expand All" action to accompany the existing "Collapse All" one. Fixes: QTCREATORBUG-17243 Change-Id: I84e185562ee4c62ede7d0dc40f0d296020c4f0ea Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.7'Eike Ziller2018-08-301-3/+5
|\ | | | | | | Change-Id: I4332eba9f1f66fef185359c79c4d96420d8b78ca
| * Avoid shortcuts with "Alt" on macOSEike Ziller2018-08-211-3/+5
| | | | | | | | | | | | | | | | | | | | On macOS shortcuts with "Alt" are used for entering special characters, where "special" depends on keyboard layout and can mean e.g. '|' or '~'. Task-number: QTCREATORBUG-20873 Change-Id: Ifa70b95381ef48d2ba3b15a528a5dcfe43d53bfd Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | ProjectExplorer: ModernizeAlessandro Portale2018-07-161-2/+2
|/ | | | | | | | | | | | | | 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>
* Don't select file extension when renaming resource filesEike Ziller2018-06-131-1/+1
| | | | | | | | | | | | Resource files would not get the handling like files do, because they are folder nodes. For folders, if they provide the rename functionality at all, the file extension can have similar influence on the type of folder like it does for files (e.g. ".app", ".framework"), so just remove that restriction. Task-number: QTCREATORBUG-20057 Change-Id: I3802f17695da9d323d4d60c14ecef5c39aeef576 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectTree: Do not use disabled state for disabled nodesTobias Hunger2018-04-091-4/+2
| | | | | | | | | | | | | Rendering disabled nodes using the disabled state in the painter breaks themes as it introduces a discrepancy between the actual state of the node and its graphical representation. IIRC this was introduced since there was no easy way to find what color was supposed to be used for disabled items. That is no longer the case, so let's clean this up. Change-Id: Ic5653cd970e07eb680cb1d28d1feefd70aded540 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Merge remote-tracking branch 'origin/4.6'Eike Ziller2018-03-131-2/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/cmakeprojectmanager/cmakeproject.h src/plugins/debugger/debuggerplugin.cpp src/plugins/ios/iosrunfactories.cpp src/plugins/nim/project/nimproject.h src/plugins/qbsprojectmanager/qbsrunconfiguration.cpp src/plugins/qmakeandroidsupport/qmakeandroidrunfactories.cpp src/plugins/qmakeprojectmanager/desktopqmakerunconfiguration.cpp src/plugins/qmlprojectmanager/qmlproject.h src/plugins/qnx/qnxrunconfigurationfactory.cpp src/plugins/qtsupport/exampleslistmodel.cpp src/plugins/winrt/winrtrunfactories.cpp Change-Id: Ib029fdbaa65270426332f5edd6e90264be5fb539
| * ProjectTree: Select only (complete) file basename on renameAlexander Akulich2018-03-091-0/+13
| | | | | | | | | | Change-Id: I29effc5f61fbaa214d7a1a01d92de5d5a726cec4 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
| * ProjectTree: Refactor editCurrentItem()Alexander Akulich2018-03-091-2/+5
| | | | | | | | | | Change-Id: Id848b608e256b95e9704d61d1926d05625106ecc Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | Merge remote-tracking branch 'origin/4.6'Eike Ziller2018-03-051-1/+1
|\| | | | | | | Change-Id: I421af2d62994436782dab6d37e97622bd055ed44
| * utils: Let the link icon have a LINK and a LINK_TOOLBAR versionAlessandro Portale2018-03-021-1/+1
| | | | | | | | | | | | Change-Id: I910d491f7f5ac47c55c966f687b004c0e0793c5f Change-Id: I910d491f7f5ac47c55c966f687b004c0e0793c5e Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ProjectTree: Do not register action more than onceTobias Hunger2018-02-071-6/+8
| | | | | | | | | | Change-Id: I9d9c86694cd8066ba4be2a065805a3b52bc272ff Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Core: make useMacShortcut constexprDavid Schulz2018-02-021-1/+1
| | | | | | | | | | Change-Id: I293b96428784b6efecac6dae4f2f9690af0027da Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ProjectTree: Add command to manually sync current document and project treeTobias Hunger2018-01-261-8/+26
|/ | | | | | | | Add a command to manually sync the current document and the project tree. Task-number: QTCREATORBUG-19625 Change-Id: I2423853ca1a876c6203a004b465adde949eb6c5b Reviewed-by: hjk <hjk@qt.io>
* Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-08-151-0/+13
|\ | | | | | | | | | | | | | | | | Conflicts: src/tools/clangbackend/ipcsource/clangiasyncjob.cpp src/tools/clangbackend/ipcsource/clangjobrequest.cpp src/tools/clangbackend/ipcsource/clangjobrequest.h Change-Id: Ib8602530663813ade418f995dfd2a736908cfe75
| * ProjectExplorer: Add option to hide empty directories from project treeTobias Hunger2017-08-041-0/+13
| | | | | | | | | | | | | | | | | | Together with the earlier fix for hiding generated files, this change makes for a very clean CMake server-mode project tree:-) Change-Id: Ib70fd66699eddf5d6e602f3f8848b31fd6d85b57 Reviewed-by: André Hartmann <aha_1980@gmx.de> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | ProjectNodes: Do not derive Project Nodes from QObjectTobias Hunger2017-08-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | That should save some memory per node, and since creator has a lot of nodes (e.g. opening the LLVM project adds about 1 000 000 nodes) this should be noticeable:-) Calling update inside ProjectTree::currentNode() and rename it to findCurrentNode() to make sure it is an still existing pointer. Also, try to reduce the somehow more expensive currentNode() calls and sprinkle some const around that usage. Change-Id: I6a7c5db01a71d53d39544d3013cad557d5b96cdc Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* | ProjectTree: Show parsing state of projectsTobias Hunger2017-07-281-16/+77
|/ | | | | | | Show which projects are currently parsing in the project tree. Change-Id: Ie69907a73ec7c3cf2ef40c37db620a0144178f95 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ProjectTree: Enable Synchronize with Editor by defaultOrgad Shaneh2017-07-171-1/+1
| | | | | | | Changed by 4943510b60acc320dff8f2c31af69cfbfa331203. Change-Id: I359c4abd77009b22bc1a7143002563f66a3b5fd0 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectManager: Remove SessionNodehjk2017-03-211-15/+19
| | | | | | | Instead, get root project nodes directly from the project. Change-Id: I5cf95a7dce1fa29c1adc26013ad03cc017f38a6d Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* TextEditor: add right sidebarSerhii Moroz2017-03-091-4/+2
| | | | | | | | Task-number: QTCREATORBUG-9436 Change-Id: Ic0406758a30d52c22c58433f5f35305b798cb462 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: André Hartmann <aha_1980@gmx.de>
* ProjectExplorer: Use visitor-by-lambda for project treehjk2017-03-081-17/+15
| | | | | | | | And inline it into user code. Less code in total and no intermediate node lists. Change-Id: I3724883408bfaa868266110aee27bbffd4d96bd8 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* ProjectTree: Use signals to communicate change from FlatModel to viewhjk2017-03-021-1/+6
| | | | | | | Better encapsulation and potentially more than one view on the model. Change-Id: I45657484a68eba61b3987d324cf1542704ffd61c Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* ProjectExplorer: fix possible crashesTim Jenssen2017-02-101-1/+1
| | | | | Change-Id: I0b06e31f07ddf9c052f360bb66ac2330cc21d7b6 Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Make the FlatModel a Utils::TreeModelhjk2017-01-251-132/+6
| | | | | | | | | | | | | | The FlatModel is essentially a proxy model keeping expansion and filter state per ProjectTree(View). Using a Utils::TreeModel makes it fast enough to allow recreation of the proxy structure on structural changes simplifying the parent/child logic significantly. The {Session,Project,Folder,File}Node hierarchy still is still primary information and shared by all views. Change-Id: Ic08180a19bda37908280ff30e0737d188ed93e92 Reviewed-by: Robert Loehning <robert.loehning@qt.io> Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* ProjectExplorer: Shorten NodeType enumTobias Hunger2016-11-031-1/+1
| | | | | | | | Use a class enum with a type quint16 for the NodeType. Frees 2 bytes per node that can be used for better things now. Change-Id: Ib84bf8629e9f4a5fb0793355eff0f0d6302167dd Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Move icons to UtilsUlf Hermann2016-08-051-3/+3
| | | | | | | This way we can use them from libraries, not only from plugins. Change-Id: Ic35cfd5f04d638d87606bf272b2c00ded1267c1b Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Session: Remove addProjects(...) methodTobias Hunger2016-06-141-1/+1
| | | | | | | | | | | | It is unused. Also remove singleProjectAdded signal, and replace the only use with the projectAdded signal. The singleProjectAdded signal was emitted for each project that was ever added, simply because nobody ever used addProjects(...) with more than one project. Change-Id: I5aee315c64a2cfb721471d580989a6a02d44fefc Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
* Projectexplorer: Modernize codebaseTobias Hunger2016-04-151-13/+7
| | | | | | Change-Id: I4793b58aa77bcd46af99f8b843c0f7439cdc9269 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
* ProjectExplorer: Use Qt5-style connectsOrgad Shaneh2016-02-011-24/+26
| | | | | | | The heavy lifting was done by clazy. Change-Id: I619db09a79760186b72e7662490ed1205155c1a7 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>