Commit Graph

9 Commits

Author SHA1 Message Date
Christian Kandeler
a6e6a53e82 QbsProjectManager: Build up the project tree in a dedicated thread
... and only switch the root node in the UI thread.
Creating the project tree can take some time for larger projects; no
need to block the UI for that.

Task-number: QTCREATORBUG-18533
Change-Id: I093dc9fb8f3454011a3c64bcc0f785e8b7753b4e
Reviewed-by: hjk <hjk@qt.io>
2020-02-06 17:00:56 +00:00
Christian Kandeler
6913947986 QbsProjectManager: Switch to an out-of-process approach
That is, do not link to the qbscore library anymore. Instead, use the
JSON-based API.
Advantages:
    - We can build Qt Creator with qbs support without qbs being present
      on the build machine.
    - Smaller memory footprint for Qt Creator, as the qbs build graphs
      are now being managed by a separate process.
    - Potential crashes in qbs will not kill the Qt Creator process.

Fixes: QTCREATORBUG-20622
Task-number: QTCREATORBUG-22904
Change-Id: If7d344b0ac65a99ff0a3a3db215d61b8d903e47e
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-11-21 13:32:18 +00:00
hjk
2758682723 ProjectExplorer: Move BuildSystem owership to BuildConfiguration
... or Target.

This patch moves build system from conceptually "one per project"
to "one per target (i.e. per project-and-kit)" or "per
BuildConfigurations" for targets where the builds differ
significantly.

Building requires usually items from the kit (Qt version, compiler,
...) so a target-agnostic build is practically almost always wrong.

Moving the build system to the target also has the potential
to solve issues caused by switching targets while parsing, that
used Project::activeTarget() regularly, with potentially different
results before and after the switch.

This patch might create performance/size regressions when several
targets are set up per project as the build system implementation's
internal data are duplicated in this case.

The idea is to fix that by sharing per-project pieces again in
the project implementation once these problems occur.

Change-Id: I87f640ce418b93175b5029124eaa55f3b8721dca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-11-19 11:05:52 +00:00
Tobias Hunger
5754d5accf ProjectExplorer: Use unique_ptr for Project::setRootProjectNode
Change-Id: If63a49d0eecfb93adcc6076fcb3208c87603af10
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-05-02 11:34:35 +00:00
Tobias Hunger
2fde3fffa9 Make all projects generate a fresh project tree
Do not update the existing project tree anymore: Start a fresh one
and throw the old one away.

Change-Id: Ifabe293b6ca668b0672516a6d81acd5346d98fe5
Reviewed-by: hjk <hjk@qt.io>
2017-03-10 16:22:26 +00:00
Tobias Hunger
45ffa75054 Qbs: Move root project setup into QbsNodeTreeBuilder
Change-Id: If8ba7fc6e4edf1346e0636d0bbc78efb27cb433e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-03-02 15:07:21 +00:00
Tobias Hunger
8cb57c734e Qbs: Move setup code for QbsProjectNodes into QbsNodeTreeBuilder
Change-Id: Ice5b445db916648bb8fb0d0f31bafe1d53e11182
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2017-03-02 15:07:14 +00:00
Tobias Hunger
b6b7605357 Qbs: Move ProductNode setup into QbsNodeTreeBuilder
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>
2017-03-02 15:07:03 +00:00
Tobias Hunger
7b3db8ee1d qbs: Move setup of Group node tree into QbsNodeTreeBuilder
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>
2017-03-02 15:06:59 +00:00