Commit e72e0796 authored by Thorbjørn Lindeijer's avatar Thorbjørn Lindeijer
Browse files

Initialize run mode correctly

It was missing for CustomExecutableRunConfiguration and
Qt4RunConfiguration.

Reviewed-by: dt
parent 70cf2c76
......@@ -39,7 +39,11 @@ using namespace CMakeProjectManager;
using namespace CMakeProjectManager::Internal;
CMakeRunConfiguration::CMakeRunConfiguration(CMakeProject *pro, const QString &target, const QString &workingDirectory, const QString &title)
: ProjectExplorer::ApplicationRunConfiguration(pro), m_runMode(Gui), m_target(target), m_workingDirectory(workingDirectory), m_title(title)
: ProjectExplorer::ApplicationRunConfiguration(pro)
, m_runMode(Gui)
, m_target(target)
, m_workingDirectory(workingDirectory)
, m_title(title)
{
setName(title);
}
......
......@@ -255,9 +255,9 @@ GenericMakeStepConfigWidget::GenericMakeStepConfigWidget(GenericMakeStep *makeSt
connect(m_ui->targetsList, SIGNAL(itemChanged(QListWidgetItem*)),
this, SLOT(itemChanged(QListWidgetItem*)));
connect(m_ui->makeLineEdit, SIGNAL(textEdited(const QString&)),
connect(m_ui->makeLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(makeLineEditTextEdited()));
connect(m_ui->makeArgumentsLineEdit, SIGNAL(textEdited(const QString&)),
connect(m_ui->makeArgumentsLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(makeArgumentsLineEditTextEdited()));
}
......
......@@ -61,7 +61,7 @@ CustomExecutableConfigurationWidget::CustomExecutableConfigurationWidget(CustomE
{
m_runConfiguration = rc;
QFormLayout *layout = new QFormLayout();
QFormLayout *layout = new QFormLayout;
layout->setMargin(0);
m_userName = new QLineEdit(this);
......@@ -147,7 +147,8 @@ void CustomExecutableConfigurationWidget::changed()
CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Project *pro)
: ApplicationRunConfiguration(pro),
m_userSetName(false)
m_userSetName(false),
m_runMode(Gui)
{
m_workingDirectory = "$BUILDDIR";
setName("Custom Executable");
......
......@@ -272,9 +272,9 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
: BuildStepConfigWidget(), m_makeStep(makeStep)
{
m_ui.setupUi(this);
connect(m_ui.makeLineEdit, SIGNAL(textEdited(const QString&)),
connect(m_ui.makeLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(makeLineEditTextEdited()));
connect(m_ui.makeArgumentsLineEdit, SIGNAL(textEdited(const QString&)),
connect(m_ui.makeArgumentsLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(makeArgumentsLineEditTextEdited()));
}
......@@ -312,5 +312,6 @@ void MakeStepConfigWidget::makeLineEditTextEdited()
void MakeStepConfigWidget::makeArgumentsLineEditTextEdited()
{
Q_ASSERT(!m_buildConfiguration.isNull());
m_makeStep->setValue(m_buildConfiguration, "makeargs", ProjectExplorer::Environment::parseCombinedArgString(m_ui.makeArgumentsLineEdit->text()));
m_makeStep->setValue(m_buildConfiguration, "makeargs",
ProjectExplorer::Environment::parseCombinedArgString(m_ui.makeArgumentsLineEdit->text()));
}
......@@ -54,6 +54,7 @@ using ProjectExplorer::PersistentSettingsWriter;
Qt4RunConfiguration::Qt4RunConfiguration(Qt4Project *pro, QString proFilePath)
: ApplicationRunConfiguration(pro),
m_proFilePath(proFilePath),
m_runMode(Gui),
m_userSetName(false),
m_configWidget(0),
m_executableLabel(0),
......@@ -111,11 +112,11 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
m_useTerminalCheck->setChecked(m_qt4RunConfiguration->runMode() == ProjectExplorer::ApplicationRunConfiguration::Console);
toplayout->addRow(QString(), m_useTerminalCheck);
connect(m_argumentsLineEdit, SIGNAL(textEdited(const QString&)),
this, SLOT(setCommandLineArguments(const QString&)));
connect(m_argumentsLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(setCommandLineArguments(QString)));
connect(m_nameLineEdit, SIGNAL(textEdited(const QString&)),
this, SLOT(nameEdited(const QString&)));
connect(m_nameLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(nameEdited(QString)));
connect(m_useTerminalCheck, SIGNAL(toggled(bool)),
this, SLOT(termToggled(bool)));
......
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