forked from qt-creator/qt-creator
QbsProjectManager: Prevent transient build dirs from becoming permanent.
If "dry run" is enabled for the project resolving step, then the rule execution step needs it too. Task-number: QTCREATORBUG-16343 Change-Id: I6db7ad68b447299d2b4848f128a262e6097786d4 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
@@ -93,7 +93,8 @@ void QbsProjectParser::parse(const QVariantMap &config, const Environment &env,
|
|||||||
|
|
||||||
// Some people don't like it when files are created as a side effect of opening a project,
|
// Some people don't like it when files are created as a side effect of opening a project,
|
||||||
// so do not store the build graph if the build directory does not exist yet.
|
// so do not store the build graph if the build directory does not exist yet.
|
||||||
params.setDryRun(!QFileInfo::exists(dir));
|
m_dryRun = !QFileInfo::exists(dir);
|
||||||
|
params.setDryRun(m_dryRun);
|
||||||
|
|
||||||
params.setBuildRoot(dir);
|
params.setBuildRoot(dir);
|
||||||
params.setProjectFilePath(m_projectFilePath);
|
params.setProjectFilePath(m_projectFilePath);
|
||||||
@@ -151,6 +152,7 @@ void QbsProjectParser::handleQbsParsingDone(bool success)
|
|||||||
void QbsProjectParser::startRuleExecution()
|
void QbsProjectParser::startRuleExecution()
|
||||||
{
|
{
|
||||||
qbs::BuildOptions options;
|
qbs::BuildOptions options;
|
||||||
|
options.setDryRun(m_dryRun);
|
||||||
options.setExecuteRulesOnly(true);
|
options.setExecuteRulesOnly(true);
|
||||||
m_ruleExecutionJob = m_project.buildAllProducts(
|
m_ruleExecutionJob = m_project.buildAllProducts(
|
||||||
options, qbs::Project::ProductSelectionWithNonDefault, this);
|
options, qbs::Project::ProductSelectionWithNonDefault, this);
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ private:
|
|||||||
qbs::BuildJob *m_ruleExecutionJob;
|
qbs::BuildJob *m_ruleExecutionJob;
|
||||||
qbs::ErrorInfo m_error;
|
qbs::ErrorInfo m_error;
|
||||||
qbs::Project m_project;
|
qbs::Project m_project;
|
||||||
|
bool m_dryRun;
|
||||||
|
|
||||||
QFutureInterface<bool> *m_fi;
|
QFutureInterface<bool> *m_fi;
|
||||||
int m_currentProgressBase;
|
int m_currentProgressBase;
|
||||||
|
|||||||
Reference in New Issue
Block a user