Commit 0ce5017d authored by Tobias Hunger's avatar Tobias Hunger

RemoteLinux: Consistently use remoteEnvironment

Consistently use remoteEnvironment when speaking about the environment
on the remote linux machine.

Change-Id: Ifa1ce7c538c899923030250682017f53361775b9
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent e5a0c945
......@@ -57,7 +57,7 @@ public:
void start(const QString &environmentSetupCommand);
void stop();
Utils::Environment deviceEnvironment() const { return m_env; }
Utils::Environment remoteEnvironment() const { return m_env; }
signals:
void finished();
......
......@@ -70,7 +70,7 @@ class RemoteLinuxRunConfigurationPrivate {
public:
RemoteLinuxRunConfigurationPrivate(const QString &proFilePath, const Qt4BaseTarget *target)
: proFilePath(proFilePath),
baseEnvironmentType(RemoteLinuxRunConfiguration::SystemBaseEnvironment),
baseEnvironmentType(RemoteLinuxRunConfiguration::RemoteBaseEnvironment),
validParse(target->qt4Project()->validParse(proFilePath)),
parseInProgress(target->qt4Project()->parseInProgress(proFilePath)),
useAlternateRemoteExecutable(false)
......@@ -80,7 +80,7 @@ public:
RemoteLinuxRunConfigurationPrivate(const RemoteLinuxRunConfigurationPrivate *other)
: proFilePath(other->proFilePath), gdbPath(other->gdbPath), arguments(other->arguments),
baseEnvironmentType(other->baseEnvironmentType),
systemEnvironment(other->systemEnvironment),
remoteEnvironment(other->remoteEnvironment),
userEnvironmentChanges(other->userEnvironmentChanges),
validParse(other->validParse),
parseInProgress(other->parseInProgress),
......@@ -94,7 +94,7 @@ public:
QString gdbPath;
QString arguments;
RemoteLinuxRunConfiguration::BaseEnvironmentType baseEnvironmentType;
Utils::Environment systemEnvironment;
Utils::Environment remoteEnvironment;
QList<Utils::EnvironmentItem> userEnvironmentChanges;
bool validParse;
bool parseInProgress;
......@@ -235,7 +235,7 @@ bool RemoteLinuxRunConfiguration::fromMap(const QVariantMap &map)
Utils::EnvironmentItem::fromStringList(map.value(QLatin1String(UserEnvironmentChangesKey))
.toStringList());
d->baseEnvironmentType = static_cast<BaseEnvironmentType>(map.value(QLatin1String(BaseEnvironmentBaseKey),
SystemBaseEnvironment).toInt());
RemoteBaseEnvironment).toInt());
d->useAlternateRemoteExecutable = map.value(QLatin1String(UseAlternateExeKey), false).toBool();
d->alternateRemoteExecutable = map.value(QLatin1String(AlternateExeKey)).toString();
d->workingDirectory = map.value(QLatin1String(WorkingDirectoryKey)).toString();
......@@ -415,7 +415,7 @@ QString RemoteLinuxRunConfiguration::baseEnvironmentText() const
{
if (d->baseEnvironmentType == CleanBaseEnvironment)
return tr("Clean Environment");
else if (d->baseEnvironmentType == SystemBaseEnvironment)
else if (d->baseEnvironmentType == RemoteBaseEnvironment)
return tr("System Environment");
return QString();
}
......@@ -442,7 +442,7 @@ Utils::Environment RemoteLinuxRunConfiguration::environment() const
Utils::Environment RemoteLinuxRunConfiguration::baseEnvironment() const
{
return (d->baseEnvironmentType == SystemBaseEnvironment ? systemEnvironment()
return (d->baseEnvironmentType == RemoteBaseEnvironment ? remoteEnvironment()
: Utils::Environment());
}
......@@ -469,16 +469,16 @@ void RemoteLinuxRunConfiguration::setUserEnvironmentChanges(
}
}
Utils::Environment RemoteLinuxRunConfiguration::systemEnvironment() const
Utils::Environment RemoteLinuxRunConfiguration::remoteEnvironment() const
{
return d->systemEnvironment;
return d->remoteEnvironment;
}
void RemoteLinuxRunConfiguration::setSystemEnvironment(const Utils::Environment &environment)
void RemoteLinuxRunConfiguration::setRemoteEnvironment(const Utils::Environment &environment)
{
if (d->systemEnvironment.size() == 0 || d->systemEnvironment != environment) {
d->systemEnvironment = environment;
emit systemEnvironmentChanged();
if (d->remoteEnvironment.size() == 0 || d->remoteEnvironment != environment) {
d->remoteEnvironment = environment;
emit remoteEnvironmentChanged();
}
}
......
......@@ -65,7 +65,7 @@ class REMOTELINUX_EXPORT RemoteLinuxRunConfiguration : public ProjectExplorer::R
public:
enum BaseEnvironmentType {
CleanBaseEnvironment = 0,
SystemBaseEnvironment = 1
RemoteBaseEnvironment = 1
};
enum DebuggingType { DebugCppOnly, DebugQmlOnly, DebugCppAndQml };
......@@ -109,7 +109,7 @@ public:
Utils::Environment environment() const;
Utils::Environment baseEnvironment() const;
QList<Utils::EnvironmentItem> userEnvironmentChanges() const;
Utils::Environment systemEnvironment() const;
Utils::Environment remoteEnvironment() const;
int portsUsedByDebuggers() const;
......@@ -122,7 +122,7 @@ signals:
void deploySpecsChanged();
void targetInformationChanged() const;
void baseEnvironmentChanged();
void systemEnvironmentChanged();
void remoteEnvironmentChanged();
void userEnvironmentChangesChanged(const QList<Utils::EnvironmentItem> &diff);
protected:
......@@ -145,7 +145,7 @@ private:
void setBaseEnvironmentType(BaseEnvironmentType env);
void setUserEnvironmentChanges(const QList<Utils::EnvironmentItem> &diff);
void setSystemEnvironment(const Utils::Environment &environment);
void setRemoteEnvironment(const Utils::Environment &environment);
Internal::RemoteLinuxRunConfigurationPrivate * const d;
};
......
......@@ -264,7 +264,7 @@ void RemoteLinuxRunConfigurationWidget::addEnvironmentWidgets(QVBoxLayout *mainL
baseEnvironmentLayout->addStretch(10);
d->environmentWidget = new ProjectExplorer::EnvironmentWidget(this, baseEnvironmentWidget);
d->environmentWidget->setBaseEnvironment(d->deviceEnvReader.deviceEnvironment());
d->environmentWidget->setBaseEnvironment(d->deviceEnvReader.remoteEnvironment());
d->environmentWidget->setBaseEnvironmentText(d->runConfiguration->baseEnvironmentText());
d->environmentWidget->setUserChanges(d->runConfiguration->userEnvironmentChanges());
mainLayout->addWidget(d->environmentWidget);
......@@ -274,8 +274,8 @@ void RemoteLinuxRunConfigurationWidget::addEnvironmentWidgets(QVBoxLayout *mainL
this, SLOT(baseEnvironmentSelected(int)));
connect(d->runConfiguration, SIGNAL(baseEnvironmentChanged()),
this, SLOT(baseEnvironmentChanged()));
connect(d->runConfiguration, SIGNAL(systemEnvironmentChanged()),
this, SLOT(systemEnvironmentChanged()));
connect(d->runConfiguration, SIGNAL(remoteEnvironmentChanged()),
this, SLOT(remoteEnvironmentChanged()));
connect(d->runConfiguration,
SIGNAL(userEnvironmentChangesChanged(QList<Utils::EnvironmentItem>)),
SLOT(userEnvironmentChangesChanged(QList<Utils::EnvironmentItem>)));
......@@ -353,7 +353,7 @@ void RemoteLinuxRunConfigurationWidget::fetchEnvironmentFinished()
disconnect(&d->fetchEnvButton, SIGNAL(clicked()), this, SLOT(stopFetchEnvironment()));
connect(&d->fetchEnvButton, SIGNAL(clicked()), this, SLOT(fetchEnvironment()));
d->fetchEnvButton.setText(FetchEnvButtonText);
d->runConfiguration->setSystemEnvironment(d->deviceEnvReader.deviceEnvironment());
d->runConfiguration->setRemoteEnvironment(d->deviceEnvReader.remoteEnvironment());
}
void RemoteLinuxRunConfigurationWidget::fetchEnvironmentError(const QString &error)
......@@ -388,9 +388,9 @@ void RemoteLinuxRunConfigurationWidget::baseEnvironmentChanged()
d->environmentWidget->setBaseEnvironmentText(d->runConfiguration->baseEnvironmentText());
}
void RemoteLinuxRunConfigurationWidget::systemEnvironmentChanged()
void RemoteLinuxRunConfigurationWidget::remoteEnvironmentChanged()
{
d->environmentWidget->setBaseEnvironment(d->runConfiguration->systemEnvironment());
d->environmentWidget->setBaseEnvironment(d->runConfiguration->remoteEnvironment());
}
void RemoteLinuxRunConfigurationWidget::userEnvironmentChangesChanged(const QList<Utils::EnvironmentItem> &userChanges)
......
......@@ -75,7 +75,7 @@ private slots:
void userChangesEdited();
void baseEnvironmentSelected(int index);
void baseEnvironmentChanged();
void systemEnvironmentChanged();
void remoteEnvironmentChanged();
void userEnvironmentChangesChanged(const QList<Utils::EnvironmentItem> &userChanges);
void handleDebuggingTypeChanged();
void handleDeploySpecsChanged();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment