Commit 16fcb82d authored by dt's avatar dt
Browse files

Fix signal names and also ensure that we don't reset the cursor position

parent 527a9bd5
......@@ -216,10 +216,10 @@ bool QMakeStep::processFinished(int exitCode, QProcess::ExitStatus status)
return result;
}
void QMakeStep::setQMakeArguments(const QStringList &arguments)
void QMakeStep::setUserArguments(const QStringList &arguments)
{
m_userArgs = arguments;
emit changed();
emit userArgumentsChanged();
}
QStringList QMakeStep::userArguments()
......@@ -240,14 +240,14 @@ void QMakeStep::storeIntoLocalMap(QMap<QString, QVariant> &map)
}
QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
: BuildStepConfigWidget(), m_step(step)
: BuildStepConfigWidget(), m_step(step), m_ignoreChange(false)
{
m_ui.setupUi(this);
connect(m_ui.qmakeAdditonalArgumentsLineEdit, SIGNAL(textEdited(const QString&)),
this, SLOT(qmakeArgumentsLineEditTextEdited()));
connect(m_ui.buildConfigurationComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(buildConfigurationChanged()));
connect(step, SIGNAL(changed()),
this, SLOT(update()));
connect(step, SIGNAL(userArgumentsChanged()),
this, SLOT(userArgumentsChanged()));
connect(step->buildConfiguration(), SIGNAL(qtVersionChanged()),
this, SLOT(qtVersionChanged()));
}
......@@ -289,8 +289,10 @@ void QMakeStepConfigWidget::updateTitleLabel()
void QMakeStepConfigWidget::qmakeArgumentsLineEditTextEdited()
{
m_step->setQMakeArguments(
m_ignoreChange = true;
m_step->setUserArguments(
ProjectExplorer::Environment::parseCombinedArgString(m_ui.qmakeAdditonalArgumentsLineEdit->text()));
m_ignoreChange = false;
m_step->qt4BuildConfiguration()->qt4Project()->invalidateCachedTargetInformation();
updateTitleLabel();
......@@ -321,9 +323,12 @@ QString QMakeStepConfigWidget::displayName() const
return m_step->displayName();
}
void QMakeStepConfigWidget::update()
void QMakeStepConfigWidget::userArgumentsChanged()
{
init();
if (m_ignoreChange)
return;
QString qmakeArgs = ProjectExplorer::Environment::joinArgumentList(m_step->userArguments());
m_ui.qmakeAdditonalArgumentsLineEdit->setText(qmakeArgs);
}
void QMakeStepConfigWidget::init()
......
......@@ -83,13 +83,13 @@ public:
QStringList allArguments();
QStringList userArguments();
void setQMakeArguments(const QStringList &arguments);
void setUserArguments(const QStringList &arguments);
virtual void restoreFromLocalMap(const QMap<QString, QVariant> &map);
virtual void storeIntoLocalMap(QMap<QString, QVariant> &map);
signals:
void changed();
void userArgumentsChanged();
protected:
virtual void processStartupFailed();
......@@ -115,7 +115,7 @@ public:
private slots:
void qmakeArgumentsLineEditTextEdited();
void buildConfigurationChanged();
void update();
void userArgumentsChanged();
void qtVersionChanged();
private:
void updateTitleLabel();
......@@ -123,6 +123,7 @@ private:
Ui::QMakeStep m_ui;
QMakeStep *m_step;
QString m_summaryText;
bool m_ignoreChange;
};
} // namespace Qt4ProjectManager
......
......@@ -476,7 +476,7 @@ Qt4BuildConfiguration *Qt4Project::addQt4BuildConfiguration(QString displayName,
cleanStep->setClean(true);
bc->insertCleanStep(0, cleanStep);
if (!additionalArguments.isEmpty())
qmakeStep->setQMakeArguments(additionalArguments);
qmakeStep->setUserArguments(additionalArguments);
// set some options for qmake and make
if (qmakeBuildConfiguration & QtVersion::BuildAll) // debug_and_release => explicit targets
......
......@@ -298,7 +298,7 @@ void Qt4ProjectConfigWidget::importLabelClicked()
// Combo box will be updated at the end
QMakeStep *qmakeStep = m_buildConfiguration->qmakeStep();
qmakeStep->setQMakeArguments(additionalArguments);
qmakeStep->setUserArguments(additionalArguments);
MakeStep *makeStep = m_buildConfiguration->makeStep();
m_buildConfiguration->setValue("buildConfiguration", int(qmakeBuildConfig));
......
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