forked from qt-creator/qt-creator
QbsProjectManager: Allow to switch on qbs profiling via env variable
We don't want to expose an option for this in the GUI, as the output is not easily discoverable and the information is mostly interesting for qbs developers. Change-Id: I79a11e3ad12880b9862690cf18bdd3188aa9c03c Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
@@ -412,6 +412,7 @@ void QbsBuildStep::build()
|
||||
options.setChangedFiles(m_changedFiles);
|
||||
options.setFilesToConsider(m_changedFiles);
|
||||
options.setActiveFileTags(m_activeFileTags);
|
||||
options.setLogElapsedTime(!qgetenv(Constants::QBS_PROFILING_ENV).isEmpty());
|
||||
|
||||
QString error;
|
||||
m_job = qbsProject()->build(options, m_products, error);
|
||||
|
@@ -65,5 +65,7 @@ const char QBS_FORCE_PROBES_KEY[] = "qbspm.forceProbes";
|
||||
static const char QBS_GROUP_ICON[] = ":/qbsprojectmanager/images/groups.png";
|
||||
static const char QBS_PRODUCT_OVERLAY_ICON[] = ":/qbsprojectmanager/images/productgear.png";
|
||||
|
||||
const char QBS_PROFILING_ENV[] = "QTC_QBS_PROFILING";
|
||||
|
||||
} // namespace Constants
|
||||
} // namespace QbsProjectManager
|
||||
|
@@ -109,6 +109,7 @@ void QbsProjectParser::parse(const QVariantMap &config, const Environment &env,
|
||||
params.setLibexecPath(libExecDirectory());
|
||||
params.setProductErrorMode(qbs::ErrorHandlingMode::Relaxed);
|
||||
params.setPropertyCheckingMode(qbs::ErrorHandlingMode::Relaxed);
|
||||
params.setLogElapsedTime(!qgetenv(Constants::QBS_PROFILING_ENV).isEmpty());
|
||||
|
||||
m_qbsSetupProjectJob = m_project.setupProject(params, QbsManager::logSink(), 0);
|
||||
|
||||
|
Reference in New Issue
Block a user