summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authordt <qtc-committer@nokia.com>2009-07-24 18:53:54 +0200
committerdt <qtc-committer@nokia.com>2009-07-24 18:53:54 +0200
commit1f738ce62c4b4c2e2f1ce90c61cec0713278d8ca (patch)
tree9eca06957c993def4ab72f169225742e36624369 /src/plugins
parentf1009fc63c2545438ad9097f69a5b7a4af7557f0 (diff)
downloadqt-creator-1f738ce62c4b4c2e2f1ce90c61cec0713278d8ca.tar.gz
Make importing update the widgets of QMakeStep and MakeStep
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/qt4projectmanager/makestep.cpp15
-rw-r--r--src/plugins/qt4projectmanager/makestep.h4
-rw-r--r--src/plugins/qt4projectmanager/qmakestep.cpp13
-rw-r--r--src/plugins/qt4projectmanager/qmakestep.h6
-rw-r--r--src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp4
5 files changed, 40 insertions, 2 deletions
diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp
index 37501d873a..449acfedeb 100644
--- a/src/plugins/qt4projectmanager/makestep.cpp
+++ b/src/plugins/qt4projectmanager/makestep.cpp
@@ -157,6 +157,12 @@ ProjectExplorer::BuildStepConfigWidget *MakeStep::createConfigWidget()
return new MakeStepConfigWidget(this);
}
+void MakeStep::setMakeArguments(const QString &buildConfiguration, const QStringList &arguments)
+{
+ setValue(buildConfiguration, "makeargs", arguments);
+ emit changed();
+}
+
MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
: BuildStepConfigWidget(), m_makeStep(makeStep)
{
@@ -165,6 +171,10 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep)
this, SLOT(makeLineEditTextEdited()));
connect(m_ui.makeArgumentsLineEdit, SIGNAL(textEdited(QString)),
this, SLOT(makeArgumentsLineEditTextEdited()));
+
+ connect(makeStep, SIGNAL(changed()),
+ this, SLOT(update()));
+
}
QString MakeStepConfigWidget::displayName() const
@@ -172,6 +182,11 @@ QString MakeStepConfigWidget::displayName() const
return m_makeStep->displayName();
}
+void MakeStepConfigWidget::update()
+{
+ init(m_buildConfiguration);
+}
+
void MakeStepConfigWidget::init(const QString &buildConfiguration)
{
m_buildConfiguration = buildConfiguration;
diff --git a/src/plugins/qt4projectmanager/makestep.h b/src/plugins/qt4projectmanager/makestep.h
index 6f069df015..b8d3d85997 100644
--- a/src/plugins/qt4projectmanager/makestep.h
+++ b/src/plugins/qt4projectmanager/makestep.h
@@ -72,6 +72,9 @@ public:
virtual QString displayName();
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
virtual bool immutable() const;
+ void setMakeArguments(const QString &buildConfiguration, const QStringList &arguments);
+signals:
+ void changed();
private:
QString m_buildConfiguration;
};
@@ -86,6 +89,7 @@ public:
private slots:
void makeLineEditTextEdited();
void makeArgumentsLineEditTextEdited();
+ void update();
private:
QString m_buildConfiguration;
Ui::MakeStep m_ui;
diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp
index 45699c6d2e..41b32669a1 100644
--- a/src/plugins/qt4projectmanager/qmakestep.cpp
+++ b/src/plugins/qt4projectmanager/qmakestep.cpp
@@ -193,6 +193,12 @@ bool QMakeStep::processFinished(int exitCode, QProcess::ExitStatus status)
return result;
}
+void QMakeStep::setQMakeArguments(const QString &buildConfiguration, const QStringList &arguments)
+{
+ setValue(buildConfiguration, "qmakeArgs", arguments);
+ emit changed();
+}
+
QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
: BuildStepConfigWidget(), m_step(step)
{
@@ -200,6 +206,8 @@ QMakeStepConfigWidget::QMakeStepConfigWidget(QMakeStep *step)
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()));
}
void QMakeStepConfigWidget::qmakeArgumentsLineEditTextEdited()
@@ -229,6 +237,11 @@ QString QMakeStepConfigWidget::displayName() const
return m_step->displayName();
}
+void QMakeStepConfigWidget::update()
+{
+ init(m_buildConfiguration);
+}
+
void QMakeStepConfigWidget::init(const QString &buildConfiguration)
{
m_buildConfiguration = buildConfiguration;
diff --git a/src/plugins/qt4projectmanager/qmakestep.h b/src/plugins/qt4projectmanager/qmakestep.h
index e4b4ee5870..59b87cecc6 100644
--- a/src/plugins/qt4projectmanager/qmakestep.h
+++ b/src/plugins/qt4projectmanager/qmakestep.h
@@ -77,6 +77,11 @@ public:
void setForced(bool b);
bool forced();
+ void setQMakeArguments(const QString &buildConfiguraion, const QStringList &arguments);
+
+signals:
+ void changed();
+
protected:
virtual void processStartupFailed();
virtual bool processFinished(int exitCode, QProcess::ExitStatus status);
@@ -100,6 +105,7 @@ public:
private slots:
void qmakeArgumentsLineEditTextEdited();
void buildConfigurationChanged();
+ void update();
private:
QString m_buildConfiguration;
Ui::QMakeStep m_ui;
diff --git a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
index 2f4b2273ae..e3bb5c6daf 100644
--- a/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectconfigwidget.cpp
@@ -263,7 +263,7 @@ void Qt4ProjectConfigWidget::importLabelClicked()
// Combo box will be updated at the end
QMakeStep *qmakeStep = m_pro->qmakeStep();
- qmakeStep->setValue(m_buildConfiguration, "qmakeArgs", additionalArguments);
+ qmakeStep->setQMakeArguments(m_buildConfiguration, additionalArguments);
MakeStep *makeStep = m_pro->makeStep();
m_pro->setValue(m_buildConfiguration, "buildConfiguration", int(qmakeBuildConfig));
@@ -281,7 +281,7 @@ void Qt4ProjectConfigWidget::importLabelClicked()
makeCmdArguments.removeAll("debug");
makeCmdArguments.removeAll("release");
}
- makeStep->setValue(m_buildConfiguration, "makeargs", makeCmdArguments);
+ makeStep->setMakeArguments(m_buildConfiguration, makeCmdArguments);
}
}
setupQtVersionsComboBox();