Profile introduction

Introduce Profiles to store sets of values that describe a system/device.

These profiles are held by a target, getting rid of much of the information
stored in the Build-/Run-/DeployConfigurations, greatly simplifying those.

This is a squash of the wip/profile branch which has been on gerrit for a
while, rebased to current master.

Change-Id: I25956c8dd4d1962b2134bfaa8a8076ae3909460f
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
This commit is contained in:
Tobias Hunger
2012-04-24 15:49:09 +02:00
parent 8c77b8c9d7
commit 2431456216
379 changed files with 12690 additions and 14437 deletions

View File

@@ -34,11 +34,11 @@
#include "autogenstep.h"
#include "autotoolsproject.h"
#include "autotoolstarget.h"
#include "autotoolsbuildconfiguration.h"
#include "autotoolsprojectconstants.h"
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/gnumakeparser.h>
#include <projectexplorer/projectexplorer.h>
@@ -67,9 +67,9 @@ AutogenStepFactory::AutogenStepFactory(QObject *parent) :
QList<Core::Id> AutogenStepFactory::availableCreationIds(BuildStepList *parent) const
{
if (parent->target()->project()->id() == Core::Id(Constants::AUTOTOOLS_PROJECT_ID))
return QList<Core::Id>() << Core::Id(AUTOGEN_STEP_ID);
return QList<Core::Id>();
if (!canHandle(parent))
return QList<Core::Id>();
return QList<Core::Id>() << Core::Id(AUTOGEN_STEP_ID);
}
QString AutogenStepFactory::displayNameForId(const Core::Id id) const
@@ -81,13 +81,7 @@ QString AutogenStepFactory::displayNameForId(const Core::Id id) const
bool AutogenStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
if (parent->target()->project()->id() != Core::Id(Constants::AUTOTOOLS_PROJECT_ID))
return false;
if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
return false;
return Core::Id(AUTOGEN_STEP_ID) == id;
return canHandle(parent) && Core::Id(AUTOGEN_STEP_ID) == id;
}
BuildStep *AutogenStepFactory::create(BuildStepList *parent, const Core::Id id)
@@ -125,6 +119,13 @@ BuildStep *AutogenStepFactory::restore(BuildStepList *parent, const QVariantMap
return 0;
}
bool AutogenStepFactory::canHandle(BuildStepList *parent) const
{
if (parent->target()->project()->id() != Core::Id(Constants::AUTOTOOLS_PROJECT_ID))
return false;
return parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
}
////////////////////////
// AutogenStep class
////////////////////////