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>
It's a ProjectExplorer::FileNode with a custom constructor.
Change-Id: I3057647a5843141ef9e55c97dd19255ea454479a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
So far only used and set with QBS, but conceptually usable more
generally, and harmless if not used.
Change-Id: I1d2d615f5613340690de22a1c7d716a193fb1f05
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... to QbsGroupNode::showInSimpleTree(). It's the only subclass
that didn't re-implement it.
It's easier to reason about the actual value when the value isn't
flipped too often in the inheritance chain.
Change-Id: I61f6020acc95a3dc0383b44ad8d40ee39f923d0f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Instead of constructor arguments. This makes it clearer on the
user side which value is actually changed.
Change-Id: I63ae8cd139a49700996c8874098111aad89ace22
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Use setter of base class, similar to setListInProject() before.
Change-Id: Id620f0084a5dec0410f29c80f8f6393a6bcd5050
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
- add a QString FileNode::buildKey(), returning the build key
for a build represented by that node, if any.
* for QmakeProFileNodes the build key is traditionally equal
to the file name, so use that.
* for QbsProductNode use the uniqueProductName()
- add a Project::findNodeForBuildKey(QString buildKey) convenience
function searching a Project(!)Node matching that build key.
That's the only use case there is right now, and I see no reason
yet to travers all files (yet).
Change-Id: I388c0e06c03111e12d630899d762448e974a5737
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
... by default. The "New File" wizard, if not invoked from the context
menu, implicitly prefers Groups over Products, because the respective
nodes are tried first. Thus, we lower the priority of group nodes so
that their parent product will be a better match unless the group was
specifically selected.
Task-number: QTCREATORBUG-20480
Change-Id: I0c5b2dbf861065ee97ab957ec8bd86132295893e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This feature in question is the availability of the "Run" button in the
context menu of certain project nodes in the project tree to run
something presumably related to/build from that (sub)project.
Previously, the decision was made for certain qmake based projects
(those targeting Desktop, iOS and VxWorks) by some indirection
through the corresponding RunConfigurationFactories.
The patch lets the RunConfigurations decide themselves directly
and removes the indirection, potentially opening the feature for
other qmake based RCs, as well as other combinations (e.g.
PythonRunConfiguration could be associated with its .py file,
without the need to have a dummy project)
Change-Id: Ic489bd1dfa25fcd9102ffa4fa30125565dd2e40e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Add a helper method to request a directory icon with an overlay icon for the
project tree.
Change-Id: Idea2ea9ec2ea6790bf8d087723700364fbcafec6
Reviewed-by: Tim Jenssen <tim.jenssen@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>
This patch prepares for enhancing information stored inside
buildSystemTarget.
Change-Id: I5d81fd01ab6b06c162f47fd9536de697ddfd24a3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Getting the full list for a node can get quite expensive e.g. in
cases of recursive calls of QMakeProjectManager::findPriFile.
However, the FlatModel needs to decide quickly on whether an item
is editable to potentially allow renaming.
So split up QList<Actions> supportedActions() into individual
bool supportsAction(action) calls and make sure Rename is not
on the critical path.
Task-number: QTCREATORBUG-17953
Change-Id: I31841847f8aa7d7b94c63d76ce71efb1c930fa69
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
To HEAD of 1.8 branch, and adapt to changed API.
Change-Id: Ie180b114726134a06dfefe9dc3a6dc27997f246c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
At least the "build product" functionality was broken because of this.
Change-Id: Ia552e53ba783b2b037ce7289d554e4061ed62262
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Move closer to a setup where the project tree API can change.
This patch also makes sure "Generated files" will be below the
product file of each product and above any Groups/folders/files.
Change-Id: I728289372d40b809105f55adbe50fd424b19e0a0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Move code to set up the tree of project nodes out of the project
nodes themselves. This makes them easier to manage and will enable
creator to change to a less update-intense project tree.
Change-Id: I2d0702d257e87543f47ebfb456344423ebe4f871
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
There is no need to call setupFiles on the QbsGroupNode before calling
update() on the root node. That will just redo the work anyway.
Change-Id: I54048395f87dd6fb5436f5d9d47b97e82460b568
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
No need to use two filters with a temporary list when the
task can be done in one go.
Change-Id: I96468099eb28c9698dbc637e432a38071d054e39
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
One step closer to direct use of Utils::TreeNode.
Change-Id: Icd0dfd2fa4d12c2572a68f61ae43c5e906956a0e
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Introduce a method that maps a RunConfiguration to the build system target
that created the executable.
Implement the method in all RunConfigurations where that makes sense (e.g.
no CustomExecutables).
Change-Id: Ifaac859c2cd9b2806a0d7c185b2239312a67752a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Drop the list sorting and difference generation which is not
needed in the "build from scratch" setup.
This also removes some of the intermediately introduced
convienience functions and fixes a regression that led to
missing project files.
Change-Id: I39d1966324917f466fb347da3a52552393ca4a01
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
That information is used rarely, and is not too expensive to regenerate,
so there is no need to store and manage it for every node.
Change-Id: I2261853431cd4328ec447031de3b9f5d5347e796
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Use class enum to shorten the FileType to quint16. This frees up a couple
of bytes per FileNode and we can have many of those.
Change-Id: I3a9ae25059690fefa15305a4268269647d6dc1c9
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
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>
Such products are not guaranteed to have a valid build directory.
Change-Id: I3e6ec211edb8fb9a13e3b785cd19b795f7adee12
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
That one was accidentally removed in 0b3abfcf6a.
Change-Id: I01d2654175260f9efd1d01e5997170ce0d1faf0e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
To HEAD of master branch. Also do the necessary API adaptations in
QbsProjectManager.
Change-Id: I4709b7a0f35537f5b6f9fd04f4d95be16aef2c8d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
setupFolder is called recursively...
Change-Id: Ief1d1d45294a3821f5496d832a2130a8ff779f44
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>