summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2017-10-19 13:58:36 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2017-10-19 14:22:53 +0000
commit235f9be955e9a39ab022c8b63e7ca9825ad8c7df (patch)
tree16006ce6b7f748256121b57d217b4394a7df6c65 /src/plugins
parent7aaaade1385a36c7f4889803957f55e8dd58d20b (diff)
downloadqt-creator-235f9be955e9a39ab022c8b63e7ca9825ad8c7df.tar.gz
QbsProjectManager: Avoid allocations when checking environment variables
Use qEnvironmentVariableIsEmpty instead of qgetenv(...).isEmpty(). Found by clazy. Change-Id: I62054e68c3b51c69be4ce6605ed6aef20633c9a9 Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/qbsprojectmanager/qbsbuildstep.cpp2
-rw-r--r--src/plugins/qbsprojectmanager/qbsprojectparser.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
index 704e8f4dfe..9474702904 100644
--- a/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
+++ b/src/plugins/qbsprojectmanager/qbsbuildstep.cpp
@@ -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);
diff --git a/src/plugins/qbsprojectmanager/qbsprojectparser.cpp b/src/plugins/qbsprojectmanager/qbsprojectparser.cpp
index b742eb060e..d1481947ad 100644
--- a/src/plugins/qbsprojectmanager/qbsprojectparser.cpp
+++ b/src/plugins/qbsprojectmanager/qbsprojectparser.cpp
@@ -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);