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>
Base the selection of the run configuration on the executable
we have gotten already from the BuildTargetInfo and take
deployment information into account.
This also reverts cce1e130 partially and avoids
stuffing unrelated information into the buildsystemtarget.
Change-Id: I3de6e910a5fd1092d428ec4afc33c4ca62daaa25
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Centralize handling of enabled state of RunConfiguration widgets.
Remove code that does the same thing in all the different run configuration
widgets.
Change-Id: I175d7e19d031bd28a2b19cd825e0b6568da19bc3
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
... and use this as a base for all RunConfigurations.
Clean out code in the individual run configurations dealing with their
enabled/disabled state.
Change-Id: Icc2ea136b056f7aea7ce96480b4402459d7ac0ce
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Having a static variable in a header is strange.
Change-Id: I42c0244f6e73f1cbf530e704a36b96bf5b85a017
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This function is used in some of the plugin unit tests of
QC.
Change-Id: I8e5f5b734a78a207f139b676aa6616abcc9ce7c0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Get rid of duplicated code to do such signaling in derived Project types.
Change-Id: I26914a1d751d72ee65c15a7943e0e7f34978f042
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Now all build system settings (qmake, CMake, Qbs) are in the same place.
Change-Id: I006168de6ebb1a93b141e81f00788fa7097ab6fd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Fix a crash when using file nodes to change the project. The methods used
to take const references, with the data living in the nodes of the project
tree. Since the methods change the project tree and thus cause the tree to
be rebuilt, the original data may get lost. So copy the data instead.
All the qbs::*Data classes are using shared data, so the overhead is not
too big.
Task-number: QTCREATORBUG-18440
Change-Id: I45ca5403a04e17790416dfe15b836f12c732e824
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
... and use it to allow users to set custom properties in the
corresponding profile. This replaces the idiosyncratic and more
complicated approach we had before, when that was done in the qbs
profiles settings page. The profiles view is now read-only.
Change-Id: I0c29c1ac0c510e17d685e7bbaa38b54c8100ddb8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
A lot of the target-and-tool specific run controls nowadays
have something like a single main RunWorker. This patch
removes the need to have user-implemented RunControlFactories
in those cases and adjusts local run, remote linux,
python and nim to take advantage.
There's more potential use downstream.
Change-Id: Ie2d2f839b8be1fad2be3b79e21de3c0e475d88cf
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This lets qbs handle architectures entirely for GCC/MinGW, ICC, and MSVC
toolchains, as well as projects targeting Android or any Apple platform
with any toolchain. Now Qt Creator only passes down architecture
information to qbs for QNX/QCC and Clang on Windows, Linux, BSD, etc.
Change-Id: I44925671d7f280890f9e25a5726d019d3f98dea9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
If project files are not mapped 1:1 to targets the result
of the chosen executable was more or less random.
Try to handle multiple targets as correct as possible by
checking for build targets already where we still know
which files are part of the respective test cases.
Task-number: QTCREATORBUG-17783
Task-number: QTCREATORBUG-18357
Change-Id: I82dcc26bf52c9918e2727b439a719af08879ef49
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>
To HEAD of master branch. One API adaptation was required in
QbsProjectManager.
Change-Id: I59dd76ffa0381d13b4d5f4b4609e85cf73ab32c5
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
The documents have a reload callback that accesses the project. This
would lead to a crash on a reload for a document belonging to a closed
project.
Change-Id: I171cacd0da347fb279609baaea4050ba1cc12008
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This is a prerequisite for being able to import builds.
Change-Id: I22bd8f201db943335edadc899bfe9fa64d39e845
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
We will need to pass additional build info data in order to
support importing builds.
Change-Id: Ic62d0da246f5a19b53632ef3dc61b1f4fc434e5b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
... in a modified variant. The install root is now taken from the build
step to ensure consistency.
A dedicated deploy step can be useful on Windows if one wants to rebuild
while the application is running.
Task-number: QTCREATORBUG-17958
Change-Id: I93bc59b0e6d954d61d84bcfc81576cdb4fac1216
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
When the build environment was changed, the run environment widget would
not update.
Change-Id: I8a318d86b5ac56ca9233cf4c694ca3c9f88870ed
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Set the displayName of QbsProjects from the rootProjectNode if that
exists. This fixes the project name not updating based on the name
set inside the qbs files.
Extract that into a new method so that it can be used consistently.
Task-number: QTCREATORBUG-18100
Change-Id: I417264ee8843a9e0665bbc190f1dbc7869eed0e9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Make QbsNodeTreeBuilder handle uninitialized projects more gracefully.
Return a nullptr, so that the ContainerNode with the main project file
is used in that case.
Change-Id: I7ab90231c3fc24b7b676326f98f79c4b79018327
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
We cannot use std::set_difference on a QSet, because those are not
sorted.
Change-Id: I6238a2bd06bcc6e5dba64572f0c3b0caaa57a7eb
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
They got lost somehow during the project tree refactoring.
Task-number: QTCREATORBUG-17859
Change-Id: I1d1178c3d0932322604e7035f15dcc4490309ca9
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
They ended up as children of the root node somehow during refactoring.
Change-Id: I2da3ac74369fd9456b62839f1498f84f0034a85c
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
... and sub-projects. We used to have only the "build" action for these.
Task-number: QTCREATORBUG-15919
Change-Id: I31d06498c0cdadb8a8738be521a98e8b03de32ee
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Unify the handling of displayName with a proper changed signal across
all projects.
Change-Id: I7e503528854b85f6f38de4b0943775f82a0d6123
Reviewed-by: Alessandro Portale <alessandro.portale@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>