forked from qt-creator/qt-creator
Remove environmentinformation from the runconfigurations
It is no longer used. Change-Id: Ie99af7b432bba07f8e334c99817bd535828ade8b Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -70,8 +70,7 @@ QmlProjectRunConfiguration::QmlProjectRunConfiguration(ProjectExplorer::Target *
|
||||
ProjectExplorer::RunConfiguration(parent, source),
|
||||
m_scriptFile(source->m_scriptFile),
|
||||
m_qmlViewerArgs(source->m_qmlViewerArgs),
|
||||
m_isEnabled(source->m_isEnabled),
|
||||
m_userEnvironmentChanges(source->m_userEnvironmentChanges)
|
||||
m_isEnabled(source->m_isEnabled)
|
||||
{
|
||||
ctor();
|
||||
}
|
||||
@@ -240,13 +239,6 @@ void QmlProjectRunConfiguration::setScriptSource(MainScriptSource source,
|
||||
m_configurationWidget.data()->updateFileComboBox();
|
||||
}
|
||||
|
||||
Utils::Environment QmlProjectRunConfiguration::environment() const
|
||||
{
|
||||
Utils::Environment env = baseEnvironment();
|
||||
env.modify(userEnvironmentChanges());
|
||||
return env;
|
||||
}
|
||||
|
||||
ProjectExplorer::Abi QmlProjectRunConfiguration::abi() const
|
||||
{
|
||||
ProjectExplorer::Abi hostAbi = ProjectExplorer::Abi::hostAbi();
|
||||
@@ -260,8 +252,6 @@ QVariantMap QmlProjectRunConfiguration::toMap() const
|
||||
|
||||
map.insert(QLatin1String(Constants::QML_VIEWER_ARGUMENTS_KEY), m_qmlViewerArgs);
|
||||
map.insert(QLatin1String(Constants::QML_MAINSCRIPT_KEY), m_scriptFile);
|
||||
map.insert(QLatin1String(Constants::USER_ENVIRONMENT_CHANGES_KEY),
|
||||
Utils::EnvironmentItem::toStringList(m_userEnvironmentChanges));
|
||||
return map;
|
||||
}
|
||||
|
||||
@@ -269,8 +259,6 @@ bool QmlProjectRunConfiguration::fromMap(const QVariantMap &map)
|
||||
{
|
||||
m_qmlViewerArgs = map.value(QLatin1String(Constants::QML_VIEWER_ARGUMENTS_KEY)).toString();
|
||||
m_scriptFile = map.value(QLatin1String(Constants::QML_MAINSCRIPT_KEY), QLatin1String(M_CURRENT_FILE)).toString();
|
||||
m_userEnvironmentChanges = Utils::EnvironmentItem::fromStringList(
|
||||
map.value(QLatin1String(Constants::USER_ENVIRONMENT_CHANGES_KEY)).toStringList());
|
||||
|
||||
if (m_scriptFile == QLatin1String(M_CURRENT_FILE))
|
||||
setScriptSource(FileInEditor);
|
||||
@@ -341,26 +329,4 @@ bool QmlProjectRunConfiguration::isValidVersion(QtSupport::BaseQtVersion *versio
|
||||
return false;
|
||||
}
|
||||
|
||||
Utils::Environment QmlProjectRunConfiguration::baseEnvironment() const
|
||||
{
|
||||
Utils::Environment env;
|
||||
if (qtVersion())
|
||||
env = qtVersion()->qmlToolsEnvironment();
|
||||
return env;
|
||||
}
|
||||
|
||||
void QmlProjectRunConfiguration::setUserEnvironmentChanges(const QList<Utils::EnvironmentItem> &diff)
|
||||
{
|
||||
if (m_userEnvironmentChanges != diff) {
|
||||
m_userEnvironmentChanges = diff;
|
||||
if (m_configurationWidget)
|
||||
m_configurationWidget.data()->userEnvironmentChangesChanged();
|
||||
}
|
||||
}
|
||||
|
||||
QList<Utils::EnvironmentItem> QmlProjectRunConfiguration::userEnvironmentChanges() const
|
||||
{
|
||||
return m_userEnvironmentChanges;
|
||||
}
|
||||
|
||||
} // namespace QmlProjectManager
|
||||
|
||||
Reference in New Issue
Block a user