Commit 52d07a9b authored by dt's avatar dt
Browse files

BuildConfigurations know their project, these signals can be simpler

parent b5099480
...@@ -85,7 +85,7 @@ void Project::addBuildConfiguration(BuildConfiguration *configuration) ...@@ -85,7 +85,7 @@ void Project::addBuildConfiguration(BuildConfiguration *configuration)
// add it // add it
m_buildConfigurationValues.push_back(configuration); m_buildConfigurationValues.push_back(configuration);
emit addedBuildConfiguration(this, configuration); emit addedBuildConfiguration(configuration);
} }
void Project::removeBuildConfiguration(BuildConfiguration *configuration) void Project::removeBuildConfiguration(BuildConfiguration *configuration)
...@@ -96,7 +96,7 @@ void Project::removeBuildConfiguration(BuildConfiguration *configuration) ...@@ -96,7 +96,7 @@ void Project::removeBuildConfiguration(BuildConfiguration *configuration)
m_buildConfigurationValues.removeOne(configuration); m_buildConfigurationValues.removeOne(configuration);
emit removedBuildConfiguration(this, configuration); emit removedBuildConfiguration(configuration);
delete configuration; delete configuration;
} }
......
...@@ -127,9 +127,7 @@ signals: ...@@ -127,9 +127,7 @@ signals:
void fileListChanged(); void fileListChanged();
// TODO clean up signal names // TODO clean up signal names
// might be better to also have // might be better to also have aboutToRemove signals
// a aboutToRemoveRunConfiguration
// and a removedBuildConfiguration
// a runconfiguration display name changed is missing // a runconfiguration display name changed is missing
void activeBuildConfigurationChanged(); void activeBuildConfigurationChanged();
void activeRunConfigurationChanged(); void activeRunConfigurationChanged();
...@@ -138,8 +136,8 @@ signals: ...@@ -138,8 +136,8 @@ signals:
void removedRunConfiguration(ProjectExplorer::Project *p, const QString &name); void removedRunConfiguration(ProjectExplorer::Project *p, const QString &name);
void addedRunConfiguration(ProjectExplorer::Project *p, const QString &name); void addedRunConfiguration(ProjectExplorer::Project *p, const QString &name);
void removedBuildConfiguration(ProjectExplorer::Project *p, ProjectExplorer::BuildConfiguration *bc); void removedBuildConfiguration(ProjectExplorer::BuildConfiguration *bc);
void addedBuildConfiguration(ProjectExplorer::Project *p, ProjectExplorer::BuildConfiguration *bc); void addedBuildConfiguration(ProjectExplorer::BuildConfiguration *bc);
protected: protected:
/* This method is called when the project .user file is saved. Simply call /* This method is called when the project .user file is saved. Simply call
......
...@@ -836,7 +836,6 @@ void ProjectExplorerPlugin::unloadProject() ...@@ -836,7 +836,6 @@ void ProjectExplorerPlugin::unloadProject()
QList<Core::IFile*> filesToSave; QList<Core::IFile*> filesToSave;
filesToSave << fi; filesToSave << fi;
// FIXME: What we want here is to check whether we need to safe any of the pro/pri files in this project
// check the number of modified files // check the number of modified files
int readonlycount = 0; int readonlycount = 0;
......
...@@ -518,10 +518,10 @@ BuildConfigurationComboBox::BuildConfigurationComboBox(Project *p, QWidget *pare ...@@ -518,10 +518,10 @@ BuildConfigurationComboBox::BuildConfigurationComboBox(Project *p, QWidget *pare
// this, SLOT(nameChanged(ProjectExplorer::BuildConfiguration *))); // this, SLOT(nameChanged(ProjectExplorer::BuildConfiguration *)));
connect(p, SIGNAL(activeBuildConfigurationChanged()), connect(p, SIGNAL(activeBuildConfigurationChanged()),
this, SLOT(activeConfigurationChanged())); this, SLOT(activeConfigurationChanged()));
connect(p, SIGNAL(addedBuildConfiguration(ProjectExplorer::Project*,ProjectExplorer::BuildConfiguration*)), connect(p, SIGNAL(addedBuildConfiguration(ProjectExplorer::BuildConfiguration*)),
this, SLOT(addedBuildConfiguration(ProjectExplorer::Project*,ProjectExplorer::BuildConfiguration*))); this, SLOT(addedBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
connect(p, SIGNAL(removedBuildConfiguration(ProjectExplorer::Project*,ProjectExplorer::BuildConfiguration*)), connect(p, SIGNAL(removedBuildConfiguration(ProjectExplorer::BuildConfiguration*)),
this, SLOT(removedBuildConfiguration(ProjectExplorer::Project*,ProjectExplorer::BuildConfiguration*))); this, SLOT(removedBuildConfiguration(ProjectExplorer::BuildConfiguration*)));
connect(m_comboBox, SIGNAL(activated(int)), connect(m_comboBox, SIGNAL(activated(int)),
this, SLOT(changedIndex(int))); this, SLOT(changedIndex(int)));
} }
...@@ -560,10 +560,8 @@ void BuildConfigurationComboBox::activeConfigurationChanged() ...@@ -560,10 +560,8 @@ void BuildConfigurationComboBox::activeConfigurationChanged()
ignoreIndexChange = false; ignoreIndexChange = false;
} }
void BuildConfigurationComboBox::addedBuildConfiguration(ProjectExplorer::Project *project, void BuildConfigurationComboBox::addedBuildConfiguration(BuildConfiguration *bc)
ProjectExplorer::BuildConfiguration *bc)
{ {
Q_UNUSED(project);
ignoreIndexChange = true; ignoreIndexChange = true;
m_comboBox->addItem(bc->displayName(), QVariant::fromValue(bc)); m_comboBox->addItem(bc->displayName(), QVariant::fromValue(bc));
...@@ -572,10 +570,8 @@ void BuildConfigurationComboBox::addedBuildConfiguration(ProjectExplorer::Projec ...@@ -572,10 +570,8 @@ void BuildConfigurationComboBox::addedBuildConfiguration(ProjectExplorer::Projec
ignoreIndexChange = false; ignoreIndexChange = false;
} }
void BuildConfigurationComboBox::removedBuildConfiguration(ProjectExplorer::Project *project, void BuildConfigurationComboBox::removedBuildConfiguration(BuildConfiguration * bc)
BuildConfiguration * bc)
{ {
Q_UNUSED(project);
ignoreIndexChange = true; ignoreIndexChange = true;
const int index(buildConfigurationToIndex(bc)); const int index(buildConfigurationToIndex(bc));
if (index == -1) if (index == -1)
......
...@@ -97,10 +97,8 @@ public: ...@@ -97,10 +97,8 @@ public:
private slots: private slots:
void nameChanged(BuildConfiguration *bc); void nameChanged(BuildConfiguration *bc);
void activeConfigurationChanged(); void activeConfigurationChanged();
void addedBuildConfiguration(ProjectExplorer::Project *project, void addedBuildConfiguration(ProjectExplorer::BuildConfiguration *bc);
ProjectExplorer::BuildConfiguration *bc); void removedBuildConfiguration(ProjectExplorer::BuildConfiguration *bc);
void removedBuildConfiguration(ProjectExplorer::Project *project,
ProjectExplorer::BuildConfiguration *bc);
void changedIndex(int newIndex); void changedIndex(int newIndex);
private: private:
int buildConfigurationToIndex(BuildConfiguration *bc); int buildConfigurationToIndex(BuildConfiguration *bc);
......
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