void BuildConfiguration::updateCacheAndEmitEnvironmentChanged() { Utils::Environment env = baseEnvironment(); env.modify(userEnvironmentChanges()); if (env == m_cachedEnvironment) return; m_cachedEnvironment = env; emit environmentChanged(); // might trigger buildDirectoryChanged signal! }
void RemoteLinuxEnvironmentAspect::fromMap(const QVariantMap &map) { ProjectExplorer::EnvironmentAspect::fromMap(map); const auto version = map.value(QLatin1String(VERSION_KEY), 0).toInt(); if (version == 0) { // In Qt Creator versions prior to 4.3 RemoteLinux included DISPLAY=:0.0 in the base // environment, if DISPLAY was not set. In order to keep existing projects expecting // that working, add the DISPLAY setting to user changes in them. New projects will // have version 1 and will not get DISPLAY set. auto changes = userEnvironmentChanges(); if (!displayAlreadySet(changes)) { changes.append(Utils::EnvironmentItem(QLatin1String(DISPLAY_KEY), QLatin1String(":0.0"))); setUserEnvironmentChanges(changes); } } }
LocalEnvironmentAspect *LocalEnvironmentAspect::create(RunConfiguration *parent) const { auto result = new LocalEnvironmentAspect(parent, m_baseEnvironmentModifier); result->setUserEnvironmentChanges(userEnvironmentChanges()); return result; }