diff options
author | hjk <[email protected]> | 2019-10-25 09:55:32 +0200 |
---|---|---|
committer | hjk <[email protected]> | 2019-11-19 11:05:52 +0000 |
commit | 27586827238ca9079860e77a7b23ae20d163143e (patch) | |
tree | 2197dc7f97a4a70524381071888336558dc0b4a3 /src/plugins/qbsprojectmanager/qbsinstallstep.cpp | |
parent | 9073c46c9c431ec0e83987a5781163ca7b1f7ea7 (diff) |
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 <[email protected]>
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'src/plugins/qbsprojectmanager/qbsinstallstep.cpp')
-rw-r--r-- | src/plugins/qbsprojectmanager/qbsinstallstep.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/qbsprojectmanager/qbsinstallstep.cpp b/src/plugins/qbsprojectmanager/qbsinstallstep.cpp index 648d4c3e8ee..49ce7c84848 100644 --- a/src/plugins/qbsprojectmanager/qbsinstallstep.cpp +++ b/src/plugins/qbsprojectmanager/qbsinstallstep.cpp @@ -109,14 +109,14 @@ QbsInstallStep::~QbsInstallStep() bool QbsInstallStep::init() { - QTC_ASSERT(!project()->isParsing() && !m_job, return false); + QTC_ASSERT(!buildConfiguration()->buildSystem()->isParsing() && !m_job, return false); return true; } void QbsInstallStep::doRun() { - auto pro = static_cast<QbsProject *>(project()); - m_job = pro->install(m_qbsInstallOptions); + auto bs = static_cast<QbsBuildSystem *>(buildSystem()); + m_job = bs->install(m_qbsInstallOptions); if (!m_job) { emit finished(false); @@ -336,7 +336,7 @@ QbsInstallStepConfigWidget::QbsInstallStepConfigWidget(QbsInstallStep *step) : connect(m_keepGoingCheckBox, &QAbstractButton::toggled, this, &QbsInstallStepConfigWidget::changeKeepGoing); - connect(m_step->project(), &Project::parsingFinished, + connect(m_step->target(), &Target::parsingFinished, this, &QbsInstallStepConfigWidget::updateState); updateState(); |