Commit df5dab63 authored by Tobias Hunger's avatar Tobias Hunger

Use Core::Id in project-related objects

Use Core::Id for all the project related objects in favor of plain
QStrings.

Change-Id: I790ab40cb29899efdb49c413a77609486f52e683
Reviewed-by: default avatarDaniel Teske <daniel.teske@nokia.com>
parent cf26765c
......@@ -56,7 +56,7 @@ enum AndroidQemuStatus {
#define ANDROID_BAT_SUFFIX ""
#endif
static const QLatin1String ANDROID_RC_ID(ANDROID_PREFIX);
static const char ANDROID_RC_ID[] = ANDROID_PREFIX;
static const QLatin1String ANDROID_RC_ID_PREFIX(ANDROID_PREFIX ".");
static const QLatin1String AndroidArgumentsKey(ANDROID_PREFIX ".Arguments");
......
......@@ -45,7 +45,7 @@
using namespace Android::Internal;
AndroidDeployConfiguration::AndroidDeployConfiguration(ProjectExplorer::Target *parent)
:DeployConfiguration(parent, QLatin1String(ANDROID_DEPLOYCONFIGURATION_ID))
:DeployConfiguration(parent, Core::Id(ANDROID_DEPLOYCONFIGURATION_ID))
{
setDisplayName(tr("Deploy to Android device"));
setDefaultDisplayName(displayName());
......@@ -66,17 +66,18 @@ AndroidDeployConfigurationFactory::AndroidDeployConfigurationFactory(QObject *pa
ProjectExplorer::DeployConfigurationFactory(parent)
{ }
bool AndroidDeployConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const QString &id) const
bool AndroidDeployConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const
{
AndroidTarget *t = qobject_cast<AndroidTarget *>(parent);
if (!t || t->id() != QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
|| !id.startsWith(QLatin1String(ANDROID_DEPLOYCONFIGURATION_ID)))
if (!t || t->id() != Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
|| !id.toString().startsWith(QLatin1String(ANDROID_DEPLOYCONFIGURATION_ID)))
return false;
return true;
}
ProjectExplorer::DeployConfiguration *AndroidDeployConfigurationFactory::create(ProjectExplorer::Target *parent, const QString &/*id*/)
ProjectExplorer::DeployConfiguration *AndroidDeployConfigurationFactory::create(ProjectExplorer::Target *parent, const Core::Id id)
{
Q_UNUSED(id);
AndroidDeployConfiguration *dc = new AndroidDeployConfiguration(parent);
if (!dc)
return 0;
......@@ -108,7 +109,7 @@ bool AndroidDeployConfigurationFactory::canClone(ProjectExplorer::Target *parent
{
if (!qobject_cast<AndroidTarget *>(parent))
return false;
return source->id() == QLatin1String(ANDROID_DEPLOYCONFIGURATION_ID);
return source->id() == Core::Id(ANDROID_DEPLOYCONFIGURATION_ID);
}
ProjectExplorer::DeployConfiguration *AndroidDeployConfigurationFactory::clone(ProjectExplorer::Target *parent, ProjectExplorer::DeployConfiguration *source)
......@@ -119,17 +120,20 @@ ProjectExplorer::DeployConfiguration *AndroidDeployConfigurationFactory::clone(P
return new AndroidDeployConfiguration(t, source);
}
QStringList AndroidDeployConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
QList<Core::Id> AndroidDeployConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
{
AndroidTarget *target = qobject_cast<AndroidTarget *>(parent);
if (!target ||
target->id() != QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID))
return QStringList();
target->id() != Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID))
return QList<Core::Id>();
return target->qt4Project()->applicationProFilePathes(QLatin1String(ANDROID_DC_PREFIX));
QList<Core::Id> result;
foreach (const QString &id, target->qt4Project()->applicationProFilePathes(QLatin1String(ANDROID_DC_PREFIX)))
result << Core::Id(id.toUtf8().constData());
return result;
}
QString AndroidDeployConfigurationFactory::displayNameForId(const QString &/*id*/) const
QString AndroidDeployConfigurationFactory::displayNameForId(const Core::Id/*id*/) const
{
return tr("Deploy on Android");
}
......@@ -62,16 +62,16 @@ class AndroidDeployConfigurationFactory : public ProjectExplorer::DeployConfigur
public:
explicit AndroidDeployConfigurationFactory(QObject *parent = 0);
bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
ProjectExplorer::DeployConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::DeployConfiguration *source) const;
ProjectExplorer::DeployConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::DeployConfiguration *source);
QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
// used to translate the ids to names to display to the user
QString displayNameForId(const QString &id) const;
QString displayNameForId(const Core::Id id) const;
};
......
......@@ -58,7 +58,7 @@ using namespace Qt4ProjectManager;
namespace Android {
namespace Internal {
const QLatin1String AndroidDeployStep::Id("Qt4ProjectManager.AndroidDeployStep");
const Core::Id AndroidDeployStep::Id("Qt4ProjectManager.AndroidDeployStep");
AndroidDeployStep::AndroidDeployStep(ProjectExplorer::BuildStepList *parent)
: BuildStep(parent, Id)
......
......@@ -123,7 +123,7 @@ private:
QString m_runQASIPackagePath;
AndroidDeployAction m_runDeployAction;
static const QLatin1String Id;
static const Core::Id Id;
};
} // namespace Internal
......
......@@ -51,16 +51,16 @@ AndroidDeployStepFactory::AndroidDeployStepFactory(QObject *parent)
{
}
QStringList AndroidDeployStepFactory::availableCreationIds(BuildStepList *parent) const
QList<Core::Id> AndroidDeployStepFactory::availableCreationIds(BuildStepList *parent) const
{
if (parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
&& parent->target()->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
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 QStringList() << AndroidDeployStep::Id;
return QStringList();
return QList<Core::Id>() << AndroidDeployStep::Id;
return QList<Core::Id>();
}
QString AndroidDeployStepFactory::displayNameForId(const QString &id) const
QString AndroidDeployStepFactory::displayNameForId(const Core::Id id) const
{
if (id == AndroidDeployStep::Id)
return QCoreApplication::translate("Qt4ProjectManager::Internal::AndroidDeployStepFactory",
......@@ -68,15 +68,15 @@ QString AndroidDeployStepFactory::displayNameForId(const QString &id) const
return QString();
}
bool AndroidDeployStepFactory::canCreate(BuildStepList *parent, const QString &id) const
bool AndroidDeployStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
return parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
&& id == QLatin1String(AndroidDeployStep::Id)
&& parent->target()->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
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);
}
BuildStep *AndroidDeployStepFactory::create(BuildStepList *parent, const QString &id)
BuildStep *AndroidDeployStepFactory::create(BuildStepList *parent, const Core::Id id)
{
Q_ASSERT(canCreate(parent, id));
return new AndroidDeployStep(parent);
......
......@@ -44,24 +44,20 @@ class AndroidDeployStepFactory : public ProjectExplorer::IBuildStepFactory
public:
explicit AndroidDeployStepFactory(QObject *parent = 0);
virtual QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
virtual QString displayNameForId(const QString &id) const;
QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
QString displayNameForId(const Core::Id id) const;
virtual bool canCreate(ProjectExplorer::BuildStepList *parent,
const QString &id) const;
virtual ProjectExplorer::BuildStep *
create(ProjectExplorer::BuildStepList *parent, const QString &id);
bool canCreate(ProjectExplorer::BuildStepList *parent,
const Core::Id id) const;
ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
virtual bool canRestore(ProjectExplorer::BuildStepList *parent,
const QVariantMap &map) const;
virtual ProjectExplorer::BuildStep *
restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
virtual bool canClone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *product) const;
virtual ProjectExplorer::BuildStep *
clone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *product);
bool canClone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *product) const;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *product);
};
} // namespace Internal
......
......@@ -52,16 +52,16 @@ AndroidPackageCreationFactory::AndroidPackageCreationFactory(QObject *parent)
{
}
QStringList AndroidPackageCreationFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
QList<Core::Id> AndroidPackageCreationFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
if (parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
&& parent->target()->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
&& parent->target()->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
&& !parent->contains(AndroidPackageCreationStep::CreatePackageId))
return QStringList() << AndroidPackageCreationStep::CreatePackageId;
return QStringList();
return QList<Core::Id>() << AndroidPackageCreationStep::CreatePackageId;
return QList<Core::Id>();
}
QString AndroidPackageCreationFactory::displayNameForId(const QString &id) const
QString AndroidPackageCreationFactory::displayNameForId(const Core::Id id) const
{
if (id == AndroidPackageCreationStep::CreatePackageId)
return QCoreApplication::translate("Qt4ProjectManager::Internal::AndroidPackageCreationFactory",
......@@ -69,15 +69,15 @@ QString AndroidPackageCreationFactory::displayNameForId(const QString &id) const
return QString();
}
bool AndroidPackageCreationFactory::canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const
bool AndroidPackageCreationFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
{
return parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
&& id == QLatin1String(AndroidPackageCreationStep::CreatePackageId)
&& parent->target()->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
return parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
&& id == Core::Id(AndroidPackageCreationStep::CreatePackageId)
&& parent->target()->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
&& !parent->contains(AndroidPackageCreationStep::CreatePackageId);
}
BuildStep *AndroidPackageCreationFactory::create(ProjectExplorer::BuildStepList *parent, const QString &id)
BuildStep *AndroidPackageCreationFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id)
{
Q_ASSERT(canCreate(parent, id));
return new AndroidPackageCreationStep(parent);
......
......@@ -43,24 +43,21 @@ class AndroidPackageCreationFactory : public ProjectExplorer::IBuildStepFactory
public:
explicit AndroidPackageCreationFactory(QObject *parent = 0);
virtual QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
virtual QString displayNameForId(const QString &id) const;
QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
QString displayNameForId(const Core::Id id) const;
virtual bool canCreate(ProjectExplorer::BuildStepList *parent,
const QString &id) const;
virtual ProjectExplorer::BuildStep *
create(ProjectExplorer::BuildStepList *parent, const QString &id);
bool canCreate(ProjectExplorer::BuildStepList *parent,
const Core::Id id) const;
ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
virtual bool canRestore(ProjectExplorer::BuildStepList *parent,
const QVariantMap &map) const;
virtual ProjectExplorer::BuildStep *
restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
bool canRestore(ProjectExplorer::BuildStepList *parent,
const QVariantMap &map) const;
ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
virtual bool canClone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *product) const;
virtual ProjectExplorer::BuildStep *
clone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *product);
bool canClone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *product) const;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *product);
};
} // namespace Internal
......
......@@ -583,7 +583,7 @@ void AndroidPackageCreationStep::raiseError(const QString &shortMsg,
TASK_CATEGORY_BUILDSYSTEM));
}
const QLatin1String AndroidPackageCreationStep::CreatePackageId("Qt4ProjectManager.AndroidPackageCreationStep");
const Core::Id AndroidPackageCreationStep::CreatePackageId("Qt4ProjectManager.AndroidPackageCreationStep");
} // namespace Internal
} // namespace Qt4ProjectManager
......@@ -107,7 +107,7 @@ private:
void raiseError(const QString &shortMsg,
const QString &detailedMsg = QString());
static const QLatin1String CreatePackageId;
static const Core::Id CreatePackageId;
private:
QString m_keystorePath;
......
......@@ -328,9 +328,9 @@ void AndroidPackageCreationWidget::setTargetSDK(const QString &target)
qs->setForced(true);
bm->buildList(bc->stepList(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)),
ProjectExplorer::ProjectExplorerPlugin::displayNameForStepId(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)));
bm->appendStep(qs, ProjectExplorer::ProjectExplorerPlugin::displayNameForStepId(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)));
bm->buildList(bc->stepList(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)),
ProjectExplorer::ProjectExplorerPlugin::displayNameForStepId(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)));
bm->appendStep(qs, ProjectExplorer::ProjectExplorerPlugin::displayNameForStepId(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)));
bc->setSubNodeBuild(0);
// Make the buildconfiguration emit a evironmentChanged() signal
// TODO find a better way
......
......@@ -51,16 +51,16 @@ AndroidPackageInstallationFactory::AndroidPackageInstallationFactory(QObject *pa
{
}
QStringList AndroidPackageInstallationFactory::availableCreationIds(BuildStepList *parent) const
QList<Core::Id> AndroidPackageInstallationFactory::availableCreationIds(BuildStepList *parent) const
{
if (parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
&& parent->target()->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
&& !parent->contains(AndroidPackageInstallationStep::Id))
return QStringList() << AndroidPackageInstallationStep::Id;
return QStringList();
if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
&& parent->target()->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
&& !parent->contains(Core::Id(AndroidPackageInstallationStep::Id)))
return QList<Core::Id>() << Core::Id(AndroidPackageInstallationStep::Id);
return QList<Core::Id>();
}
QString AndroidPackageInstallationFactory::displayNameForId(const QString &id) const
QString AndroidPackageInstallationFactory::displayNameForId(const Core::Id id) const
{
if (id == AndroidPackageInstallationStep::Id)
return QCoreApplication::translate("Qt4ProjectManager::Internal::AndroidPackageInstallationFactory",
......@@ -68,15 +68,15 @@ QString AndroidPackageInstallationFactory::displayNameForId(const QString &id) c
return QString();
}
bool AndroidPackageInstallationFactory::canCreate(BuildStepList *parent, const QString &id) const
bool AndroidPackageInstallationFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
return parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
&& id == QLatin1String(AndroidPackageInstallationStep::Id)
&& parent->target()->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
return parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
&& id == Core::Id(AndroidPackageInstallationStep::Id)
&& parent->target()->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
&& !parent->contains(AndroidPackageInstallationStep::Id);
}
BuildStep *AndroidPackageInstallationFactory::create(BuildStepList *parent, const QString &id)
BuildStep *AndroidPackageInstallationFactory::create(BuildStepList *parent, const Core::Id id)
{
Q_ASSERT(canCreate(parent, id));
return new AndroidPackageInstallationStep(parent);
......
......@@ -43,24 +43,21 @@ class AndroidPackageInstallationFactory: public ProjectExplorer::IBuildStepFacto
public:
explicit AndroidPackageInstallationFactory(QObject *parent = 0);
virtual QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
virtual QString displayNameForId(const QString &id) const;
QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
QString displayNameForId(const Core::Id id) const;
virtual bool canCreate(ProjectExplorer::BuildStepList *parent,
const QString &id) const;
virtual ProjectExplorer::BuildStep *
create(ProjectExplorer::BuildStepList *parent, const QString &id);
bool canCreate(ProjectExplorer::BuildStepList *parent,
const Core::Id id) const;
ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
virtual bool canRestore(ProjectExplorer::BuildStepList *parent,
const QVariantMap &map) const;
virtual ProjectExplorer::BuildStep *
restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
bool canRestore(ProjectExplorer::BuildStepList *parent,
const QVariantMap &map) const;
ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
virtual bool canClone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *product) const;
virtual ProjectExplorer::BuildStep *
clone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *product);
bool canClone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *product) const;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *product);
};
} // namespace Internal
......
......@@ -39,7 +39,7 @@
using namespace Android::Internal;
const QLatin1String AndroidPackageInstallationStep::Id("Qt4ProjectManager.AndroidPackageInstallationStep");
const Core::Id AndroidPackageInstallationStep::Id("Qt4ProjectManager.AndroidPackageInstallationStep");
AndroidPackageInstallationStep::AndroidPackageInstallationStep(ProjectExplorer::BuildStepList *bsl) : MakeStep(bsl, Id)
{
......
......@@ -50,7 +50,7 @@ private:
AndroidPackageInstallationStep *other);
private:
static const QLatin1String Id;
static const Core::Id Id;
};
} // namespace Internal
......
......@@ -90,14 +90,14 @@ QList<ProjectExplorer::Abi> AndroidQtVersion::detectQtAbis() const
32);
}
bool AndroidQtVersion::supportsTargetId(const QString &id) const
bool AndroidQtVersion::supportsTargetId(const Core::Id id) const
{
return id == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID);
return id == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID);
}
QSet<QString> AndroidQtVersion::supportedTargetIds() const
QSet<Core::Id> AndroidQtVersion::supportedTargetIds() const
{
return QSet<QString>() << QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID);
return QSet<Core::Id>() << Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID);
}
QString AndroidQtVersion::description() const
......
......@@ -45,19 +45,19 @@ public:
~AndroidQtVersion ();
AndroidQtVersion *clone() const;
virtual QString type() const;
QString type() const;
virtual bool isValid() const;
virtual QString invalidReason() const;
bool isValid() const;
QString invalidReason() const;
virtual QList<ProjectExplorer::Abi> detectQtAbis() const;
QList<ProjectExplorer::Abi> detectQtAbis() const;
virtual bool supportsTargetId(const QString &id) const;
virtual QSet<QString> supportedTargetIds() const;
bool supportsTargetId(const Core::Id id) const;
QSet<Core::Id> supportedTargetIds() const;
virtual Core::FeatureSet availableFeatures() const;
virtual QString platformName() const;
virtual QString platformDisplayName() const;
Core::FeatureSet availableFeatures() const;
QString platformName() const;
QString platformDisplayName() const;
QString description() const;
};
......
......@@ -52,7 +52,7 @@ using namespace ProjectExplorer;
AndroidRunConfiguration::AndroidRunConfiguration(AndroidTarget *parent,
const QString &proFilePath)
: RunConfiguration(parent, QLatin1String(ANDROID_RC_ID))
: RunConfiguration(parent, Core::Id(ANDROID_RC_ID))
, m_proFilePath(proFilePath)
{
init();
......
......@@ -53,11 +53,13 @@ using namespace Qt4ProjectManager;
namespace {
QString pathFromId(const QString &id)
QString pathFromId(const Core::Id id)
{
if (!id.startsWith(ANDROID_RC_ID_PREFIX))
QString pathStr = QString::fromUtf8(id.name());
const QString prefix = QLatin1String(ANDROID_RC_ID_PREFIX);
if (!pathStr.startsWith(prefix))
return QString();
return id.mid(QString(ANDROID_RC_ID_PREFIX).size());
return pathStr.mid(prefix.size());
}
} // namespace
......@@ -72,11 +74,11 @@ AndroidRunConfigurationFactory::~AndroidRunConfigurationFactory()
}
bool AndroidRunConfigurationFactory::canCreate(Target *parent,
const QString &/*id*/) const
const Core::Id/*id*/) const
{
AndroidTarget *target = qobject_cast<AndroidTarget *>(parent);