forked from qt-creator/qt-creator
ProjectExplorer: Get rid of LocalApplicationRunConfiguration::RunMode
Change-Id: I132eb2615842ad7fdf6d7fa0f87d8c2c0c77203e Reviewed-by: hjk <hjk121@nokiamail.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
536fb92f3b
commit
af5b3246cf
@@ -70,7 +70,7 @@ const char ARGUMENTS_KEY[] = "CMakeProjectManager.CMakeRunConfiguration.Argument
|
||||
CMakeRunConfiguration::CMakeRunConfiguration(Target *parent, Core::Id id, const QString &target,
|
||||
const QString &workingDirectory, const QString &title) :
|
||||
LocalApplicationRunConfiguration(parent, id),
|
||||
m_runMode(Gui),
|
||||
m_runMode(ProjectExplorer::ApplicationLauncher::Gui),
|
||||
m_buildTarget(target),
|
||||
m_workingDirectory(workingDirectory),
|
||||
m_title(title),
|
||||
@@ -107,12 +107,12 @@ QString CMakeRunConfiguration::executable() const
|
||||
return m_buildTarget;
|
||||
}
|
||||
|
||||
LocalApplicationRunConfiguration::RunMode CMakeRunConfiguration::runMode() const
|
||||
ApplicationLauncher::Mode CMakeRunConfiguration::runMode() const
|
||||
{
|
||||
return m_runMode;
|
||||
}
|
||||
|
||||
void CMakeRunConfiguration::setRunMode(RunMode runMode)
|
||||
void CMakeRunConfiguration::setRunMode(ApplicationLauncher::Mode runMode)
|
||||
{
|
||||
m_runMode = runMode;
|
||||
}
|
||||
@@ -174,7 +174,7 @@ QVariantMap CMakeRunConfiguration::toMap() const
|
||||
QVariantMap map(LocalApplicationRunConfiguration::toMap());
|
||||
|
||||
map.insert(QLatin1String(USER_WORKING_DIRECTORY_KEY), m_userWorkingDirectory);
|
||||
map.insert(QLatin1String(USE_TERMINAL_KEY), m_runMode == Console);
|
||||
map.insert(QLatin1String(USE_TERMINAL_KEY), m_runMode == ApplicationLauncher::Console);
|
||||
map.insert(QLatin1String(TITLE_KEY), m_title);
|
||||
map.insert(QLatin1String(ARGUMENTS_KEY), m_arguments);
|
||||
|
||||
@@ -184,7 +184,8 @@ QVariantMap CMakeRunConfiguration::toMap() const
|
||||
bool CMakeRunConfiguration::fromMap(const QVariantMap &map)
|
||||
{
|
||||
m_userWorkingDirectory = map.value(QLatin1String(USER_WORKING_DIRECTORY_KEY)).toString();
|
||||
m_runMode = map.value(QLatin1String(USE_TERMINAL_KEY)).toBool() ? Console : Gui;
|
||||
m_runMode = map.value(QLatin1String(USE_TERMINAL_KEY)).toBool() ? ApplicationLauncher::Console
|
||||
: ApplicationLauncher::Gui;
|
||||
m_title = map.value(QLatin1String(TITLE_KEY)).toString();
|
||||
m_arguments = map.value(QLatin1String(ARGUMENTS_KEY)).toString();
|
||||
|
||||
@@ -326,8 +327,8 @@ void CMakeRunConfigurationWidget::resetWorkingDirectory()
|
||||
|
||||
void CMakeRunConfigurationWidget::runInTerminalToggled(bool toggled)
|
||||
{
|
||||
m_cmakeRunConfiguration->setRunMode(toggled ? LocalApplicationRunConfiguration::Console
|
||||
: LocalApplicationRunConfiguration::Gui);
|
||||
m_cmakeRunConfiguration->setRunMode(toggled ? ApplicationLauncher::Console
|
||||
: ApplicationLauncher::Gui);
|
||||
}
|
||||
|
||||
void CMakeRunConfigurationWidget::environmentWasChanged()
|
||||
|
@@ -59,8 +59,8 @@ public:
|
||||
~CMakeRunConfiguration();
|
||||
|
||||
QString executable() const;
|
||||
RunMode runMode() const;
|
||||
void setRunMode(RunMode runMode);
|
||||
ProjectExplorer::ApplicationLauncher::Mode runMode() const;
|
||||
void setRunMode(ProjectExplorer::ApplicationLauncher::Mode runMode);
|
||||
QString workingDirectory() const;
|
||||
QString commandLineArguments() const;
|
||||
QWidget *createConfigurationWidget();
|
||||
@@ -93,7 +93,7 @@ private:
|
||||
QString baseWorkingDirectory() const;
|
||||
void ctor();
|
||||
|
||||
RunMode m_runMode;
|
||||
ProjectExplorer::ApplicationLauncher::Mode m_runMode;
|
||||
QString m_buildTarget;
|
||||
QString m_workingDirectory;
|
||||
QString m_userWorkingDirectory;
|
||||
|
@@ -333,7 +333,7 @@ static DebuggerStartParameters localStartParameters(RunConfiguration *runConfigu
|
||||
return sp;
|
||||
|
||||
sp.processArgs = rc->commandLineArguments();
|
||||
sp.useTerminal = rc->runMode() == LocalApplicationRunConfiguration::Console;
|
||||
sp.useTerminal = rc->runMode() == ApplicationLauncher::Console;
|
||||
|
||||
if (target) {
|
||||
if (const Project *project = target->project()) {
|
||||
|
@@ -45,13 +45,9 @@ class PROJECTEXPLORER_EXPORT LocalApplicationRunConfiguration : public RunConfig
|
||||
Q_OBJECT
|
||||
public:
|
||||
~LocalApplicationRunConfiguration();
|
||||
enum RunMode {
|
||||
Console = ApplicationLauncher::Console,
|
||||
Gui
|
||||
};
|
||||
|
||||
virtual QString executable() const = 0;
|
||||
virtual RunMode runMode() const = 0;
|
||||
virtual ApplicationLauncher::Mode runMode() const = 0;
|
||||
virtual QString workingDirectory() const = 0;
|
||||
virtual QString commandLineArguments() const = 0;
|
||||
|
||||
|
@@ -94,7 +94,7 @@ namespace Internal {
|
||||
QbsRunConfiguration::QbsRunConfiguration(Target *parent, Core::Id id) :
|
||||
LocalApplicationRunConfiguration(parent, id),
|
||||
m_qbsProduct(productFromId(id)),
|
||||
m_runMode(Gui),
|
||||
m_runMode(ApplicationLauncher::Gui),
|
||||
m_currentInstallStep(0),
|
||||
m_currentBuildStepList(0)
|
||||
{
|
||||
@@ -140,12 +140,12 @@ void QbsRunConfiguration::ctor()
|
||||
connect(project, SIGNAL(projectParsingStarted()), this, SIGNAL(enabledChanged()));
|
||||
connect(project, SIGNAL(projectParsingDone(bool)), this, SIGNAL(enabledChanged()));
|
||||
|
||||
connect(target(), SIGNAL(activeDeployConfigurationChanged(ProjectExplorer::DeployConfiguration*)),
|
||||
connect(target(), SIGNAL(activeDeployConfigurationChanged(DeployConfiguration*)),
|
||||
this, SLOT(installStepChanged()));
|
||||
installStepChanged();
|
||||
|
||||
if (isConsoleApplication())
|
||||
m_runMode = Console;
|
||||
m_runMode = ApplicationLauncher::Console;
|
||||
}
|
||||
|
||||
QWidget *QbsRunConfiguration::createConfigurationWidget()
|
||||
@@ -157,7 +157,7 @@ QVariantMap QbsRunConfiguration::toMap() const
|
||||
{
|
||||
QVariantMap map(LocalApplicationRunConfiguration::toMap());
|
||||
map.insert(QLatin1String(COMMAND_LINE_ARGUMENTS_KEY), m_commandLineArguments);
|
||||
map.insert(QLatin1String(USE_TERMINAL_KEY), m_runMode == Console);
|
||||
map.insert(QLatin1String(USE_TERMINAL_KEY), m_runMode == ApplicationLauncher::Console);
|
||||
map.insert(QLatin1String(USER_WORKING_DIRECTORY_KEY), m_userWorkingDirectory);
|
||||
return map;
|
||||
}
|
||||
@@ -165,7 +165,8 @@ QVariantMap QbsRunConfiguration::toMap() const
|
||||
bool QbsRunConfiguration::fromMap(const QVariantMap &map)
|
||||
{
|
||||
m_commandLineArguments = map.value(QLatin1String(COMMAND_LINE_ARGUMENTS_KEY)).toString();
|
||||
m_runMode = map.value(QLatin1String(USE_TERMINAL_KEY), false).toBool() ? Console : Gui;
|
||||
m_runMode = map.value(QLatin1String(USE_TERMINAL_KEY), false).toBool() ?
|
||||
ApplicationLauncher::Console : ApplicationLauncher::Gui;
|
||||
|
||||
m_userWorkingDirectory = map.value(QLatin1String(USER_WORKING_DIRECTORY_KEY)).toString();
|
||||
|
||||
@@ -209,7 +210,7 @@ QString QbsRunConfiguration::executable() const
|
||||
return pro->qbsProject().targetExecutable(product, installOptions());
|
||||
}
|
||||
|
||||
LocalApplicationRunConfiguration::RunMode QbsRunConfiguration::runMode() const
|
||||
ApplicationLauncher::Mode QbsRunConfiguration::runMode() const
|
||||
{
|
||||
return m_runMode;
|
||||
}
|
||||
@@ -274,7 +275,7 @@ void QbsRunConfiguration::setCommandLineArguments(const QString &argumentsString
|
||||
emit commandLineArgumentsChanged(argumentsString);
|
||||
}
|
||||
|
||||
void QbsRunConfiguration::setRunMode(RunMode runMode)
|
||||
void QbsRunConfiguration::setRunMode(ApplicationLauncher::Mode runMode)
|
||||
{
|
||||
m_runMode = runMode;
|
||||
emit runModeChanged(runMode);
|
||||
@@ -411,8 +412,8 @@ QbsRunConfigurationWidget::QbsRunConfigurationWidget(QbsRunConfiguration *rc, QW
|
||||
|
||||
connect(m_rc, SIGNAL(commandLineArgumentsChanged(QString)),
|
||||
this, SLOT(commandLineArgumentsChanged(QString)));
|
||||
connect(m_rc, SIGNAL(runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode)),
|
||||
this, SLOT(runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode)));
|
||||
connect(m_rc, SIGNAL(runModeChanged(ProjectExplorer::ApplicationLauncher::Mode)),
|
||||
this, SLOT(runModeChanged(ProjectExplorer::ApplicationLauncher::Mode)));
|
||||
connect(m_rc, SIGNAL(targetInformationChanged()),
|
||||
this, SLOT(targetInformationHasChanged()), Qt::QueuedConnection);
|
||||
|
||||
@@ -434,7 +435,7 @@ void QbsRunConfigurationWidget::runConfigurationEnabledChange()
|
||||
m_disabledReason->setVisible(!enabled);
|
||||
m_disabledReason->setText(m_rc->disabledReason());
|
||||
|
||||
m_useTerminalCheck->setChecked(m_rc->runMode() == LocalApplicationRunConfiguration::Console);
|
||||
m_useTerminalCheck->setChecked(m_rc->runMode() == ApplicationLauncher::Console);
|
||||
targetInformationHasChanged();
|
||||
}
|
||||
|
||||
@@ -464,8 +465,7 @@ void QbsRunConfigurationWidget::argumentsEdited(const QString &args)
|
||||
void QbsRunConfigurationWidget::termToggled(bool on)
|
||||
{
|
||||
m_ignoreChange = true;
|
||||
m_rc->setRunMode(on ? LocalApplicationRunConfiguration::Console
|
||||
: LocalApplicationRunConfiguration::Gui);
|
||||
m_rc->setRunMode(on ? ApplicationLauncher::Console : ApplicationLauncher::Gui);
|
||||
m_ignoreChange = false;
|
||||
}
|
||||
|
||||
@@ -492,10 +492,10 @@ void QbsRunConfigurationWidget::commandLineArgumentsChanged(const QString &args)
|
||||
m_argumentsLineEdit->setText(args);
|
||||
}
|
||||
|
||||
void QbsRunConfigurationWidget::runModeChanged(LocalApplicationRunConfiguration::RunMode runMode)
|
||||
void QbsRunConfigurationWidget::runModeChanged(ApplicationLauncher::Mode runMode)
|
||||
{
|
||||
if (!m_ignoreChange)
|
||||
m_useTerminalCheck->setChecked(runMode == LocalApplicationRunConfiguration::Console);
|
||||
m_useTerminalCheck->setChecked(runMode == ProjectExplorer::ApplicationLauncher::Console);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
|
@@ -77,7 +77,7 @@ public:
|
||||
QWidget *createConfigurationWidget();
|
||||
|
||||
QString executable() const;
|
||||
RunMode runMode() const;
|
||||
ProjectExplorer::ApplicationLauncher::Mode runMode() const;
|
||||
QString workingDirectory() const;
|
||||
QString commandLineArguments() const;
|
||||
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
|
||||
Utils::OutputFormatter *createOutputFormatter() const;
|
||||
|
||||
void setRunMode(RunMode runMode);
|
||||
void setRunMode(ProjectExplorer::ApplicationLauncher::Mode runMode);
|
||||
|
||||
void addToBaseEnvironment(Utils::Environment &env) const;
|
||||
|
||||
@@ -95,7 +95,7 @@ public:
|
||||
signals:
|
||||
void commandLineArgumentsChanged(const QString&);
|
||||
void baseWorkingDirectoryChanged(const QString&);
|
||||
void runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode runMode);
|
||||
void runModeChanged(ProjectExplorer::ApplicationLauncher::Mode runMode);
|
||||
void targetInformationChanged();
|
||||
void usingDyldImageSuffixChanged(bool);
|
||||
|
||||
@@ -123,7 +123,7 @@ private:
|
||||
QString m_commandLineArguments;
|
||||
|
||||
// Cached startup sub project information
|
||||
ProjectExplorer::LocalApplicationRunConfiguration::RunMode m_runMode;
|
||||
ProjectExplorer::ApplicationLauncher::Mode m_runMode;
|
||||
QString m_userWorkingDirectory;
|
||||
|
||||
QbsInstallStep *m_currentInstallStep; // We do not take ownership!
|
||||
@@ -146,7 +146,7 @@ private slots:
|
||||
|
||||
void workingDirectoryChanged(const QString &workingDirectory);
|
||||
void commandLineArgumentsChanged(const QString &args);
|
||||
void runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode runMode);
|
||||
void runModeChanged(ProjectExplorer::ApplicationLauncher::Mode runMode);
|
||||
|
||||
void termToggled(bool);
|
||||
|
||||
|
@@ -80,7 +80,7 @@ static QString pathFromId(Core::Id id)
|
||||
DesktopQmakeRunConfiguration::DesktopQmakeRunConfiguration(Target *parent, Core::Id id) :
|
||||
LocalApplicationRunConfiguration(parent, id),
|
||||
m_proFilePath(pathFromId(id)),
|
||||
m_runMode(Gui),
|
||||
m_runMode(ApplicationLauncher::Gui),
|
||||
m_isUsingDyldImageSuffix(false)
|
||||
{
|
||||
addExtraAspect(new ProjectExplorer::LocalEnvironmentAspect(this));
|
||||
@@ -240,13 +240,13 @@ DesktopQmakeRunConfigurationWidget::DesktopQmakeRunConfigurationWidget(DesktopQm
|
||||
|
||||
QHBoxLayout *innerBox = new QHBoxLayout();
|
||||
m_useTerminalCheck = new QCheckBox(tr("Run in terminal"), this);
|
||||
m_useTerminalCheck->setChecked(m_qmakeRunConfiguration->runMode() == LocalApplicationRunConfiguration::Console);
|
||||
m_useTerminalCheck->setChecked(m_qmakeRunConfiguration->runMode() == ApplicationLauncher::Console);
|
||||
m_useTerminalCheck->setVisible(!m_qmakeRunConfiguration->forcedGuiMode());
|
||||
innerBox->addWidget(m_useTerminalCheck);
|
||||
|
||||
m_useQvfbCheck = new QCheckBox(tr("Run on QVFb"), this);
|
||||
m_useQvfbCheck->setToolTip(tr("Check this option to run the application on a Qt Virtual Framebuffer."));
|
||||
m_useQvfbCheck->setChecked(m_qmakeRunConfiguration->runMode() == LocalApplicationRunConfiguration::Console);
|
||||
m_useQvfbCheck->setChecked(m_qmakeRunConfiguration->runMode() == ApplicationLauncher::Console);
|
||||
m_useQvfbCheck->setVisible(false);
|
||||
innerBox->addWidget(m_useQvfbCheck);
|
||||
innerBox->addStretch();
|
||||
@@ -280,8 +280,8 @@ DesktopQmakeRunConfigurationWidget::DesktopQmakeRunConfigurationWidget(DesktopQm
|
||||
|
||||
connect(qmakeRunConfiguration, SIGNAL(commandLineArgumentsChanged(QString)),
|
||||
this, SLOT(commandLineArgumentsChanged(QString)));
|
||||
connect(qmakeRunConfiguration, SIGNAL(runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode)),
|
||||
this, SLOT(runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode)));
|
||||
connect(qmakeRunConfiguration, SIGNAL(runModeChanged(ProjectExplorer::ApplicationLauncher::Mode)),
|
||||
this, SLOT(runModeChanged(ProjectExplorer::ApplicationLauncher::Mode)));
|
||||
connect(qmakeRunConfiguration, SIGNAL(usingDyldImageSuffixChanged(bool)),
|
||||
this, SLOT(usingDyldImageSuffixChanged(bool)));
|
||||
connect(qmakeRunConfiguration, SIGNAL(effectiveTargetInformationChanged()),
|
||||
@@ -336,8 +336,8 @@ void DesktopQmakeRunConfigurationWidget::argumentsEdited(const QString &args)
|
||||
void DesktopQmakeRunConfigurationWidget::termToggled(bool on)
|
||||
{
|
||||
m_ignoreChange = true;
|
||||
m_qmakeRunConfiguration->setRunMode(on ? LocalApplicationRunConfiguration::Console
|
||||
: LocalApplicationRunConfiguration::Gui);
|
||||
m_qmakeRunConfiguration->setRunMode(on ? ApplicationLauncher::Console
|
||||
: ApplicationLauncher::Gui);
|
||||
m_ignoreChange = false;
|
||||
}
|
||||
|
||||
@@ -368,11 +368,11 @@ void DesktopQmakeRunConfigurationWidget::commandLineArgumentsChanged(const QStri
|
||||
m_argumentsLineEdit->setText(args);
|
||||
}
|
||||
|
||||
void DesktopQmakeRunConfigurationWidget::runModeChanged(LocalApplicationRunConfiguration::RunMode runMode)
|
||||
void DesktopQmakeRunConfigurationWidget::runModeChanged(ApplicationLauncher::Mode runMode)
|
||||
{
|
||||
if (!m_ignoreChange) {
|
||||
m_useTerminalCheck->setVisible(!m_qmakeRunConfiguration->forcedGuiMode());
|
||||
m_useTerminalCheck->setChecked(runMode == LocalApplicationRunConfiguration::Console);
|
||||
m_useTerminalCheck->setChecked(runMode == ApplicationLauncher::Console);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -416,7 +416,7 @@ QVariantMap DesktopQmakeRunConfiguration::toMap() const
|
||||
QVariantMap map(LocalApplicationRunConfiguration::toMap());
|
||||
map.insert(QLatin1String(COMMAND_LINE_ARGUMENTS_KEY), m_commandLineArguments);
|
||||
map.insert(QLatin1String(PRO_FILE_KEY), projectDir.relativeFilePath(m_proFilePath));
|
||||
map.insert(QLatin1String(USE_TERMINAL_KEY), m_runMode == Console);
|
||||
map.insert(QLatin1String(USE_TERMINAL_KEY), m_runMode == ApplicationLauncher::Console);
|
||||
map.insert(QLatin1String(USE_DYLD_IMAGE_SUFFIX_KEY), m_isUsingDyldImageSuffix);
|
||||
map.insert(QLatin1String(USER_WORKING_DIRECTORY_KEY), m_userWorkingDirectory);
|
||||
return map;
|
||||
@@ -427,7 +427,8 @@ bool DesktopQmakeRunConfiguration::fromMap(const QVariantMap &map)
|
||||
const QDir projectDir = QDir(target()->project()->projectDirectory().toString());
|
||||
m_commandLineArguments = map.value(QLatin1String(COMMAND_LINE_ARGUMENTS_KEY)).toString();
|
||||
m_proFilePath = QDir::cleanPath(projectDir.filePath(map.value(QLatin1String(PRO_FILE_KEY)).toString()));
|
||||
m_runMode = map.value(QLatin1String(USE_TERMINAL_KEY), false).toBool() ? Console : Gui;
|
||||
m_runMode = map.value(QLatin1String(USE_TERMINAL_KEY), false).toBool()
|
||||
? ApplicationLauncher::Console : ApplicationLauncher::Gui;
|
||||
m_isUsingDyldImageSuffix = map.value(QLatin1String(USE_DYLD_IMAGE_SUFFIX_KEY), false).toBool();
|
||||
|
||||
m_userWorkingDirectory = map.value(QLatin1String(USER_WORKING_DIRECTORY_KEY)).toString();
|
||||
@@ -445,10 +446,10 @@ QString DesktopQmakeRunConfiguration::executable() const
|
||||
return extractWorkingDirAndExecutable(node).second;
|
||||
}
|
||||
|
||||
LocalApplicationRunConfiguration::RunMode DesktopQmakeRunConfiguration::runMode() const
|
||||
ApplicationLauncher::Mode DesktopQmakeRunConfiguration::runMode() const
|
||||
{
|
||||
if (m_forcedGuiMode)
|
||||
return LocalApplicationRunConfiguration::Gui;
|
||||
return ProjectExplorer::ApplicationLauncher::Gui;
|
||||
return m_runMode;
|
||||
}
|
||||
|
||||
@@ -515,7 +516,7 @@ void DesktopQmakeRunConfiguration::setCommandLineArguments(const QString &argume
|
||||
emit commandLineArgumentsChanged(argumentsString);
|
||||
}
|
||||
|
||||
void DesktopQmakeRunConfiguration::setRunMode(RunMode runMode)
|
||||
void DesktopQmakeRunConfiguration::setRunMode(ApplicationLauncher::Mode runMode)
|
||||
{
|
||||
m_runMode = runMode;
|
||||
emit runModeChanged(runMode);
|
||||
@@ -637,8 +638,7 @@ RunConfiguration *DesktopQmakeRunConfigurationFactory::doCreate(Target *parent,
|
||||
if (node) // should always be found
|
||||
rc->setRunMode(node->variableValue(ConfigVar).contains(QLatin1String("console"))
|
||||
&& !node->variableValue(QtVar).contains(QLatin1String("testlib"))
|
||||
? LocalApplicationRunConfiguration::Console
|
||||
: LocalApplicationRunConfiguration::Gui);
|
||||
? ApplicationLauncher::Console : ApplicationLauncher::Gui);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
@@ -77,7 +77,7 @@ public:
|
||||
virtual QWidget *createConfigurationWidget();
|
||||
|
||||
virtual QString executable() const;
|
||||
virtual RunMode runMode() const;
|
||||
virtual ProjectExplorer::ApplicationLauncher::Mode runMode() const;
|
||||
bool forcedGuiMode() const;
|
||||
virtual QString workingDirectory() const;
|
||||
virtual QString commandLineArguments() const;
|
||||
@@ -91,14 +91,14 @@ public:
|
||||
|
||||
Utils::OutputFormatter *createOutputFormatter() const;
|
||||
|
||||
void setRunMode(RunMode runMode);
|
||||
void setRunMode(ProjectExplorer::ApplicationLauncher::Mode runMode);
|
||||
|
||||
void addToBaseEnvironment(Utils::Environment &env) const;
|
||||
|
||||
signals:
|
||||
void commandLineArgumentsChanged(const QString&);
|
||||
void baseWorkingDirectoryChanged(const QString&);
|
||||
void runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode runMode);
|
||||
void runModeChanged(ProjectExplorer::ApplicationLauncher::Mode runMode);
|
||||
void usingDyldImageSuffixChanged(bool);
|
||||
|
||||
// Note: These signals might not get emitted for every change!
|
||||
@@ -127,7 +127,7 @@ private:
|
||||
QString m_proFilePath; // Full path to the Application Pro File
|
||||
|
||||
// Cached startup sub project information
|
||||
ProjectExplorer::LocalApplicationRunConfiguration::RunMode m_runMode;
|
||||
ProjectExplorer::ApplicationLauncher::Mode m_runMode;
|
||||
bool m_forcedGuiMode;
|
||||
bool m_isUsingDyldImageSuffix;
|
||||
QString m_userWorkingDirectory;
|
||||
@@ -156,7 +156,7 @@ private slots:
|
||||
|
||||
void workingDirectoryChanged(const QString &workingDirectory);
|
||||
void commandLineArgumentsChanged(const QString &args);
|
||||
void runModeChanged(ProjectExplorer::LocalApplicationRunConfiguration::RunMode runMode);
|
||||
void runModeChanged(ProjectExplorer::ApplicationLauncher::Mode runMode);
|
||||
|
||||
void effectiveTargetInformationChanged();
|
||||
void termToggled(bool);
|
||||
|
@@ -115,9 +115,9 @@ QString QmlProjectRunConfiguration::executable() const
|
||||
return version->qmlviewerCommand();
|
||||
}
|
||||
|
||||
LocalApplicationRunConfiguration::RunMode QmlProjectRunConfiguration::runMode() const
|
||||
ApplicationLauncher::Mode QmlProjectRunConfiguration::runMode() const
|
||||
{
|
||||
return Gui;
|
||||
return ApplicationLauncher::Gui;
|
||||
}
|
||||
|
||||
QString QmlProjectRunConfiguration::commandLineArguments() const
|
||||
|
@@ -61,7 +61,7 @@ public:
|
||||
QmlProjectRunConfiguration(ProjectExplorer::Target *parent, Core::Id id);
|
||||
|
||||
QString executable() const;
|
||||
RunMode runMode() const;
|
||||
ProjectExplorer::ApplicationLauncher::Mode runMode() const;
|
||||
QString commandLineArguments() const;
|
||||
|
||||
QString workingDirectory() const;
|
||||
|
@@ -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
|
||||
|
@@ -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();
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user