forked from qt-creator/qt-creator
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:
@@ -33,11 +33,13 @@
|
||||
#include "androiddeploystepfactory.h"
|
||||
|
||||
#include "androiddeploystep.h"
|
||||
#include "androidmanager.h"
|
||||
|
||||
#include <projectexplorer/buildsteplist.h>
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
#include <projectexplorer/target.h>
|
||||
#include <qt4projectmanager/qt4projectmanagerconstants.h>
|
||||
#include <qtsupport/qtsupportconstants.h>
|
||||
#include <qtsupport/qtprofileinformation.h>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
@@ -53,27 +55,25 @@ AndroidDeployStepFactory::AndroidDeployStepFactory(QObject *parent)
|
||||
|
||||
QList<Core::Id> AndroidDeployStepFactory::availableCreationIds(BuildStepList *parent) const
|
||||
{
|
||||
if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
|
||||
&& parent->target()->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
|
||||
&& !parent->contains(AndroidDeployStep::Id))
|
||||
return QList<Core::Id>() << AndroidDeployStep::Id;
|
||||
return QList<Core::Id>();
|
||||
if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY))
|
||||
return QList<Core::Id>();
|
||||
if (!AndroidManager::supportsAndroid(parent->target()))
|
||||
return QList<Core::Id>();
|
||||
if (parent->contains(AndroidDeployStep::Id))
|
||||
return QList<Core::Id>();
|
||||
return QList<Core::Id>() << AndroidDeployStep::Id;
|
||||
}
|
||||
|
||||
QString AndroidDeployStepFactory::displayNameForId(const Core::Id id) const
|
||||
{
|
||||
if (id == AndroidDeployStep::Id)
|
||||
return QCoreApplication::translate("Qt4ProjectManager::Internal::AndroidDeployStepFactory",
|
||||
"Deploy to Android device/emulator");
|
||||
return tr("Deploy to Android device/emulator");
|
||||
return QString();
|
||||
}
|
||||
|
||||
bool AndroidDeployStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
|
||||
{
|
||||
return parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
|
||||
&& id == Core::Id(AndroidDeployStep::Id)
|
||||
&& parent->target()->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
|
||||
&& !parent->contains(AndroidDeployStep::Id);
|
||||
return availableCreationIds(parent).contains(id);
|
||||
}
|
||||
|
||||
BuildStep *AndroidDeployStepFactory::create(BuildStepList *parent, const Core::Id id)
|
||||
|
||||
Reference in New Issue
Block a user