Skip to content
Snippets Groups Projects
Commit 235f9be9 authored by Jörg Bornemann's avatar Jörg Bornemann
Browse files

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: default avatarChristian Kandeler <christian.kandeler@qt.io>
parent 7aaaade1
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment