Commit c0670b12 authored by Christian Kandeler's avatar Christian Kandeler

Update qbs submodule and do the necessary adjustments.

Namely:
    - Expose the new build options in the UI and document them.
    - Remove the default deployment step.

Change-Id: Ic2c9fd93276ab925effe327fac38642d2153f6cc
Reviewed-by: default avatarLeena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: default avatarJake Petroules <jake.petroules@petroules.com>
parent 3d0537fa
......@@ -106,6 +106,12 @@
\li Select \uicontrol {Show command lines} to print actual command lines
to the compile output pane instead of high-level descriptions.
\li Select \uicontrol {Install} to copy artifacts to their install location
after building them. This option is enabled by default.
\li Select \uicontrol {Clean install root} to remove the contents of
the install root directory before the build starts.
\endlist
\endlist
......
......@@ -54,6 +54,8 @@ static const char QBS_DRY_RUN[] = "Qbs.DryRun";
static const char QBS_KEEP_GOING[] = "Qbs.DryKeepGoing";
static const char QBS_MAXJOBCOUNT[] = "Qbs.MaxJobs";
static const char QBS_SHOWCOMMANDLINES[] = "Qbs.ShowCommandLines";
static const char QBS_INSTALL[] = "Qbs.Install";
static const char QBS_CLEAN_INSTALL_ROOT[] = "Qbs.CleanInstallRoot";
// --------------------------------------------------------------------
// Constants:
......@@ -187,6 +189,16 @@ bool QbsBuildStep::showCommandLines() const
return m_qbsBuildOptions.showCommandLines();
}
bool QbsBuildStep::install() const
{
return m_qbsBuildOptions.install();
}
bool QbsBuildStep::cleanInstallRoot() const
{
return m_qbsBuildOptions.removeExistingInstallation();
}
int QbsBuildStep::maxJobs() const
{
if (m_qbsBuildOptions.maxJobCount() > 0)
......@@ -204,6 +216,9 @@ bool QbsBuildStep::fromMap(const QVariantMap &map)
m_qbsBuildOptions.setKeepGoing(map.value(QLatin1String(QBS_KEEP_GOING)).toBool());
m_qbsBuildOptions.setMaxJobCount(map.value(QLatin1String(QBS_MAXJOBCOUNT)).toInt());
m_qbsBuildOptions.setShowCommandLines(map.value(QLatin1String(QBS_SHOWCOMMANDLINES)).toBool());
m_qbsBuildOptions.setInstall(map.value(QLatin1String(QBS_INSTALL), true).toBool());
m_qbsBuildOptions.setRemoveExistingInstallation(map.value(QLatin1String(QBS_CLEAN_INSTALL_ROOT))
.toBool());
return true;
}
......@@ -215,6 +230,9 @@ QVariantMap QbsBuildStep::toMap() const
map.insert(QLatin1String(QBS_KEEP_GOING), m_qbsBuildOptions.keepGoing());
map.insert(QLatin1String(QBS_MAXJOBCOUNT), m_qbsBuildOptions.maxJobCount());
map.insert(QLatin1String(QBS_SHOWCOMMANDLINES), m_qbsBuildOptions.showCommandLines());
map.insert(QLatin1String(QBS_INSTALL), m_qbsBuildOptions.install());
map.insert(QLatin1String(QBS_CLEAN_INSTALL_ROOT),
m_qbsBuildOptions.removeExistingInstallation());
return map;
}
......@@ -367,6 +385,22 @@ void QbsBuildStep::setShowCommandLines(bool show)
emit qbsBuildOptionsChanged();
}
void QbsBuildStep::setInstall(bool install)
{
if (m_qbsBuildOptions.install() == install)
return;
m_qbsBuildOptions.setInstall(install);
emit qbsBuildOptionsChanged();
}
void QbsBuildStep::setCleanInstallRoot(bool clean)
{
if (m_qbsBuildOptions.removeExistingInstallation() == clean)
return;
m_qbsBuildOptions.setRemoveExistingInstallation(clean);
emit qbsBuildOptionsChanged();
}
void QbsBuildStep::parseProject()
{
m_parsingProject = true;
......@@ -446,6 +480,10 @@ QbsBuildStepConfigWidget::QbsBuildStepConfigWidget(QbsBuildStep *step) :
connect(m_ui->jobSpinBox, SIGNAL(valueChanged(int)), this, SLOT(changeJobCount(int)));
connect(m_ui->showCommandLinesCheckBox, &QCheckBox::toggled, this,
&QbsBuildStepConfigWidget::changeShowCommandLines);
connect(m_ui->installCheckBox, &QCheckBox::toggled, this,
&QbsBuildStepConfigWidget::changeInstall);
connect(m_ui->cleanInstallRootCheckBox, &QCheckBox::toggled, this,
&QbsBuildStepConfigWidget::changeCleanInstallRoot);
connect(m_ui->propertyEdit, SIGNAL(propertiesChanged()), this, SLOT(changeProperties()));
connect(m_ui->qmlDebuggingLibraryCheckBox, SIGNAL(toggled(bool)),
this, SLOT(linkQmlDebuggingLibraryChecked(bool)));
......@@ -476,6 +514,8 @@ void QbsBuildStepConfigWidget::updateState()
m_ui->keepGoingCheckBox->setChecked(m_step->keepGoing());
m_ui->jobSpinBox->setValue(m_step->maxJobs());
m_ui->showCommandLinesCheckBox->setChecked(m_step->showCommandLines());
m_ui->installCheckBox->setChecked(m_step->install());
m_ui->cleanInstallRootCheckBox->setChecked(m_step->cleanInstallRoot());
updatePropertyEdit(m_step->qbsConfiguration());
m_ui->qmlDebuggingLibraryCheckBox->setChecked(m_step->isQmlDebuggingEnabled());
}
......@@ -495,6 +535,10 @@ void QbsBuildStepConfigWidget::updateState()
command += QLatin1String("--keep-going ");
if (m_step->showCommandLines())
command += QLatin1String("--show-command-lines ");
if (!m_step->install())
command += QLatin1String("--no-install ");
if (m_step->cleanInstallRoot())
command += QLatin1String("--clean-install-root ");
command += QString::fromLatin1("--jobs %1 ").arg(m_step->maxJobs());
command += QString::fromLatin1("%1 profile:%2").arg(buildVariant, m_step->profile());
......@@ -587,6 +631,20 @@ void QbsBuildStepConfigWidget::changeJobCount(int count)
m_ignoreChange = false;
}
void QbsBuildStepConfigWidget::changeInstall(bool install)
{
m_ignoreChange = true;
m_step->setInstall(install);
m_ignoreChange = false;
}
void QbsBuildStepConfigWidget::changeCleanInstallRoot(bool clean)
{
m_ignoreChange = true;
m_step->setCleanInstallRoot(clean);
m_ignoreChange = false;
}
void QbsBuildStepConfigWidget::changeProperties()
{
QVariantMap data;
......
......@@ -68,6 +68,8 @@ public:
bool dryRun() const;
bool keepGoing() const;
bool showCommandLines() const;
bool install() const;
bool cleanInstallRoot() const;
int maxJobs() const;
QString buildVariant() const;
......@@ -99,6 +101,8 @@ private:
void setKeepGoing(bool kg);
void setMaxJobs(int jobcount);
void setShowCommandLines(bool show);
void setInstall(bool install);
void setCleanInstallRoot(bool clean);
void parseProject();
void build();
......@@ -145,6 +149,8 @@ private slots:
void changeShowCommandLines(bool show);
void changeKeepGoing(bool kg);
void changeJobCount(int count);
void changeInstall(bool install);
void changeCleanInstallRoot(bool clean);
void changeProperties();
// QML debugging:
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>557</width>
<height>233</height>
<width>723</width>
<height>247</height>
</rect>
</property>
<layout class="QFormLayout" name="formLayout">
......@@ -187,6 +187,20 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="installCheckBox">
<property name="text">
<string>Install</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="cleanInstallRootCheckBox">
<property name="text">
<string>Clean install root</string>
</property>
</widget>
</item>
<item>
<spacer name="checkBoxSpacer">
<property name="orientation">
......
......@@ -119,7 +119,6 @@ ProjectExplorer::DeployConfiguration
QbsDeployConfiguration *dc = new QbsDeployConfiguration(parent, id);
dc->setDisplayName(genericQbsDisplayName());
dc->stepList()->insertStep(0, new QbsInstallStep(dc->stepList()));
return dc;
}
......
Subproject commit 3962dd412ed5e63203a28fcc0a656fb2b81dc6a3
Subproject commit 60612f933276be38201c62b50e119217fa1c8d74
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment