diff options
author | Orgad Shaneh <orgad.shaneh@audiocodes.com> | 2014-05-26 23:42:25 +0300 |
---|---|---|
committer | Orgad Shaneh <orgads@gmail.com> | 2014-05-28 13:22:11 +0200 |
commit | af5b3246cf080afdc0fa75fe7808d569fb5d6302 (patch) | |
tree | af88ade4f8309970a2cce2c69cbcb5ae0bc2dc22 /src/plugins/qtsupport | |
parent | 536fb92f3b86ca468be5d89dc484a6337f507125 (diff) | |
download | qt-creator-af5b3246cf080afdc0fa75fe7808d569fb5d6302.tar.gz |
ProjectExplorer: Get rid of LocalApplicationRunConfiguration::RunMode
Change-Id: I132eb2615842ad7fdf6d7fa0f87d8c2c0c77203e
Reviewed-by: hjk <hjk121@nokiamail.com>
Diffstat (limited to 'src/plugins/qtsupport')
3 files changed, 14 insertions, 11 deletions
diff --git a/src/plugins/qtsupport/customexecutableconfigurationwidget.cpp b/src/plugins/qtsupport/customexecutableconfigurationwidget.cpp index b7fe8fac0f..7202a7b650 100644 --- a/src/plugins/qtsupport/customexecutableconfigurationwidget.cpp +++ b/src/plugins/qtsupport/customexecutableconfigurationwidget.cpp @@ -135,8 +135,8 @@ void CustomExecutableConfigurationWidget::workingDirectoryEdited() void CustomExecutableConfigurationWidget::termToggled(bool on) { m_ignoreChange = true; - m_runConfiguration->setRunMode(on ? ProjectExplorer::LocalApplicationRunConfiguration::Console - : ProjectExplorer::LocalApplicationRunConfiguration::Gui); + m_runConfiguration->setRunMode(on ? ProjectExplorer::ApplicationLauncher::Console + : ProjectExplorer::ApplicationLauncher::Gui); m_ignoreChange = false; } @@ -150,7 +150,7 @@ void CustomExecutableConfigurationWidget::changed() m_commandLineArgumentsLineEdit->setText(m_runConfiguration->rawCommandLineArguments()); m_workingDirectory->setPath(m_runConfiguration->baseWorkingDirectory()); m_useTerminalCheck->setChecked(m_runConfiguration->runMode() - == ProjectExplorer::LocalApplicationRunConfiguration::Console); + == ProjectExplorer::ApplicationLauncher::Console); } } // namespace Internal diff --git a/src/plugins/qtsupport/customexecutablerunconfiguration.cpp b/src/plugins/qtsupport/customexecutablerunconfiguration.cpp index 8526c0763b..33b8e68d46 100644 --- a/src/plugins/qtsupport/customexecutablerunconfiguration.cpp +++ b/src/plugins/qtsupport/customexecutablerunconfiguration.cpp @@ -71,7 +71,7 @@ void CustomExecutableRunConfiguration::ctor() CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Target *parent) : LocalApplicationRunConfiguration(parent, Core::Id(CUSTOM_EXECUTABLE_ID)), m_workingDirectory(QLatin1String(Constants::DEFAULT_WORKING_DIR)), - m_runMode(Gui) + m_runMode(ProjectExplorer::ApplicationLauncher::Gui) { addExtraAspect(new LocalEnvironmentAspect(this)); @@ -211,7 +211,7 @@ bool CustomExecutableRunConfiguration::isConfigured() const return !m_executable.isEmpty(); } -LocalApplicationRunConfiguration::RunMode CustomExecutableRunConfiguration::runMode() const +ApplicationLauncher::Mode CustomExecutableRunConfiguration::runMode() const { return m_runMode; } @@ -254,7 +254,8 @@ QVariantMap CustomExecutableRunConfiguration::toMap() const map.insert(QLatin1String(EXECUTABLE_KEY), m_executable); map.insert(QLatin1String(ARGUMENTS_KEY), m_cmdArguments); map.insert(QLatin1String(WORKING_DIRECTORY_KEY), m_workingDirectory); - map.insert(QLatin1String(USE_TERMINAL_KEY), m_runMode == Console); + map.insert(QLatin1String(USE_TERMINAL_KEY), + m_runMode == ProjectExplorer::ApplicationLauncher::Console); return map; } @@ -263,7 +264,9 @@ bool CustomExecutableRunConfiguration::fromMap(const QVariantMap &map) m_executable = map.value(QLatin1String(EXECUTABLE_KEY)).toString(); m_cmdArguments = map.value(QLatin1String(ARGUMENTS_KEY)).toString(); m_workingDirectory = map.value(QLatin1String(WORKING_DIRECTORY_KEY)).toString(); - m_runMode = map.value(QLatin1String(USE_TERMINAL_KEY)).toBool() ? Console : Gui; + m_runMode = map.value(QLatin1String(USE_TERMINAL_KEY)).toBool() + ? ProjectExplorer::ApplicationLauncher::Console + : ProjectExplorer::ApplicationLauncher::Gui; setDefaultDisplayName(defaultDisplayName()); return LocalApplicationRunConfiguration::fromMap(map); @@ -290,7 +293,7 @@ void CustomExecutableRunConfiguration::setBaseWorkingDirectory(const QString &wo emit changed(); } -void CustomExecutableRunConfiguration::setRunMode(LocalApplicationRunConfiguration::RunMode runMode) +void CustomExecutableRunConfiguration::setRunMode(ApplicationLauncher::Mode runMode) { m_runMode = runMode; emit changed(); diff --git a/src/plugins/qtsupport/customexecutablerunconfiguration.h b/src/plugins/qtsupport/customexecutablerunconfiguration.h index 021c1c91ab..86579a9b08 100644 --- a/src/plugins/qtsupport/customexecutablerunconfiguration.h +++ b/src/plugins/qtsupport/customexecutablerunconfiguration.h @@ -64,7 +64,7 @@ public: */ bool isConfigured() const; - RunMode runMode() const; + ProjectExplorer::ApplicationLauncher::Mode runMode() const; QString workingDirectory() const; QString commandLineArguments() const; @@ -95,13 +95,13 @@ private: void setBaseWorkingDirectory(const QString &workingDirectory); QString baseWorkingDirectory() const; void setUserName(const QString &name); - void setRunMode(ProjectExplorer::LocalApplicationRunConfiguration::RunMode runMode); + void setRunMode(ProjectExplorer::ApplicationLauncher::Mode runMode); bool validateExecutable(QString *executable = 0, QString *errorMessage = 0) const; QString m_executable; QString m_workingDirectory; QString m_cmdArguments; - RunMode m_runMode; + ProjectExplorer::ApplicationLauncher::Mode m_runMode; }; class CustomExecutableRunConfigurationFactory : public ProjectExplorer::IRunConfigurationFactory |