| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let's use the same approach we have for CMake projects by using
the same TreeScanner class.
Compilation database does not have a concept of the root directory
so let's show a file dialog and ask for it the first time the project
is loaded. Next times we open it we take this path from settings.
This root path can later be changed from the project tree context menu.
Fixes: QTCREATORBUG-22031
Change-Id: I151aed8d0504b2e8aa14aa774cad25f8c86d5c17
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
|
|
| |
... 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>
|
|
|
|
|
| |
Change-Id: I79e6008c93f7adcf295031767ba6f6d931cb8ae0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
| |
clang-tidy fixes from modernize-use-override check.
Change-Id: I216701aec0b4134321e220f9e599e053a8e22945
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
|
|
| |
Do no longer expose Nodes from the SessionManager's API. These are now
exclusively handled by the ProjectTree.
Change-Id: I585c2ac919462073870363436e767640775d9045
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
|
|
|
|
|
|
|
|
| |
Renames the file on disk, notifies editors, and tries to change the file
in all open projects that had it (and support renaming).
Task-number: QTCREATORBUG-19209
Change-Id: I165e9468c7235f9f503a3820bda3eb00f3c086d0
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
|
| |
The same functionality should be available in the file system view.
Change-Id: Ib31cb84924e767ebe06f595bf638a5e674d4f8b5
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
| |
Change-Id: Ib9adb893b804db868625331ecae71b6188cc9d25
Reviewed-by: hjk <hjk@qt.io>
|
|\
| |
| |
| |
| |
| |
| | |
Conflicts:
src/plugins/projectexplorer/projectexplorer.cpp
Change-Id: I7881fc51021c49b792a384ad9f8a4f71fc457ce2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Do not crash when adding a file to an existing project that finishes
parsing while the wizard is still open.
Make sure the Node that is passed into the wizard is still valid after
parsing. Provide more information to the wizard so that this can be
checked -- and to find the similar node in the new project tree.
Also avoid a crash when adding existing files.
Do not crash when project parsing finishes while the wizard
summary page is open.
Do not crash when the project gets closed while the summary page
is open.
Do not have the ProjectTree send signals about subTreeChanges if
the node that changed is not part of the ProjectTree. This avoids
an infinite loop when updating the combobox on the summary page.
Add a treeChanged signal to ProjectTree.
Task-number: QTCREATORBUG-18651
Change-Id: Iaed3d0d1f079c09e54389821a11bda596139f35c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| | |
Change-Id: Ia529bd7c199af2943f6c3da7d25352619da5a7f8
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|/
|
|
|
| |
Change-Id: I31f5c5e8218620b469e568d22a9fa00c49f151ad
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
| |
Instead, get root project nodes directly from the project.
Change-Id: I5cf95a7dce1fa29c1adc26013ad03cc017f38a6d
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
| |
Change-Id: I4694bb7dbe75b67946cdb5d8ca8b5a3ff1e40659
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
| |
Only accept FolderNodes, those are the only ones that trigger this.
Change-Id: Ia7aefdcb5aa04868458cc4dd4d9b7c28512c711f
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
|
| |
The project tree is updated in one go now, so there is no need to
signal each and every change.
Change-Id: I7d5829d688b406ee2e701a2aa004b9e8bb5870a9
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
| |
Introduce FolderNode::replaceSubtree incl. necessary signalling
Change-Id: I57762cd24a2986d3a04d0de6b794c1f6c772dbe6
Reviewed-by: hjk <hjk@qt.io>
|
|
|
|
|
|
|
|
| |
This discourages storing the pointers needlessly. The items
are still easy accessible by the static ProjectTree::currentNode()
Change-Id: I3c0cd019e9fdc382afacbc9d9de3b97d5f58ae1e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I465e07c0764ca3dcbf6a6082670b140eb2b01374
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
|
|
|
|
|
|
|
|
| |
Leaving them around is dangerous as they rely on the tree to be valid.
When unloading the plugin the ProjectTree instance is deleted.
Change-Id: Iea6524b0c57c469045cb35f3cd2f376e579b8a57
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
|
|
|
|
|
|
| |
Change-Id: I4793b58aa77bcd46af99f8b843c0f7439cdc9269
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Vikas Pachdha <vikas.pachdha@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
* Use override where appropriate
* Use pragma once
* Make more constructors explicit
Change-Id: I2865fe10f288e3de570826058e43b70a0cb4ee37
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
|
| |
* Update files in src/plugins
Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead, switch to edit mode, show sidebar, scroll to project,
and show a tooltip next to the project.
The tooltip is somewhat easy to miss, but this is a clear improvement
in most cases.
Change-Id: Icd27f76e7d434f33e731b6fd56473ff913986a89
Task-number: QTCREATORBUG-8422
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If no node is selected, e.g. no document is open, the ProjectTree
currently claims that there is no current project.
This adds a fallback to startup project in that case. This especially
fixes the case where only one project is open and as such it is clear
from context which project the user expects to be current.
Revert a few places where I implemented this fallback manually.
I do not like this. If multiple projects are open, this fallback can be
surprising and not what the user wants. Everything works fine in the
simple case with one project open but breaks with multiple projects
open, this actively hides bugs.
Change-Id: I6259834ca2220dd83bdffb16c3a0eac8f98e504b
Task-number: QTCREATORBUG-14394
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Instead of searching the whole tree for the current node,
only check the newly added files/folders.
Change-Id: I015a955815223767367c4cad476d0620f69abd71
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
|
|
|
|
|
|
| |
Task-number: QTCREATORBUG-13831
Change-Id: Iaeb11014ed16bc9f08d7c12d81c1b7b8a4163d21
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Opening the context menu would move the focus, which then would
reset the current node/project to come from the DocumentManager.
So move the context menu handling code to the ProjectTree class
and ensure that while it is open, the corresponding ProjectTree
is considered the focused widget.
Task-number: QTCREATORBUG-13684
Change-Id: I8b3dc410f5f5bc5e9a2dd663421b22cf3f147190
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Generic Project Manager builds the tree from the bottom to the
top. Previously no signals were emitted while doing that since
the watchers were added on adding the top level node at the end.
With the new ProjectTree that leads to lots of signals, and leaves
the FlatModel confussed, as that expects the nodes to be already
in the hierarchy and crashes otherwise.
Restore this behavior by checking if the affected nodes are in
the hierarchy.
Change-Id: I832b348867a8abad2afef11297b44f058592cb1d
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The idea behind NodesWatcher was that it was the central place
to catch node related signals, so that users didn't need to
connect to each individual node and the nodes didn't need to
be QObjects. Somehow Nodes ended up being QObjects anyway.
Both the recently added ProjectTree and the FlatModels consume
the signals the NodesWatcher sends. Unfortunately there's a
ordering dependency between the ProjectTree and the FlatModels.
This patch removes all NodesWatcher and instead makes the
ProjectTree singleton the emitter of various project tree
related signals. The ProjectTree also ensures that the ordering
between the FlatModel and itself is taken into account.
And it makes Node not derive from QObject, saving some memory
in that process.
Task-number: QTCREATORBUG-13756
Change-Id: I8b0d357863f1dc1d2d440ce8172502594138b9fb
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ic2500d009d2195d19651ac691c42d55a612fde04
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In ProjectTree::update() as well as in
CurrentProjectFilter::currentProjectChanged(), there are crashes due to
accesses to a pointer to a deleted project. Wrap the pointer in a
QPointer to prevent this.
May or may not be the correct long-term solution, but does fix the
crash.
Change-Id: I4182a4753578cc4765b9120a36cd8701d07c94c1
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
On adding nodes to the node structure, both the FlatModel::nodesAdded
and ProjectTree::nodesAdded code is run. We need to ensure that
FlatModel::nodesAdded is run first though, as we need that information
in the ProjectTree.
Task-number: QTCREATORBUG-13667
Change-Id: I0b4b41ed6036cfdef668c16689d25611633ab0c9
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
Denoise namespaces, remove redudant QObject include access to static
instance in nonstatic method
Change-Id: Ic54cd0da90e72a981394996fccd74053a11352e0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
|
|
|
|
|
|
|
|
|
| |
When there are 2 top level projects in session, crash happens in
foldersAboutToBeRemoved as currentNode() not properly updated and it
points to previously unloaded dangling node.
Change-Id: Ie3f88bdd03ec042ff1cce6712ed923465c902701
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
|
|
Centralize the handling inside a new class ProjectTree.
React to moving focus and remove most special handling.
This properly fixes the linked task.
Task-number: QTCREATORBUG-13357
Change-Id: I6b06aa32b1e4305ec8a6d432857b302585d8734b
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
|