Commit 99293bb2 authored by dt's avatar dt
Browse files

RunConfigurations: Rename a few misnamed functions

parent f5326043
......@@ -163,7 +163,7 @@ void CMakeRunConfiguration::setExecutable(const QString &executable)
m_buildTarget = executable;
}
void CMakeRunConfiguration::setWorkingDirectory(const QString &wd)
void CMakeRunConfiguration::setBaseWorkingDirectory(const QString &wd)
{
const QString &oldWorkingDirectory = workingDirectory();
......@@ -171,7 +171,7 @@ void CMakeRunConfiguration::setWorkingDirectory(const QString &wd)
const QString &newWorkingDirectory = workingDirectory();
if (oldWorkingDirectory != newWorkingDirectory)
emit workingDirectoryChanged(newWorkingDirectory);
emit baseWorkingDirectoryChanged(newWorkingDirectory);
}
void CMakeRunConfiguration::setUserWorkingDirectory(const QString &wd)
......@@ -182,7 +182,7 @@ void CMakeRunConfiguration::setUserWorkingDirectory(const QString &wd)
const QString &newWorkingDirectory = workingDirectory();
if (oldWorkingDirectory != newWorkingDirectory)
emit workingDirectoryChanged(newWorkingDirectory);
emit baseWorkingDirectoryChanged(newWorkingDirectory);
}
QVariantMap CMakeRunConfiguration::toMap() const
......@@ -227,7 +227,7 @@ QWidget *CMakeRunConfiguration::createConfigurationWidget()
return new CMakeRunConfigurationWidget(this);
}
void CMakeRunConfiguration::setArguments(const QString &newText)
void CMakeRunConfiguration::setCommandLineArguments(const QString &newText)
{
m_arguments = newText;
}
......@@ -509,7 +509,7 @@ void CMakeRunConfigurationWidget::userEnvironmentChangesChanged()
void CMakeRunConfigurationWidget::setArguments(const QString &args)
{
m_cmakeRunConfiguration->setArguments(args);
m_cmakeRunConfiguration->setCommandLineArguments(args);
}
// Factory
......
......@@ -73,9 +73,7 @@ public:
QWidget *createConfigurationWidget();
void setExecutable(const QString &executable);
void setWorkingDirectory(const QString &workingDirectory);
void setUserWorkingDirectory(const QString &workingDirectory);
void setBaseWorkingDirectory(const QString &workingDirectory);
QString title() const;
......@@ -93,10 +91,10 @@ public:
signals:
void baseEnvironmentChanged();
void userEnvironmentChangesChanged(const QList<Utils::EnvironmentItem> &diff);
void workingDirectoryChanged(const QString&);
void baseWorkingDirectoryChanged(const QString&);
private slots:
void setArguments(const QString &newText);
void setCommandLineArguments(const QString &newText);
protected:
CMakeRunConfiguration(CMakeTarget *parent, CMakeRunConfiguration *source);
......@@ -104,6 +102,7 @@ protected:
QString defaultDisplayName() const;
private:
void setUserWorkingDirectory(const QString &workingDirectory);
QString baseWorkingDirectory() const;
QStringList baseCommandLineArguments() const;
void ctor();
......
......@@ -129,7 +129,7 @@ void CMakeTarget::updateRunConfigurations()
// Already exists, so override the settings...
foreach (CMakeRunConfiguration *rc, list) {
rc->setExecutable(ct.executable);
rc->setWorkingDirectory(ct.workingDirectory);
rc->setBaseWorkingDirectory(ct.workingDirectory);
rc->setEnabled(true);
}
existingRunConfigurations.remove(ct.title);
......
......@@ -250,13 +250,13 @@ void CustomExecutableConfigurationWidget::executableEdited()
void CustomExecutableConfigurationWidget::argumentsEdited(const QString &arguments)
{
m_ignoreChange = true;
m_runConfiguration->setCommandLineArguments(arguments);
m_runConfiguration->setBaseCommandLineArguments(arguments);
m_ignoreChange = false;
}
void CustomExecutableConfigurationWidget::workingDirectoryEdited()
{
m_ignoreChange = true;
m_runConfiguration->setWorkingDirectory(m_workingDirectory->rawPath());
m_runConfiguration->setBaseWorkingDirectory(m_workingDirectory->rawPath());
m_ignoreChange = false;
}
......@@ -516,13 +516,13 @@ void CustomExecutableRunConfiguration::setExecutable(const QString &executable)
emit changed();
}
void CustomExecutableRunConfiguration::setCommandLineArguments(const QString &commandLineArguments)
void CustomExecutableRunConfiguration::setBaseCommandLineArguments(const QString &commandLineArguments)
{
m_cmdArguments = Utils::Environment::parseCombinedArgString(commandLineArguments);
emit changed();
}
void CustomExecutableRunConfiguration::setWorkingDirectory(const QString &workingDirectory)
void CustomExecutableRunConfiguration::setBaseWorkingDirectory(const QString &workingDirectory)
{
m_workingDirectory = workingDirectory;
emit changed();
......
......@@ -123,10 +123,10 @@ private:
QList<Utils::EnvironmentItem> userEnvironmentChanges() const;
void setExecutable(const QString &executable);
void setCommandLineArguments(const QString &commandLineArguments);
void setBaseCommandLineArguments(const QString &commandLineArguments);
QStringList baseCommandLineArguments() const;
QString baseWorkingDirectory() const;
void setWorkingDirectory(const QString &workingDirectory);
void setBaseWorkingDirectory(const QString &workingDirectory);
void setUserName(const QString &name);
void setRunMode(RunMode runMode);
......
......@@ -379,7 +379,7 @@ void Qt4RunConfigurationWidget::workDirectoryEdited()
if (m_ignoreChange)
return;
m_ignoreChange = true;
m_qt4RunConfiguration->setWorkingDirectory(m_workingDirectoryEdit->rawPath());
m_qt4RunConfiguration->setBaseWorkingDirectory(m_workingDirectoryEdit->rawPath());
m_ignoreChange = false;
}
......@@ -387,13 +387,13 @@ void Qt4RunConfigurationWidget::workingDirectoryReseted()
{
// This emits a signal connected to workingDirectoryChanged()
// that sets the m_workingDirectoryEdit
m_qt4RunConfiguration->setWorkingDirectory("");
m_qt4RunConfiguration->setBaseWorkingDirectory("");
}
void Qt4RunConfigurationWidget::argumentsEdited(const QString &args)
{
m_ignoreChange = true;
m_qt4RunConfiguration->setArguments(args);
m_qt4RunConfiguration->setBaseCommandLineArguments(args);
m_ignoreChange = false;
}
......@@ -610,23 +610,23 @@ void Qt4RunConfiguration::setUserEnvironmentChanges(const QList<Utils::Environme
}
}
void Qt4RunConfiguration::setWorkingDirectory(const QString &wd)
void Qt4RunConfiguration::setBaseWorkingDirectory(const QString &wd)
{
if (wd.isEmpty()) {
m_userSetWokingDirectory = false;
m_userWorkingDirectory.clear();
emit workingDirectoryChanged(workingDirectory());
emit baseWorkingDirectoryChanged(workingDirectory());
} else {
m_userSetWokingDirectory = true;
m_userWorkingDirectory = wd;
emit workingDirectoryChanged(m_userWorkingDirectory);
emit baseWorkingDirectoryChanged(m_userWorkingDirectory);
}
}
void Qt4RunConfiguration::setArguments(const QString &argumentsString)
void Qt4RunConfiguration::setBaseCommandLineArguments(const QString &argumentsString)
{
m_commandLineArguments = Utils::Environment::parseCombinedArgString(argumentsString);
emit commandLineArgumentsChanged(argumentsString);
emit baseCommandLineArgumentsChanged(argumentsString);
}
void Qt4RunConfiguration::setRunMode(RunMode runMode)
......
......@@ -97,8 +97,8 @@ public:
ProjectExplorer::OutputFormatter *createOutputFormatter() const;
signals:
void commandLineArgumentsChanged(const QString&);
void workingDirectoryChanged(const QString&);
void baseCommandLineArgumentsChanged(const QString&);
void baseWorkingDirectoryChanged(const QString&);
void runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode runMode);
void usingDyldImageSuffixChanged(bool);
void baseEnvironmentChanged();
......@@ -116,9 +116,9 @@ protected:
private:
void setRunMode(RunMode runMode);
void setWorkingDirectory(const QString &workingDirectory);
void setBaseWorkingDirectory(const QString &workingDirectory);
QString baseWorkingDirectory() const;
void setArguments(const QString &argumentsString);
void setBaseCommandLineArguments(const QString &argumentsString);
QStringList baseCommandLineArguments() const;
enum BaseEnvironmentBase { CleanEnvironmentBase = 0,
SystemEnvironmentBase = 1,
......
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