Commit e08b38ff authored by Daniel Teske's avatar Daniel Teske
Browse files

Move Project::subConfigWidgets to BuildConfiguration



Change-Id: Idf58ebbb02e9cd0ab4ff7e74fbed17250e274693
Reviewed-by: default avatarTobias Hunger <tobias.hunger@digia.com>
parent 36718cae
......@@ -38,6 +38,7 @@
#include "autoreconfstep.h"
#include "configurestep.h"
#include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
......@@ -70,6 +71,12 @@ BuildConfigWidget *AutotoolsBuildConfiguration::createConfigWidget()
return new AutotoolsBuildSettingsWidget;
}
QList<BuildConfigWidget *> AutotoolsBuildConfiguration::subConfigWidgets()
{
return QList<BuildConfigWidget *>() << new ProjectExplorer::BuildEnvironmentWidget;
}
AutotoolsBuildConfiguration::AutotoolsBuildConfiguration(ProjectExplorer::Target *parent, const Core::Id id)
: BuildConfiguration(parent, id)
{
......
......@@ -49,6 +49,7 @@ public:
explicit AutotoolsBuildConfiguration(ProjectExplorer::Target *parent);
ProjectExplorer::BuildConfigWidget *createConfigWidget();
QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
QString buildDirectory() const;
void setBuildDirectory(const QString &buildDirectory);
......
......@@ -40,7 +40,6 @@
#include "makefileparserthread.h"
#include <projectexplorer/abi.h>
#include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/kitmanager.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/buildconfiguration.h>
......@@ -126,11 +125,6 @@ QString AutotoolsProject::defaultBuildDirectory() const
return projectDirectory();
}
QList<BuildConfigWidget *> AutotoolsProject::subConfigWidgets()
{
return QList<BuildConfigWidget *>() << new BuildEnvironmentWidget;
}
ProjectNode *AutotoolsProject::rootProjectNode() const
{
return m_rootNode;
......
......@@ -74,7 +74,6 @@ public:
Core::Id id() const;
Core::IDocument *document() const;
ProjectExplorer::IProjectManager *projectManager() const;
QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
ProjectExplorer::ProjectNode *rootProjectNode() const;
QStringList files(FilesMode fileMode) const;
QString defaultBuildDirectory() const;
......
......@@ -33,6 +33,7 @@
#include "cmakeproject.h"
#include "cmakeprojectconstants.h"
#include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/gnumakeparser.h>
#include <projectexplorer/ioutputparser.h>
......@@ -111,6 +112,14 @@ ProjectExplorer::BuildConfigWidget *CMakeBuildConfiguration::createConfigWidget(
return new CMakeBuildSettingsWidget;
}
QList<ProjectExplorer::BuildConfigWidget *> CMakeBuildConfiguration::subConfigWidgets()
{
QList<ProjectExplorer::BuildConfigWidget*> list;
list << new ProjectExplorer::BuildEnvironmentWidget;
return list;
}
QString CMakeBuildConfiguration::buildDirectory() const
{
return m_buildDirectory;
......
......@@ -52,6 +52,7 @@ public:
~CMakeBuildConfiguration();
ProjectExplorer::BuildConfigWidget *createConfigWidget();
QList<ProjectExplorer::BuildConfigWidget *> subConfigWidgets();
QString buildDirectory() const;
void setBuildDirectory(const QString &buildDirectory);
......
......@@ -41,7 +41,6 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/headerpath.h>
#include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/kitinformation.h>
......@@ -512,13 +511,6 @@ CMakeManager *CMakeProject::projectManager() const
return m_manager;
}
QList<ProjectExplorer::BuildConfigWidget*> CMakeProject::subConfigWidgets()
{
QList<ProjectExplorer::BuildConfigWidget*> list;
list << new BuildEnvironmentWidget;
return list;
}
ProjectExplorer::ProjectNode *CMakeProject::rootProjectNode() const
{
return m_rootNode;
......
......@@ -85,8 +85,6 @@ public:
Core::IDocument *document() const;
CMakeManager *projectManager() const;
QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
ProjectExplorer::ProjectNode *rootProjectNode() const;
QStringList files(FilesMode fileMode) const;
......
......@@ -32,6 +32,7 @@
#include "genericmakestep.h"
#include "genericproject.h"
#include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/kitinformation.h>
#include <projectexplorer/projectexplorerconstants.h>
......@@ -110,6 +111,12 @@ BuildConfigWidget *GenericBuildConfiguration::createConfigWidget()
return new GenericBuildSettingsWidget;
}
QList<BuildConfigWidget*> GenericBuildConfiguration::subConfigWidgets()
{
QList<BuildConfigWidget*> list;
list << new ProjectExplorer::BuildEnvironmentWidget;
return list;
}
/*!
\class GenericBuildConfigurationFactory
......
......@@ -50,6 +50,7 @@ public:
explicit GenericBuildConfiguration(ProjectExplorer::Target *parent);
ProjectExplorer::BuildConfigWidget *createConfigWidget();
QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
QString buildDirectory() const;
QString rawBuildDirectory() const;
......
......@@ -39,7 +39,6 @@
#include <cpptools/ModelManagerInterface.h>
#include <extensionsystem/pluginmanager.h>
#include <projectexplorer/abi.h>
#include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/headerpath.h>
#include <projectexplorer/kitinformation.h>
......@@ -398,13 +397,6 @@ IProjectManager *GenericProject::projectManager() const
return m_manager;
}
QList<BuildConfigWidget*> GenericProject::subConfigWidgets()
{
QList<BuildConfigWidget*> list;
list << new BuildEnvironmentWidget;
return list;
}
GenericProjectNode *GenericProject::rootProjectNode() const
{
return m_rootNode;
......
......@@ -64,8 +64,6 @@ public:
Core::IDocument *document() const;
ProjectExplorer::IProjectManager *projectManager() const;
QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
GenericProjectNode *rootProjectNode() const;
QStringList files(FilesMode fileMode) const;
......
......@@ -116,6 +116,11 @@ BuildConfiguration::~BuildConfiguration()
delete m_macroExpander;
}
QList<BuildConfigWidget*> BuildConfiguration::subConfigWidgets()
{
return QList<BuildConfigWidget*>();
}
Utils::AbstractMacroExpander *BuildConfiguration::macroExpander()
{
if (!m_macroExpander)
......
......@@ -61,6 +61,7 @@ public:
virtual QString buildDirectory() const = 0;
virtual BuildConfigWidget *createConfigWidget() = 0;
virtual QList<BuildConfigWidget*> subConfigWidgets();
// Maybe the BuildConfiguration is not the best place for the environment
Utils::Environment baseEnvironment() const;
......
......@@ -242,7 +242,7 @@ void BuildSettingsWidget::updateBuildSettings()
addSubWidget(new BuildStepsPage(m_target, Core::Id(Constants::BUILDSTEPS_BUILD)));
addSubWidget(new BuildStepsPage(m_target, Core::Id(Constants::BUILDSTEPS_CLEAN)));
QList<BuildConfigWidget *> subConfigWidgets = m_target->project()->subConfigWidgets();
QList<BuildConfigWidget *> subConfigWidgets = m_buildConfiguration->subConfigWidgets();
foreach (BuildConfigWidget *subConfigWidget, subConfigWidgets)
addSubWidget(subConfigWidget);
......
......@@ -306,10 +306,6 @@ bool Project::restoreSettings()
return ok;
}
QList<BuildConfigWidget*> Project::subConfigWidgets()
{
return QList<BuildConfigWidget*>();
}
/*!
\brief Serialize all data into a QVariantMap.
......
......@@ -97,8 +97,6 @@ public:
void saveSettings();
bool restoreSettings();
virtual QList<BuildConfigWidget*> subConfigWidgets();
virtual ProjectNode *rootProjectNode() const = 0;
enum FilesMode { AllFiles, ExcludeGeneratedFiles };
......
......@@ -301,11 +301,6 @@ bool QmlProject::supportsKit(ProjectExplorer::Kit *k, QString *errorMessage) con
return version;
}
QList<ProjectExplorer::BuildConfigWidget*> QmlProject::subConfigWidgets()
{
return QList<ProjectExplorer::BuildConfigWidget*>();
}
ProjectExplorer::ProjectNode *QmlProject::rootProjectNode() const
{
return m_rootNode;
......
......@@ -68,8 +68,6 @@ public:
bool supportsKit(ProjectExplorer::Kit *k, QString *errorMessage) const;
QList<ProjectExplorer::BuildConfigWidget*> subConfigWidgets();
ProjectExplorer::ProjectNode *rootProjectNode() const;
QStringList files(FilesMode fileMode) const;
......
......@@ -39,6 +39,7 @@
#include <utils/qtcassert.h>
#include <utils/qtcprocess.h>
#include <limits>
#include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
......@@ -189,6 +190,13 @@ BuildConfigWidget *Qt4BuildConfiguration::createConfigWidget()
return new Qt4ProjectConfigWidget(target());
}
QList<BuildConfigWidget*> Qt4BuildConfiguration::subConfigWidgets()
{
QList<BuildConfigWidget*> subWidgets;
subWidgets << new ProjectExplorer::BuildEnvironmentWidget;
return subWidgets;
}
QString Qt4BuildConfiguration::defaultShadowBuildDirectory() const
{
// todo displayName isn't ideal
......
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