diff --git a/src/plugins/cmakeprojectmanager/makestep.cpp b/src/plugins/cmakeprojectmanager/makestep.cpp index 4867c5df5b894065ac4358f89f51caaefabd72b9..d19610c264171b43480c1a8313e13702dfb02042 100644 --- a/src/plugins/cmakeprojectmanager/makestep.cpp +++ b/src/plugins/cmakeprojectmanager/makestep.cpp @@ -223,8 +223,7 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep) m_additionalArguments = new QLineEdit(this); fl->addRow(tr("Additional arguments:"), m_additionalArguments); - - connect(m_additionalArguments, SIGNAL(textEdited(const QString &)), this, SLOT(additionalArgumentsEdited())); + m_additionalArguments->setText(m_makeStep->additionalArguments()); m_buildTargetsList = new QListWidget; m_buildTargetsList->setMinimumHeight(200); @@ -236,12 +235,18 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep) foreach(const QString& buildTarget, pro->buildTargetTitles()) { QListWidgetItem *item = new QListWidgetItem(buildTarget, m_buildTargetsList); item->setFlags(item->flags() | Qt::ItemIsUserCheckable); - item->setCheckState(Qt::Unchecked); + item->setCheckState(m_makeStep->buildsBuildTarget(item->text()) ? Qt::Checked : Qt::Unchecked); } + updateDetails(); + + connect(m_additionalArguments, SIGNAL(textEdited(const QString &)), this, SLOT(additionalArgumentsEdited())); connect(m_buildTargetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*))); connect(ProjectExplorer::ProjectExplorerPlugin::instance(), SIGNAL(settingsChanged()), this, SLOT(updateDetails())); + + connect(pro, SIGNAL(buildTargetsChanged()), + this, SLOT(buildTargetsChanged())); } void MakeStepConfigWidget::additionalArgumentsEdited() @@ -261,26 +266,6 @@ QString MakeStepConfigWidget::displayName() const return tr("Make", "CMakeProjectManager::MakeStepConfigWidget display name."); } -void MakeStepConfigWidget::init() -{ - // disconnect to make the changes to the items - disconnect(m_buildTargetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*))); - int count = m_buildTargetsList->count(); - for(int i = 0; i < count; ++i) { - QListWidgetItem *item = m_buildTargetsList->item(i); - item->setCheckState(m_makeStep->buildsBuildTarget(item->text()) ? Qt::Checked : Qt::Unchecked); - } - // and connect again - connect(m_buildTargetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*))); - - m_additionalArguments->setText(m_makeStep->additionalArguments()); - updateDetails(); - - CMakeProject *pro = m_makeStep->cmakeBuildConfiguration()->cmakeTarget()->cmakeProject(); - connect(pro, SIGNAL(buildTargetsChanged()), - this, SLOT(buildTargetsChanged())); -} - void MakeStepConfigWidget::buildTargetsChanged() { disconnect(m_buildTargetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*))); diff --git a/src/plugins/cmakeprojectmanager/makestep.h b/src/plugins/cmakeprojectmanager/makestep.h index 117f9465556f9e3ec8c4130f5a4968d6a9419439..53d55d5e4bb97fc9e04571702987e15f79cae79b 100644 --- a/src/plugins/cmakeprojectmanager/makestep.h +++ b/src/plugins/cmakeprojectmanager/makestep.h @@ -100,7 +100,6 @@ class MakeStepConfigWidget :public ProjectExplorer::BuildStepConfigWidget public: MakeStepConfigWidget(MakeStep *makeStep); virtual QString displayName() const; - virtual void init(); virtual QString summaryText() const; private slots: void itemChanged(QListWidgetItem*); diff --git a/src/plugins/genericprojectmanager/genericmakestep.cpp b/src/plugins/genericprojectmanager/genericmakestep.cpp index 979795a327fbc0c31d1dac9579c145c27e4c2980..488040448ea7dfc19ee72fdbeb9e97e0da2e2572 100644 --- a/src/plugins/genericprojectmanager/genericmakestep.cpp +++ b/src/plugins/genericprojectmanager/genericmakestep.cpp @@ -207,9 +207,14 @@ GenericMakeStepConfigWidget::GenericMakeStepConfigWidget(GenericMakeStep *makeSt foreach (const QString &target, pro->buildTargets()) { QListWidgetItem *item = new QListWidgetItem(target, m_ui->targetsList); item->setFlags(item->flags() | Qt::ItemIsUserCheckable); - item->setCheckState(Qt::Unchecked); + item->setCheckState(m_makeStep->buildsTarget(item->text()) ? Qt::Checked : Qt::Unchecked); } + m_ui->makeLineEdit->setText(m_makeStep->m_makeCommand); + m_ui->makeArgumentsLineEdit->setText(m_makeStep->m_makeArguments); + updateMakeOverrrideLabel(); + updateDetails(); + connect(m_ui->targetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*))); connect(m_ui->makeLineEdit, SIGNAL(textEdited(QString)), @@ -234,27 +239,6 @@ void GenericMakeStepConfigWidget::updateMakeOverrrideLabel() m_ui->makeLabel->setText(tr("Override %1:").arg(m_makeStep->makeCommand())); } -void GenericMakeStepConfigWidget::init() -{ - updateMakeOverrrideLabel(); - - m_ui->makeLineEdit->setText(m_makeStep->m_makeCommand); - m_ui->makeArgumentsLineEdit->setText(m_makeStep->m_makeArguments); - - // Disconnect to make the changes to the items - disconnect(m_ui->targetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*))); - - int count = m_ui->targetsList->count(); - for (int i = 0; i < count; ++i) { - QListWidgetItem *item = m_ui->targetsList->item(i); - item->setCheckState(m_makeStep->buildsTarget(item->text()) ? Qt::Checked : Qt::Unchecked); - } - - updateDetails(); - // and connect again - connect(m_ui->targetsList, SIGNAL(itemChanged(QListWidgetItem*)), this, SLOT(itemChanged(QListWidgetItem*))); -} - void GenericMakeStepConfigWidget::updateDetails() { GenericBuildConfiguration *bc = m_makeStep->genericBuildConfiguration(); diff --git a/src/plugins/genericprojectmanager/genericmakestep.h b/src/plugins/genericprojectmanager/genericmakestep.h index 8962c4c9e17c7dcd7b7498d7e9039c190158b972..862c6aaa3a23c72b04b42c3b5bc3b73f052667dd 100644 --- a/src/plugins/genericprojectmanager/genericmakestep.h +++ b/src/plugins/genericprojectmanager/genericmakestep.h @@ -94,7 +94,6 @@ class GenericMakeStepConfigWidget :public ProjectExplorer::BuildStepConfigWidget public: GenericMakeStepConfigWidget(GenericMakeStep *makeStep); virtual QString displayName() const; - virtual void init(); virtual QString summaryText() const; private slots: void itemChanged(QListWidgetItem*); diff --git a/src/plugins/projectexplorer/buildstep.h b/src/plugins/projectexplorer/buildstep.h index 5db51c85c4890dab00150802fffdbb85c99e1f27..b4b3d116ebc35cfa97ee510e53a796d9049ab575 100644 --- a/src/plugins/projectexplorer/buildstep.h +++ b/src/plugins/projectexplorer/buildstep.h @@ -132,7 +132,6 @@ public: BuildStepConfigWidget() : QWidget() {} - virtual void init() = 0; virtual QString summaryText() const = 0; virtual QString displayName() const = 0; signals: diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp index 04522497454942bdce4908feddc5196fe9c966bc..52e742fcd647f9bda32ac5efa94224150144ee35 100644 --- a/src/plugins/projectexplorer/buildstepspage.cpp +++ b/src/plugins/projectexplorer/buildstepspage.cpp @@ -62,7 +62,6 @@ BuildStepsWidgetData::BuildStepsWidgetData(BuildStep *s) : { widget = s->createConfigWidget(); Q_ASSERT(widget); - widget->init(); detailsWidget = new Utils::DetailsWidget; detailsWidget->setWidget(widget); diff --git a/src/plugins/projectexplorer/processstep.cpp b/src/plugins/projectexplorer/processstep.cpp index 419e29f827200ea3104496fd8cb4dc8572acc756..20e8a42f8eaf6e6a588b8b4d72dd4b9666807dd2 100644 --- a/src/plugins/projectexplorer/processstep.cpp +++ b/src/plugins/projectexplorer/processstep.cpp @@ -259,6 +259,18 @@ ProcessStepConfigWidget::ProcessStepConfigWidget(ProcessStep *step) m_ui.setupUi(this); m_ui.command->setExpectedKind(Utils::PathChooser::Command); m_ui.workingDirectory->setExpectedKind(Utils::PathChooser::Directory); + + m_ui.command->setEnvironment(m_step->buildConfiguration()->environment()); + m_ui.command->setPath(m_step->command()); + + m_ui.workingDirectory->setEnvironment(m_step->buildConfiguration()->environment()); + m_ui.workingDirectory->setPath(m_step->workingDirectory()); + + m_ui.commandArgumentsLineEdit->setText(m_step->arguments()); + m_ui.enabledCheckBox->setChecked(m_step->enabled()); + + updateDetails(); + connect(m_ui.command, SIGNAL(changed(QString)), this, SLOT(commandLineEditTextEdited())); connect(m_ui.workingDirectory, SIGNAL(changed(QString)), @@ -294,20 +306,6 @@ QString ProcessStepConfigWidget::displayName() const return m_step->displayName(); } -void ProcessStepConfigWidget::init() -{ - m_ui.command->setEnvironment(m_step->buildConfiguration()->environment()); - m_ui.command->setPath(m_step->command()); - - m_ui.workingDirectory->setEnvironment(m_step->buildConfiguration()->environment()); - m_ui.workingDirectory->setPath(m_step->workingDirectory()); - - m_ui.commandArgumentsLineEdit->setText(m_step->arguments()); - m_ui.enabledCheckBox->setChecked(m_step->enabled()); - - updateDetails(); -} - QString ProcessStepConfigWidget::summaryText() const { return m_summaryText; diff --git a/src/plugins/projectexplorer/processstep.h b/src/plugins/projectexplorer/processstep.h index 1b89913d1736b508fec59dc0032b78c23a23dd9c..1c1bbe8ad6f8c88b5d042e4e8bafc4880b5c1e8b 100644 --- a/src/plugins/projectexplorer/processstep.h +++ b/src/plugins/projectexplorer/processstep.h @@ -109,7 +109,6 @@ class ProcessStepConfigWidget : public BuildStepConfigWidget public: ProcessStepConfigWidget(ProcessStep *step); virtual QString displayName() const; - virtual void init(); virtual QString summaryText() const; private slots: void commandLineEditTextEdited(); diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp index 77ac9fdd12aef582575f7b830d6bd7e51303b558..44b195471bb8f6608e0c2b71eee61e34e341c02e 100644 --- a/src/plugins/qt4projectmanager/makestep.cpp +++ b/src/plugins/qt4projectmanager/makestep.cpp @@ -288,6 +288,14 @@ MakeStepConfigWidget::MakeStepConfigWidget(MakeStep *makeStep) m_ui->makePathChooser->setExpectedKind(Utils::PathChooser::ExistingCommand); m_ui->makePathChooser->setBaseDirectory(Utils::PathChooser::homePath()); + + const QString &makeCmd = m_makeStep->m_makeCmd; + m_ui->makePathChooser->setPath(makeCmd); + m_ui->makeArgumentsLineEdit->setText(m_makeStep->userArguments()); + + updateMakeOverrideLabel(); + updateDetails(); + connect(m_ui->makePathChooser, SIGNAL(changed(QString)), this, SLOT(makeEdited())); connect(m_ui->makeArgumentsLineEdit, SIGNAL(textEdited(QString)), @@ -382,17 +390,6 @@ void MakeStepConfigWidget::userArgumentsChanged() updateDetails(); } -void MakeStepConfigWidget::init() -{ - updateMakeOverrideLabel(); - - const QString &makeCmd = m_makeStep->m_makeCmd; - m_ui->makePathChooser->setPath(makeCmd); - - m_ui->makeArgumentsLineEdit->setText(m_makeStep->userArguments()); - updateDetails(); -} - void MakeStepConfigWidget::makeEdited() { m_makeStep->m_makeCmd = m_ui->makePathChooser->rawPath(); diff --git a/src/plugins/qt4projectmanager/makestep.h b/src/plugins/qt4projectmanager/makestep.h index 235ba2ad694cc93c00e9c6cefdc34120f4082cc2..1a11b727ff5957221e3e93798851073646aa1fd5 100644 --- a/src/plugins/qt4projectmanager/makestep.h +++ b/src/plugins/qt4projectmanager/makestep.h @@ -128,7 +128,6 @@ public: virtual ~MakeStepConfigWidget(); QString displayName() const; - void init(); QString summaryText() const; private slots: // User changes to our widgets diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp index fc3be8b80240502d233e249493a4645561e6c63b..554e25717e3be3c6a7e7122cd4a3b84af526b9e9 100644 --- a/src/plugins/qt4projectmanager/qmakestep.cpp +++ b/src/plugins/qt4projectmanager/qmakestep.cpp @@ -507,11 +507,6 @@ QMakeStepConfigWidget::~QMakeStepConfigWidget() delete m_ui; } -void QMakeStepConfigWidget::init() -{ - -} - QString QMakeStepConfigWidget::summaryText() const { return m_summaryText; diff --git a/src/plugins/qt4projectmanager/qmakestep.h b/src/plugins/qt4projectmanager/qmakestep.h index 4f217e6b48da25aa11d9602cd41d46912449904b..cdb023141a3bacc1ec8c4b3571407c0c71d3c01b 100644 --- a/src/plugins/qt4projectmanager/qmakestep.h +++ b/src/plugins/qt4projectmanager/qmakestep.h @@ -142,7 +142,6 @@ class QMakeStepConfigWidget : public ProjectExplorer::BuildStepConfigWidget public: QMakeStepConfigWidget(QMakeStep *step); ~QMakeStepConfigWidget(); - void init(); QString summaryText() const; QString displayName() const; private slots: diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp index 915ead9373396cca4218aa7af09f21e615905c3a..a2e97c1265ab06878ee0424c2af95aa4a5d987b8 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp @@ -955,7 +955,3 @@ QString S60CreatePackageStepConfigWidget::displayName() const { return m_signStep->displayName(); } - -void S60CreatePackageStepConfigWidget::init() -{ -} diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h index 3465933015ab994d7f09ccd3f73be3cbe3750596..d245cd8cce055c6c7fdf7448c23af4dada16c823 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h @@ -191,7 +191,6 @@ class S60CreatePackageStepConfigWidget : public ProjectExplorer::BuildStepConfig public: S60CreatePackageStepConfigWidget(S60CreatePackageStep *signStep); QString displayName() const; - void init(); QString summaryText() const; private slots: diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp index dd2b58e4d31bcc8f7e5a0ce4396760b77475ad85..5642aa269831b9991df110ab461aaf44c29dd71e 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp +++ b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp @@ -858,10 +858,6 @@ S60DeployStepWidget::S60DeployStepWidget() : ProjectExplorer::BuildStepConfigWid { } -void S60DeployStepWidget::init() -{ -} - QString S60DeployStepWidget::summaryText() const { return QString("<b>%1</b>").arg(displayName()); diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h index 7f5fa9dfbef80e8a64e0c82be0ca8c45f4ccc416..af8c8645070289002bde554b278b3651953a46db 100644 --- a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h +++ b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h @@ -234,7 +234,6 @@ class S60DeployStepWidget : public ProjectExplorer::BuildStepConfigWidget public: S60DeployStepWidget(); - void init(); QString summaryText() const; QString displayName() const; }; diff --git a/src/plugins/remotelinux/maemodeploystepwidget.cpp b/src/plugins/remotelinux/maemodeploystepwidget.cpp index 95030cd448d5f2da0908e130d77fffd8d59bb1b8..54e31d7baf6658f8b29629c26caa78f91ab7d1ad 100644 --- a/src/plugins/remotelinux/maemodeploystepwidget.cpp +++ b/src/plugins/remotelinux/maemodeploystepwidget.cpp @@ -63,15 +63,7 @@ MaemoDeployStepBaseWidget::MaemoDeployStepBaseWidget(AbstractLinuxDeviceDeploySt connect(list, SIGNAL(stepRemoved(int)), SIGNAL(updateSummary())); connect(list, SIGNAL(aboutToRemoveStep(int)), SLOT(handleStepToBeRemoved(int))); -} - -MaemoDeployStepBaseWidget::~MaemoDeployStepBaseWidget() -{ - delete ui; -} -void MaemoDeployStepBaseWidget::init() -{ ui->deviceConfigComboBox->setModel(m_step->maemoDeployConfig()->deviceConfigModel().data()); connect(&m_step->helper(), SIGNAL(deviceConfigChanged()), SLOT(handleDeviceUpdate())); @@ -82,6 +74,11 @@ void MaemoDeployStepBaseWidget::init() SLOT(showDeviceConfigurations())); } +MaemoDeployStepBaseWidget::~MaemoDeployStepBaseWidget() +{ + delete ui; +} + void MaemoDeployStepBaseWidget::handleDeviceUpdate() { const MaemoDeviceConfig::ConstPtr &devConf = m_step->helper().deviceConfig(); diff --git a/src/plugins/remotelinux/maemodeploystepwidget.h b/src/plugins/remotelinux/maemodeploystepwidget.h index bab50818823a722cd74e85ee303e8ff359556a62..67818dcef55c2195e9313fc501b5c0b700cfee59 100644 --- a/src/plugins/remotelinux/maemodeploystepwidget.h +++ b/src/plugins/remotelinux/maemodeploystepwidget.h @@ -54,7 +54,6 @@ public: MaemoDeployStepBaseWidget(AbstractLinuxDeviceDeployStep *step); ~MaemoDeployStepBaseWidget(); - void init(); QString summaryText() const; signals: @@ -77,7 +76,6 @@ public: MaemoDeployStepWidget(AbstractMaemoDeployStep *step); private: - virtual void init() { return m_baseWidget.init(); } virtual QString summaryText() const { return m_baseWidget.summaryText(); } virtual QString displayName() const { return QString(); } diff --git a/src/plugins/remotelinux/maemoinstalltosysrootstep.cpp b/src/plugins/remotelinux/maemoinstalltosysrootstep.cpp index 50eb9ffe497b802d64c3d12f289f88c639094da5..36463d572d51e03d61862d74e8e4628b3bb3412b 100644 --- a/src/plugins/remotelinux/maemoinstalltosysrootstep.cpp +++ b/src/plugins/remotelinux/maemoinstalltosysrootstep.cpp @@ -57,9 +57,7 @@ class AbstractMaemoInstallPackageToSysrootWidget : public BuildStepConfigWidget Q_OBJECT public: AbstractMaemoInstallPackageToSysrootWidget(AbstractMaemoInstallPackageToSysrootStep *step) - : m_step(step) {} - - virtual void init() + : m_step(step) { BuildStepList * const list = qobject_cast<BuildStepList *>(m_step->parent()); @@ -117,9 +115,7 @@ class MaemoCopyFilesToSysrootWidget : public BuildStepConfigWidget Q_OBJECT public: MaemoCopyFilesToSysrootWidget(const BuildStep *buildStep) - : m_buildStep(buildStep) {} - - virtual void init() + : m_buildStep(buildStep) { if (m_buildStep) { connect(m_buildStep.data(), SIGNAL(displayNameChanged()), diff --git a/src/plugins/remotelinux/maemopackagecreationstep.cpp b/src/plugins/remotelinux/maemopackagecreationstep.cpp index a1fe351c38748dfd67b524fe92ee70c87d2080ba..3cfa9cb51685263b7967bff711d11ce60416caf4 100644 --- a/src/plugins/remotelinux/maemopackagecreationstep.cpp +++ b/src/plugins/remotelinux/maemopackagecreationstep.cpp @@ -578,9 +578,7 @@ class CreateTarStepWidget : public BuildStepConfigWidget { Q_OBJECT public: - CreateTarStepWidget(MaemoTarPackageCreationStep *step) : m_step(step) {} - - virtual void init() + CreateTarStepWidget(MaemoTarPackageCreationStep *step) : m_step(step) { connect(m_step, SIGNAL(packageFilePathChanged()), SIGNAL(updateSummary())); diff --git a/src/plugins/remotelinux/maemopackagecreationwidget.cpp b/src/plugins/remotelinux/maemopackagecreationwidget.cpp index b6729d36fe5ed74a5d7b4d845df725280a5126bb..c10dc80c5aa5048ac6f99dfe6c1413b4e26fa8a5 100644 --- a/src/plugins/remotelinux/maemopackagecreationwidget.cpp +++ b/src/plugins/remotelinux/maemopackagecreationwidget.cpp @@ -68,10 +68,6 @@ MaemoPackageCreationWidget::~MaemoPackageCreationWidget() delete m_ui; } -void MaemoPackageCreationWidget::init() -{ -} - void MaemoPackageCreationWidget::initGui() { m_ui->shortDescriptionLineEdit->setMaxLength(60); diff --git a/src/plugins/remotelinux/maemopackagecreationwidget.h b/src/plugins/remotelinux/maemopackagecreationwidget.h index 1298828c0a41443204cab607d8a195a1b79e5832..a119380f4fc616f972be470dfbb122f05320b3f6 100644 --- a/src/plugins/remotelinux/maemopackagecreationwidget.h +++ b/src/plugins/remotelinux/maemopackagecreationwidget.h @@ -49,7 +49,6 @@ public: MaemoPackageCreationWidget(AbstractMaemoPackageCreationStep *step); ~MaemoPackageCreationWidget(); - virtual void init(); virtual QString summaryText() const; virtual QString displayName() const;