forked from qt-creator/qt-creator
Some cleanup after BuildConfiguration refactoring
This commit is contained in:
@@ -102,8 +102,6 @@ void MakeStep::storeIntoLocalMap(QMap<QString, QVariant> &map)
|
|||||||
bool MakeStep::init()
|
bool MakeStep::init()
|
||||||
{
|
{
|
||||||
CMakeBuildConfiguration *bc = cmakeBuildConfiguration();
|
CMakeBuildConfiguration *bc = cmakeBuildConfiguration();
|
||||||
// TODO, we should probably have a member cmakeBuildConfiguration();
|
|
||||||
|
|
||||||
setBuildParser(bc->buildParser());
|
setBuildParser(bc->buildParser());
|
||||||
|
|
||||||
setEnabled(true);
|
setEnabled(true);
|
||||||
|
@@ -125,7 +125,6 @@ QString GenericMakeStep::makeCommand() const
|
|||||||
{
|
{
|
||||||
QString command = m_makeCommand;
|
QString command = m_makeCommand;
|
||||||
if (command.isEmpty()) {
|
if (command.isEmpty()) {
|
||||||
// TODO
|
|
||||||
GenericProject *pro = genericBuildConfiguration()->genericProject();
|
GenericProject *pro = genericBuildConfiguration()->genericProject();
|
||||||
if (ProjectExplorer::ToolChain *toolChain = pro->toolChain())
|
if (ProjectExplorer::ToolChain *toolChain = pro->toolChain())
|
||||||
command = toolChain->makeCommand();
|
command = toolChain->makeCommand();
|
||||||
@@ -187,7 +186,6 @@ GenericMakeStepConfigWidget::GenericMakeStepConfigWidget(GenericMakeStep *makeSt
|
|||||||
m_ui->setupUi(this);
|
m_ui->setupUi(this);
|
||||||
|
|
||||||
// TODO update this list also on rescans of the GenericLists.txt
|
// TODO update this list also on rescans of the GenericLists.txt
|
||||||
//TODO
|
|
||||||
GenericProject *pro = m_makeStep->genericBuildConfiguration()->genericProject();
|
GenericProject *pro = m_makeStep->genericBuildConfiguration()->genericProject();
|
||||||
foreach (const QString &target, pro->targets()) {
|
foreach (const QString &target, pro->targets()) {
|
||||||
QListWidgetItem *item = new QListWidgetItem(target, m_ui->targetsList);
|
QListWidgetItem *item = new QListWidgetItem(target, m_ui->targetsList);
|
||||||
|
@@ -158,7 +158,6 @@ BuildConfiguration *GenericBuildConfigurationFactory::create(const QString &type
|
|||||||
|
|
||||||
BuildConfiguration *GenericBuildConfigurationFactory::clone(BuildConfiguration *source) const
|
BuildConfiguration *GenericBuildConfigurationFactory::clone(BuildConfiguration *source) const
|
||||||
{
|
{
|
||||||
// TODO
|
|
||||||
GenericBuildConfiguration *bc = new GenericBuildConfiguration(static_cast<GenericBuildConfiguration *>(source));
|
GenericBuildConfiguration *bc = new GenericBuildConfiguration(static_cast<GenericBuildConfiguration *>(source));
|
||||||
m_project->addBuildConfiguration(bc);
|
m_project->addBuildConfiguration(bc);
|
||||||
return bc;
|
return bc;
|
||||||
|
@@ -379,7 +379,7 @@ bool Project::restoreSettingsImpl(PersistentSettingsReader &reader)
|
|||||||
|
|
||||||
BuildConfiguration *Project::activeBuildConfiguration() const
|
BuildConfiguration *Project::activeBuildConfiguration() const
|
||||||
{
|
{
|
||||||
return m_activeBuildConfiguration; //TODO
|
return m_activeBuildConfiguration;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Project::setActiveBuildConfiguration(BuildConfiguration *configuration)
|
void Project::setActiveBuildConfiguration(BuildConfiguration *configuration)
|
||||||
|
@@ -106,7 +106,6 @@ bool MakeStep::init()
|
|||||||
Environment environment = bc->environment();
|
Environment environment = bc->environment();
|
||||||
setEnvironment(environment);
|
setEnvironment(environment);
|
||||||
|
|
||||||
//TODO
|
|
||||||
QString workingDirectory = bc->buildDirectory();
|
QString workingDirectory = bc->buildDirectory();
|
||||||
setWorkingDirectory(workingDirectory);
|
setWorkingDirectory(workingDirectory);
|
||||||
|
|
||||||
|
@@ -80,7 +80,6 @@ QStringList QMakeStep::allArguments()
|
|||||||
arguments << buildConfiguration()->project()->file()->fileName();
|
arguments << buildConfiguration()->project()->file()->fileName();
|
||||||
arguments << "-r";
|
arguments << "-r";
|
||||||
|
|
||||||
// TODO
|
|
||||||
if (!additonalArguments.contains("-spec"))
|
if (!additonalArguments.contains("-spec"))
|
||||||
arguments << "-spec" << bc->qtVersion()->mkspec();
|
arguments << "-spec" << bc->qtVersion()->mkspec();
|
||||||
|
|
||||||
@@ -116,7 +115,6 @@ QStringList QMakeStep::allArguments()
|
|||||||
|
|
||||||
bool QMakeStep::init()
|
bool QMakeStep::init()
|
||||||
{
|
{
|
||||||
// TODO
|
|
||||||
Qt4BuildConfiguration *qt4bc = qt4BuildConfiguration();
|
Qt4BuildConfiguration *qt4bc = qt4BuildConfiguration();
|
||||||
const QtVersion *qtVersion = qt4bc->qtVersion();
|
const QtVersion *qtVersion = qt4bc->qtVersion();
|
||||||
|
|
||||||
|
@@ -269,7 +269,7 @@ MakeStep *Qt4BuildConfiguration::makeStep() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
// returns true if both are equal
|
// returns true if both are equal
|
||||||
bool Qt4BuildConfiguration::compareBuildConfigurationToImportFrom(const QString &workingDirectory)
|
bool Qt4BuildConfiguration::compareToImportFrom(const QString &workingDirectory)
|
||||||
{
|
{
|
||||||
QMakeStep *qs = qmakeStep();
|
QMakeStep *qs = qmakeStep();
|
||||||
if (QDir(workingDirectory).exists(QLatin1String("Makefile")) && qs) {
|
if (QDir(workingDirectory).exists(QLatin1String("Makefile")) && qs) {
|
||||||
|
@@ -94,8 +94,7 @@ public:
|
|||||||
QString makeCommand() const;
|
QString makeCommand() const;
|
||||||
QString defaultMakeTarget() const;
|
QString defaultMakeTarget() const;
|
||||||
|
|
||||||
// TODO rename
|
bool compareToImportFrom(const QString &workingDirectory);
|
||||||
bool compareBuildConfigurationToImportFrom(const QString &workingDirectory);
|
|
||||||
static QStringList removeSpecFromArgumentList(const QStringList &old);
|
static QStringList removeSpecFromArgumentList(const QStringList &old);
|
||||||
static QString extractSpecFromArgumentList(const QStringList &list, QString directory, QtVersion *version);
|
static QString extractSpecFromArgumentList(const QStringList &list, QString directory, QtVersion *version);
|
||||||
|
|
||||||
|
@@ -241,7 +241,7 @@ void Qt4ProjectConfigWidget::updateImportLabel()
|
|||||||
visible = true;
|
visible = true;
|
||||||
} else {
|
} else {
|
||||||
// check that the qmake flags, arguments match
|
// check that the qmake flags, arguments match
|
||||||
visible = !m_buildConfiguration->compareBuildConfigurationToImportFrom(m_buildConfiguration->buildDirectory());
|
visible = !m_buildConfiguration->compareToImportFrom(m_buildConfiguration->buildDirectory());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
visible = false;
|
visible = false;
|
||||||
|
Reference in New Issue
Block a user