forked from qt-creator/qt-creator
Utils: Replace Environment::size() check by some isValid() function
More descriptive, and later implementable without full expansion. Change-Id: Ic3b17ea0b07273f292827a7b63e7695b4bd1cf23 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -611,7 +611,7 @@ public:
|
||||
Environment fullEnvironment() const
|
||||
{
|
||||
Environment env = m_setup.m_environment;
|
||||
if (env.size() == 0) {
|
||||
if (!env.isValid()) {
|
||||
// FIXME: Either switch to using EnvironmentChange instead of full Environments, or
|
||||
// feed the full environment into the QtcProcess instead of fixing it up here.
|
||||
// qWarning("QtcProcess::start: Empty environment set when running '%s'.",
|
||||
@@ -1113,7 +1113,7 @@ QString QtcProcess::toStandaloneCommandLine() const
|
||||
d->m_setup.m_workingDirectory.path();
|
||||
}
|
||||
parts.append("-i");
|
||||
if (d->m_setup.m_environment.size() > 0) {
|
||||
if (d->m_setup.m_environment.isValid()) {
|
||||
const QStringList envVars = d->m_setup.m_environment.toStringList();
|
||||
std::transform(envVars.cbegin(), envVars.cend(),
|
||||
std::back_inserter(parts), ProcessArgs::quoteArgUnix);
|
||||
|
||||
Reference in New Issue
Block a user