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,6 +34,7 @@
#include "doubletabwidget.h"
#include "profilemanager.h"
#include "project.h"
#include "projectexplorer.h"
#include "projectexplorerconstants.h"
@@ -128,7 +129,7 @@ PanelsWidget::PanelsWidget(QWidget *parent) :
// side of the screen.
m_root->setFixedWidth(900);
m_root->setContentsMargins(0, 0, 40, 0);
QPalette pal = m_root->palette();
QColor background = Utils::StyleHelper::mergedColors(
palette().window().color(), Qt::white, 85);
@@ -262,9 +263,7 @@ ProjectWindow::~ProjectWindow()
void ProjectWindow::extensionsInitialized()
{
foreach (ITargetFactory *fac, ExtensionSystem::PluginManager::getObjects<ITargetFactory>())
connect(fac, SIGNAL(canCreateTargetIdsChanged()),
this, SLOT(targetFactoriesChanged()));
connect(ProfileManager::instance(), SIGNAL(profilesChanged()), this, SLOT(handleProfilesChanges()));
QList<IProjectPanelFactory *> list = ExtensionSystem::PluginManager::getObjects<IProjectPanelFactory>();
qSort(list.begin(), list.end(), &IPanelFactory::prioritySort);
@@ -286,7 +285,7 @@ void ProjectWindow::projectUpdated(Project *p)
m_tabWidget->setCurrentIndex(index);
}
void ProjectWindow::targetFactoriesChanged()
void ProjectWindow::handleProfilesChanges()
{
bool changed = false;
int index = m_tabWidget->currentIndex();
@@ -309,13 +308,12 @@ bool ProjectWindow::useTargetPage(ProjectExplorer::Project *project)
if (project->targets().size() > 1)
return true;
int count = 0;
foreach (ITargetFactory *fac, ExtensionSystem::PluginManager::getObjects<ITargetFactory>()) {
foreach (Core::Id targetId, fac->supportedTargetIds()) {
if (fac->canCreate(project, targetId))
++count;
if (count > 1)
return true;
}
QList<Profile *> profiles = ProfileManager::instance()->profiles();
foreach (Profile *p, profiles) {
if (project->supportsProfile(p))
++count;
if (count > 1)
return true;
}
return false;
}