Commit 235f9be9 authored by Joerg Bornemann's avatar Joerg Bornemann

QbsProjectManager: Avoid allocations when checking environment variables

Use qEnvironmentVariableIsEmpty instead of qgetenv(...).isEmpty().
Found by clazy.

Change-Id: I62054e68c3b51c69be4ce6605ed6aef20633c9a9
Reviewed-by: Jake Petroules's avatarJake Petroules <jake.petroules@qt.io>
Reviewed-by: Christian Kandeler's avatarChristian Kandeler <christian.kandeler@qt.io>
parent 7aaaade1
......@@ -497,7 +497,7 @@ void QbsBuildStep::build()
options.setChangedFiles(m_changedFiles);
options.setFilesToConsider(m_changedFiles);
options.setActiveFileTags(m_activeFileTags);
options.setLogElapsedTime(!qgetenv(Constants::QBS_PROFILING_ENV).isEmpty());
options.setLogElapsedTime(!qEnvironmentVariableIsEmpty(Constants::QBS_PROFILING_ENV));
QString error;
m_job = qbsProject()->build(options, m_products, error);
......
......@@ -108,7 +108,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());
params.setLogElapsedTime(!qEnvironmentVariableIsEmpty(Constants::QBS_PROFILING_ENV));
m_qbsSetupProjectJob = m_project.setupProject(params, QbsManager::logSink(), 0);
......
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