Commit fba7d769 authored by dt's avatar dt
Browse files

Canceling the wizard for a new cmake build configuration still created.

Made virtual newBuildConfiguration return a bool
parent 0f353387
......@@ -114,6 +114,7 @@ void CMakeProject::slotActiveBuildConfiguration()
void CMakeProject::fileChanged(const QString &fileName)
{
Q_UNUSED(fileName)
if (m_insideFileChanged== true)
return;
m_insideFileChanged = true;
......@@ -537,7 +538,7 @@ QList<ProjectExplorer::BuildConfigWidget*> CMakeProject::subConfigWidgets()
return list;
}
void CMakeProject::newBuildConfiguration(const QString &buildConfiguration)
bool CMakeProject::newBuildConfiguration(const QString &buildConfiguration)
{
// Default to all
if (targets().contains("all"))
......@@ -548,7 +549,9 @@ QList<ProjectExplorer::BuildConfigWidget*> CMakeProject::subConfigWidgets()
setValue(buildConfiguration, "buildDirectory", copw.buildDirectory());
setValue(buildConfiguration, "msvcVersion", copw.msvcVersion());
parseCMakeLists();
return true;
}
return false;
}
ProjectExplorer::ProjectNode *CMakeProject::rootProjectNode() const
......
......@@ -94,7 +94,7 @@ public:
// This method is called for new build configurations
// You should probably set some default values in this method
virtual void newBuildConfiguration(const QString &buildConfiguration);
virtual bool newBuildConfiguration(const QString &buildConfiguration);
virtual ProjectExplorer::ProjectNode *rootProjectNode() const;
......
......@@ -437,9 +437,10 @@ QList<ProjectExplorer::BuildConfigWidget*> GenericProject::subConfigWidgets()
return QList<ProjectExplorer::BuildConfigWidget*>();
}
void GenericProject::newBuildConfiguration(const QString &buildConfiguration)
bool GenericProject::newBuildConfiguration(const QString &buildConfiguration)
{
makeStep()->setBuildTarget(buildConfiguration, "all", true);
return true;
}
GenericProjectNode *GenericProject::rootProjectNode() const
......
......@@ -82,7 +82,7 @@ public:
virtual ProjectExplorer::BuildConfigWidget *createConfigWidget();
virtual QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
virtual void newBuildConfiguration(const QString &buildConfiguration);
virtual bool newBuildConfiguration(const QString &buildConfiguration);
virtual GenericProjectNode *rootProjectNode() const;
virtual QStringList files(FilesMode fileMode) const;
......
......@@ -282,12 +282,13 @@ void BuildSettingsWidget::createConfiguration()
newDisplayName += QString::number(i);
}
m_project->addBuildConfiguration(newBuildConfiguration);
m_project->setDisplayNameFor(newBuildConfiguration, newDisplayName);
m_project->newBuildConfiguration(newBuildConfiguration);
m_buildConfiguration = newBuildConfiguration;
if (m_project->newBuildConfiguration(newBuildConfiguration)) {
m_project->addBuildConfiguration(newBuildConfiguration);
m_project->setDisplayNameFor(newBuildConfiguration, newDisplayName);
m_buildConfiguration = newBuildConfiguration;
updateBuildSettings();
updateBuildSettings();
}
}
void BuildSettingsWidget::cloneConfiguration()
......
......@@ -132,7 +132,7 @@ public:
/* This method is called for new build configurations. You should probably
* set some default values in this method.
*/
virtual void newBuildConfiguration(const QString &buildConfiguration) = 0;
virtual bool newBuildConfiguration(const QString &buildConfiguration) = 0;
virtual ProjectNode *rootProjectNode() const = 0;
......
......@@ -214,8 +214,9 @@ QList<ProjectExplorer::BuildConfigWidget*> QmlProject::subConfigWidgets()
return QList<ProjectExplorer::BuildConfigWidget*>();
}
void QmlProject::newBuildConfiguration(const QString &)
bool QmlProject::newBuildConfiguration(const QString &)
{
return true;
}
QmlProjectNode *QmlProject::rootProjectNode() const
......
......@@ -76,7 +76,7 @@ public:
virtual ProjectExplorer::BuildConfigWidget *createConfigWidget();
virtual QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
virtual void newBuildConfiguration(const QString &buildConfiguration);
virtual bool newBuildConfiguration(const QString &buildConfiguration);
virtual QmlProjectNode *rootProjectNode() const;
virtual QStringList files(FilesMode fileMode) const;
......
......@@ -759,9 +759,10 @@ void Qt4Project::addDefaultBuild()
}
}
void Qt4Project::newBuildConfiguration(const QString &buildConfiguration)
bool Qt4Project::newBuildConfiguration(const QString &buildConfiguration)
{
Q_UNUSED(buildConfiguration)
return true;
}
void Qt4Project::proFileParseError(const QString &errorMessage)
......
......@@ -170,7 +170,7 @@ public:
QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
void setQtVersion(const QString &buildConfiguration, int id);
virtual void newBuildConfiguration(const QString &buildConfiguration);
virtual bool newBuildConfiguration(const QString &buildConfiguration);
QList<Internal::Qt4ProFileNode *> applicationProFiles() const;
......
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