Commit 83e573f2 authored by hjk's avatar hjk Committed by Eike Ziller

use new id comparison operators to reduce line noise and save cycles

Change-Id: I2e7d81a4efb75877901d29964df4f71314e951b4
Reviewed-by: default avatarEike Ziller <eike.ziller@nokia.com>
parent 7ca93f9b
......@@ -107,7 +107,7 @@ bool AndroidDeployConfigurationFactory::canClone(ProjectExplorer::Target *parent
{
if (!AndroidManager::supportsAndroid(parent))
return false;
return source->id() == Core::Id(ANDROID_DEPLOYCONFIGURATION_ID);
return source->id() == ANDROID_DEPLOYCONFIGURATION_ID;
}
ProjectExplorer::DeployConfiguration *AndroidDeployConfigurationFactory::clone(ProjectExplorer::Target *parent, ProjectExplorer::DeployConfiguration *source)
......
......@@ -53,7 +53,7 @@ AndroidDeployStepFactory::AndroidDeployStepFactory(QObject *parent)
QList<Core::Id> AndroidDeployStepFactory::availableCreationIds(BuildStepList *parent) const
{
if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY))
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
return QList<Core::Id>();
if (!AndroidManager::supportsAndroid(parent->target()))
return QList<Core::Id>();
......
......@@ -44,7 +44,7 @@ AndroidDeviceFactory::AndroidDeviceFactory()
QString AndroidDeviceFactory::displayNameForId(Core::Id type) const
{
if (type == Core::Id(Constants::ANDROID_DEVICE_TYPE))
if (type == Constants::ANDROID_DEVICE_TYPE)
return tr("Android Device");
return QString();
}
......@@ -67,7 +67,7 @@ ProjectExplorer::IDevice::Ptr AndroidDeviceFactory::create(Core::Id id) const
bool AndroidDeviceFactory::canRestore(const QVariantMap &map) const
{
return ProjectExplorer::IDevice::typeFromMap(map) == Core::Id(Constants::ANDROID_DEVICE_TYPE);
return ProjectExplorer::IDevice::typeFromMap(map) == Constants::ANDROID_DEVICE_TYPE;
}
ProjectExplorer::IDevice::Ptr AndroidDeviceFactory::restore(const QVariantMap &map) const
......
......@@ -55,7 +55,7 @@ AndroidPackageCreationFactory::AndroidPackageCreationFactory(QObject *parent)
QList<Core::Id> AndroidPackageCreationFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY))
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
return QList<Core::Id>();
if (!AndroidManager::supportsAndroid(parent->target()))
return QList<Core::Id>();
......
......@@ -53,7 +53,7 @@ AndroidPackageInstallationFactory::AndroidPackageInstallationFactory(QObject *pa
QList<Core::Id> AndroidPackageInstallationFactory::availableCreationIds(BuildStepList *parent) const
{
if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY))
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
return QList<Core::Id>();
if (!AndroidManager::supportsAndroid(parent->target()))
return QList<Core::Id>();
......
......@@ -74,7 +74,7 @@ QList<Core::Id> AutogenStepFactory::availableCreationIds(BuildStepList *parent)
QString AutogenStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(AUTOGEN_STEP_ID))
if (id == AUTOGEN_STEP_ID)
return tr("Autogen", "Display name for AutotoolsProjectManager::AutogenStep id.");
return QString();
}
......@@ -121,9 +121,9 @@ BuildStep *AutogenStepFactory::restore(BuildStepList *parent, const QVariantMap
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);
if (parent->target()->project()->id() == Constants::AUTOTOOLS_PROJECT_ID)
return parent->id() == ProjectExplorer::Constants::BUILDSTEPS_BUILD;
return false;
}
////////////////////////
......
......@@ -73,7 +73,7 @@ QList<Core::Id> AutoreconfStepFactory::availableCreationIds(BuildStepList *paren
QString AutoreconfStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(AUTORECONF_STEP_ID))
if (id == AUTORECONF_STEP_ID)
return tr("Autoreconf", "Display name for AutotoolsProjectManager::AutoreconfStep id.");
return QString();
}
......@@ -120,9 +120,9 @@ BuildStep *AutoreconfStepFactory::restore(BuildStepList *parent, const QVariantM
bool AutoreconfStepFactory::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);
if (parent->target()->project()->id() == Constants::AUTOTOOLS_PROJECT_ID)
return parent->id() == ProjectExplorer::Constants::BUILDSTEPS_BUILD;
return false;
}
/////////////////////////
......
......@@ -140,7 +140,7 @@ QList<Core::Id> AutotoolsBuildConfigurationFactory::availableCreationIds(const T
QString AutotoolsBuildConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(AUTOTOOLS_BC_ID))
if (id == AUTOTOOLS_BC_ID)
return tr("Build");
return QString();
}
......@@ -149,7 +149,7 @@ bool AutotoolsBuildConfigurationFactory::canCreate(const Target *parent, const C
{
if (!canHandle(parent))
return false;
if (id == Core::Id(AUTOTOOLS_BC_ID))
if (id == AUTOTOOLS_BC_ID)
return true;
return false;
}
......@@ -216,7 +216,7 @@ bool AutotoolsBuildConfigurationFactory::canHandle(const Target *t) const
{
if (!t->project()->supportsProfile(t->profile()))
return false;
return t->project()->id() == Core::Id(Constants::AUTOTOOLS_PROJECT_ID);
return t->project()->id() == Constants::AUTOTOOLS_PROJECT_ID;
}
bool AutotoolsBuildConfigurationFactory::canClone(const Target *parent, BuildConfiguration *source) const
......
......@@ -74,14 +74,14 @@ QList<Core::Id> ConfigureStepFactory::availableCreationIds(BuildStepList *parent
QString ConfigureStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(CONFIGURE_STEP_ID))
if (id == CONFIGURE_STEP_ID)
return tr("Configure", "Display name for AutotoolsProjectManager::ConfigureStep id.");
return QString();
}
bool ConfigureStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
return canHandle(parent) && Core::Id(CONFIGURE_STEP_ID) == id;
return canHandle(parent) && id == CONFIGURE_STEP_ID;
}
BuildStep *ConfigureStepFactory::create(BuildStepList *parent, const Core::Id id)
......@@ -121,9 +121,9 @@ BuildStep *ConfigureStepFactory::restore(BuildStepList *parent, const QVariantMa
bool ConfigureStepFactory::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);
if (parent->target()->project()->id() == Constants::AUTOTOOLS_PROJECT_ID)
return parent->id() == ProjectExplorer::Constants::BUILDSTEPS_BUILD;
return false;
}
////////////////////////
......
......@@ -70,24 +70,23 @@ MakeStepFactory::MakeStepFactory(QObject *parent) :
QList<Core::Id> MakeStepFactory::availableCreationIds(BuildStepList *parent) const
{
if (parent->target()->project()->id() == Core::Id(AUTOTOOLS_PROJECT_ID))
if (parent->target()->project()->id() == AUTOTOOLS_PROJECT_ID)
return QList<Core::Id>() << Core::Id(MAKE_STEP_ID);
return QList<Core::Id>();
}
QString MakeStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(MAKE_STEP_ID))
if (id == MAKE_STEP_ID)
return tr("Make", "Display name for AutotoolsProjectManager::MakeStep id.");
return QString();
}
bool MakeStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
if (parent->target()->project()->id() != Core::Id(AUTOTOOLS_PROJECT_ID))
return false;
return Core::Id(MAKE_STEP_ID) == id;
if (parent->target()->project()->id() == AUTOTOOLS_PROJECT_ID)
return id == MAKE_STEP_ID;
return false;
}
BuildStep *MakeStepFactory::create(BuildStepList *parent, const Core::Id id)
......
......@@ -152,7 +152,7 @@ QList<Core::Id> CMakeBuildConfigurationFactory::availableCreationIds(const Proje
QString CMakeBuildConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(CMAKE_BC_ID))
if (id == CMAKE_BC_ID)
return tr("Build");
return QString();
}
......@@ -161,7 +161,7 @@ bool CMakeBuildConfigurationFactory::canCreate(const ProjectExplorer::Target *pa
{
if (!canHandle(parent))
return false;
if (id == Core::Id(CMAKE_BC_ID))
if (id == CMAKE_BC_ID)
return true;
return false;
}
......
......@@ -56,11 +56,10 @@ using namespace CMakeProjectManager::Internal;
using namespace ProjectExplorer;
namespace {
const char * const MS_ID("CMakeProjectManager.MakeStep");
const char * const CLEAN_KEY("CMakeProjectManager.MakeStep.Clean");
const char * const BUILD_TARGETS_KEY("CMakeProjectManager.MakeStep.BuildTargets");
const char * const ADDITIONAL_ARGUMENTS_KEY("CMakeProjectManager.MakeStep.AdditionalArguments");
const char MS_ID[] = "CMakeProjectManager.MakeStep";
const char CLEAN_KEY[] = "CMakeProjectManager.MakeStep.Clean";
const char BUILD_TARGETS_KEY[] = "CMakeProjectManager.MakeStep.BuildTargets";
const char ADDITIONAL_ARGUMENTS_KEY[] = "CMakeProjectManager.MakeStep.AdditionalArguments";
}
MakeStep::MakeStep(BuildStepList *bsl) :
......@@ -347,9 +346,9 @@ MakeStepFactory::~MakeStepFactory()
bool MakeStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
if (parent->target()->project()->id() != Core::Id(Constants::CMAKEPROJECT_ID))
return false;
return Core::Id(MS_ID) == id;
if (parent->target()->project()->id() == Constants::CMAKEPROJECT_ID)
return id == MS_ID;
return false;
}
BuildStep *MakeStepFactory::create(BuildStepList *parent, const Core::Id id)
......@@ -357,7 +356,7 @@ BuildStep *MakeStepFactory::create(BuildStepList *parent, const Core::Id id)
if (!canCreate(parent, id))
return 0;
MakeStep *step = new MakeStep(parent);
if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)) {
if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) {
step->setClean(true);
step->setAdditionalArguments("clean");
}
......@@ -394,14 +393,14 @@ BuildStep *MakeStepFactory::restore(BuildStepList *parent, const QVariantMap &ma
QList<Core::Id> MakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
if (parent->target()->project()->id() == Core::Id(Constants::CMAKEPROJECT_ID))
if (parent->target()->project()->id() == Constants::CMAKEPROJECT_ID)
return QList<Core::Id>() << Core::Id(MS_ID);
return QList<Core::Id>();
}
QString MakeStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(MS_ID))
if (id == MS_ID)
return tr("Make", "Display name for CMakeProjectManager::MakeStep id.");
return QString();
}
......@@ -52,6 +52,7 @@ public:
bool operator==(Id id) const { return m_id == id.m_id; }
bool operator==(const char *name) const;
bool operator!=(Id id) const { return m_id != id.m_id; }
bool operator!=(const char *name) const { return !operator==(name); }
bool operator<(Id id) const { return m_id < id.m_id; }
bool operator>(Id id) const { return m_id > id.m_id; }
int uniqueIdentifier() const { return m_id; }
......
......@@ -42,7 +42,7 @@ using namespace CppTools;
// ---------------------------
bool CppCompletionAssistProvider::supportsEditor(const Core::Id &editorId) const
{
return editorId == Core::Id(CppEditor::Constants::CPPEDITOR_ID);
return editorId == CppEditor::Constants::CPPEDITOR_ID;
}
int CppCompletionAssistProvider::activationCharSequenceLength() const
......
......@@ -749,7 +749,7 @@ void FormEditorW::currentEditorChanged(Core::IEditor *editor)
if (Designer::Constants::Internal::debug)
qDebug() << Q_FUNC_INFO << editor << " of " << m_fwm->formWindowCount();
if (editor && editor->id() == Core::Id(Constants::K_DESIGNER_XML_EDITOR_ID)) {
if (editor && editor->id() == Constants::K_DESIGNER_XML_EDITOR_ID) {
FormWindowEditor *xmlEditor = qobject_cast<FormWindowEditor *>(editor);
QTC_ASSERT(xmlEditor, return);
ensureInitStage(FullyInitialized);
......
......@@ -147,7 +147,7 @@ QList<Core::Id> GenericBuildConfigurationFactory::availableCreationIds(const Pro
QString GenericBuildConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(GENERIC_BC_ID))
if (id == GENERIC_BC_ID)
return tr("Build");
return QString();
}
......@@ -156,7 +156,7 @@ bool GenericBuildConfigurationFactory::canCreate(const ProjectExplorer::Target *
{
if (!canHandle(parent))
return false;
if (id == Core::Id(GENERIC_BC_ID))
if (id == GENERIC_BC_ID)
return true;
return false;
}
......
......@@ -323,9 +323,9 @@ GenericMakeStepFactory::~GenericMakeStepFactory()
bool GenericMakeStepFactory::canCreate(ProjectExplorer::BuildStepList *parent,
const Core::Id id) const
{
if (parent->target()->project()->id() != Core::Id(Constants::GENERICPROJECT_ID))
return false;
return id == Core::Id(GENERIC_MS_ID);
if (parent->target()->project()->id() == Constants::GENERICPROJECT_ID)
return id == GENERIC_MS_ID;
return false;
}
ProjectExplorer::BuildStep *GenericMakeStepFactory::create(ProjectExplorer::BuildStepList *parent,
......@@ -334,10 +334,10 @@ ProjectExplorer::BuildStep *GenericMakeStepFactory::create(ProjectExplorer::Buil
if (!canCreate(parent, id))
return 0;
GenericMakeStep *step = new GenericMakeStep(parent);
if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)) {
if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) {
step->setClean(true);
step->setBuildTarget(QLatin1String("clean"), /* on = */ true);
} else if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)) {
} else if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_BUILD) {
step->setBuildTarget(QLatin1String("all"), /* on = */ true);
}
return step;
......@@ -379,14 +379,14 @@ ProjectExplorer::BuildStep *GenericMakeStepFactory::restore(ProjectExplorer::Bui
QList<Core::Id> GenericMakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
if (parent->target()->project()->id() != Core::Id(Constants::GENERICPROJECT_ID))
return QList<Core::Id>();
return QList<Core::Id>() << Core::Id(GENERIC_MS_ID);
if (parent->target()->project()->id() == Constants::GENERICPROJECT_ID)
return QList<Core::Id>() << Core::Id(GENERIC_MS_ID);
return QList<Core::Id>();
}
QString GenericMakeStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(GENERIC_MS_ID))
if (id == GENERIC_MS_ID)
return QCoreApplication::translate("GenericProjectManager::Internal::GenericMakeStep",
GENERIC_MS_DISPLAY_NAME);
return QString();
......
......@@ -122,7 +122,7 @@ bool checkStartOfIdentifier(const QString &word)
// ----------------------------
bool GLSLCompletionAssistProvider::supportsEditor(const Core::Id &editorId) const
{
return editorId == Core::Id(Constants::C_GLSLEDITOR_ID);
return editorId == Constants::C_GLSLEDITOR_ID;
}
IAssistProcessor *GLSLCompletionAssistProvider::createProcessor() const
......
......@@ -99,7 +99,7 @@ QString shortDayOfWeekName(const QDateTime &dt)
QByteArray packageManagerNameFieldName(Core::Id deviceType)
{
if (deviceType == Core::Id(Madde::Internal::Maemo5OsType))
if (deviceType == Madde::Internal::Maemo5OsType)
return QByteArray("XB-Maemo-Display-Name");
return QByteArray("XSBC-Maemo-Display-Name");
}
......@@ -107,7 +107,7 @@ QByteArray packageManagerNameFieldName(Core::Id deviceType)
QList<QPair<QByteArray, QByteArray> > additionalFields(Core::Id deviceType, const QString &projectName)
{
QList<QPair<QByteArray, QByteArray> > fields;
if (deviceType == Core::Id(Madde::Internal::HarmattanOsType))
if (deviceType == Madde::Internal::HarmattanOsType)
fields << qMakePair(QByteArray("XB-Maemo-Flags"), QByteArray("visible"))
<< qMakePair(QByteArray("XB-MeeGo-Desktop-Entry-Filename"),
QString::fromLatin1("%1_harmattan").arg(projectName).toUtf8())
......@@ -117,10 +117,11 @@ QList<QPair<QByteArray, QByteArray> > additionalFields(Core::Id deviceType, cons
return fields;
}
QByteArray section(Core::Id deviceType) {
if (deviceType == Core::Id(Madde::Internal::Maemo5OsType))
QByteArray section(Core::Id deviceType)
{
if (deviceType == Madde::Internal::Maemo5OsType)
return "user/hidden";
else if (deviceType == Core::Id(Madde::Internal::HarmattanOsType))
if (deviceType == Madde::Internal::HarmattanOsType)
return "user/other";
return QByteArray();
}
......@@ -671,9 +672,9 @@ Utils::FileName DebianManager::debianDirectory(ProjectExplorer::Target *target)
Utils::FileName path = Utils::FileName::fromString(target->project()->projectDirectory());
path.appendPath(PackagingDirName);
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target->profile());
if (deviceType == Core::Id(HarmattanOsType))
if (deviceType == HarmattanOsType)
path.appendPath(QLatin1String("debian_harmattan"));
else if (deviceType == Core::Id(Maemo5OsType))
else if (deviceType == Maemo5OsType)
path.appendPath(QLatin1String("debian_fremantle"));
else
path.clear();
......
......@@ -89,9 +89,9 @@ QString MaddeDevice::displayNameForActionId(Core::Id actionId) const
{
QTC_ASSERT(actionIds().contains(actionId), return QString());
if (actionId == Core::Id(MaddeDeviceTestActionId))
if (actionId == MaddeDeviceTestActionId)
return tr("Test");
if (actionId == Core::Id(Constants::GenericDeployKeyToDeviceActionId))
if (actionId == Constants::GenericDeployKeyToDeviceActionId)
return tr("Deploy Public Key...");
return QString(); // Can't happen.
}
......@@ -102,9 +102,9 @@ void MaddeDevice::executeAction(Core::Id actionId, QWidget *parent) const
QDialog *d = 0;
const IDevice::ConstPtr device = sharedFromThis();
if (actionId == Core::Id(MaddeDeviceTestActionId))
if (actionId == MaddeDeviceTestActionId)
d = new LinuxDeviceTestDialog(device, new MaddeDeviceTester, parent);
else if (actionId == Core::Id(Constants::GenericDeployKeyToDeviceActionId))
else if (actionId == Constants::GenericDeployKeyToDeviceActionId)
d = PublicKeyDeploymentDialog::createDialog(device, parent);
if (d)
d->exec();
......@@ -113,9 +113,9 @@ void MaddeDevice::executeAction(Core::Id actionId, QWidget *parent) const
QString MaddeDevice::maddeDisplayType(Core::Id type)
{
if (type == Core::Id(Maemo5OsType))
if (type == Maemo5OsType)
return tr("Maemo5/Fremantle");
if (type == Core::Id(HarmattanOsType))
if (type == HarmattanOsType)
return tr("MeeGo 1.2 Harmattan");
QTC_ASSERT(false, return QString());
return QString(); // For crappy compilers.
......@@ -123,24 +123,24 @@ QString MaddeDevice::maddeDisplayType(Core::Id type)
bool MaddeDevice::allowsRemoteMounts(Core::Id type)
{
return type == Core::Id(Maemo5OsType);
return type == Maemo5OsType;
}
bool MaddeDevice::allowsPackagingDisabling(Core::Id type)
{
return type == Core::Id(Maemo5OsType);
return type == Maemo5OsType;
}
bool MaddeDevice::allowsQmlDebugging(Core::Id type)
{
return type == Core::Id(HarmattanOsType);
return type == HarmattanOsType;
}
QSize MaddeDevice::packageManagerIconSize(Core::Id type)
{
if (type == Core::Id(Maemo5OsType))
if (type == Maemo5OsType)
return QSize(48, 48);
if (type == Core::Id(HarmattanOsType))
if (type == HarmattanOsType)
return QSize(64, 64);
return QSize();
}
......
......@@ -67,7 +67,7 @@ IDevice::Ptr MaddeDeviceConfigurationFactory::create(Core::Id id) const
bool MaddeDeviceConfigurationFactory::canRestore(const QVariantMap &map) const
{
const Core::Id type = IDevice::typeFromMap(map);
return type == Core::Id(Maemo5OsType) || type == Core::Id(HarmattanOsType);
return type == Maemo5OsType || type == HarmattanOsType;
}
IDevice::Ptr MaddeDeviceConfigurationFactory::restore(const QVariantMap &map) const
......
......@@ -181,7 +181,7 @@ void MaddeDeviceTester::handleMadDeveloperTestFinished(int exitStatus)
} else if (m_processRunner->processExitCode() != 0) {
QString message = tr("Connectivity tool not installed on device. "
"Deployment currently not possible.");
if (m_deviceConfiguration->type() == Core::Id(HarmattanOsType)) {
if (m_deviceConfiguration->type() == HarmattanOsType) {
message += tr("Please switch the device to developer mode "
"via Settings -> Security.");
}
......@@ -191,7 +191,7 @@ void MaddeDeviceTester::handleMadDeveloperTestFinished(int exitStatus)
emit progressMessage(tr("Connectivity tool present.\n"));
}
if (m_deviceConfiguration->type() != Core::Id(HarmattanOsType)) {
if (m_deviceConfiguration->type() != HarmattanOsType) {
setFinished();
return;
}
......
......@@ -145,7 +145,7 @@ void MaemoUploadAndInstallPackageStep::ctor()
{
setDefaultDisplayName(displayName());
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
if (deviceType == Core::Id(HarmattanOsType))
if (deviceType == HarmattanOsType)
m_deployService = new HarmattanUploadAndInstallPackageAction(this);
else
m_deployService = new MaemoUploadAndInstallPackageAction(this);
......
......@@ -131,7 +131,7 @@ void MaemoDeployConfigurationWidget::addDesktopFile()
d.remoteDir = QLatin1String("/usr/share/applications");
Core::Id deviceType
= ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(deployConfiguration()->target()->profile());
if (deviceType == Core::Id(Maemo5OsType))
if (deviceType == Maemo5OsType)
d.remoteDir += QLatin1String("/hildon");
d.localFilePath = desktopFilePath;
if (!deployConfiguration()->deploymentSettingsAssistant()
......
......@@ -53,9 +53,8 @@ using namespace RemoteLinux;
namespace Madde {
namespace Internal {
namespace {
const QString OldMaemoDeployStepId(QLatin1String("Qt4ProjectManager.MaemoDeployStep"));
} // anonymous namespace
const char OldMaemoDeployStepId[] = "Qt4ProjectManager.MaemoDeployStep";
MaemoDeployStepFactory::MaemoDeployStepFactory(QObject *parent)
: IBuildStepFactory(parent)
......@@ -93,17 +92,17 @@ QString MaemoDeployStepFactory::displayNameForId(const Core::Id id) const
{
if (id == MaemoInstallPackageViaMountStep::stepId())
return MaemoInstallPackageViaMountStep::displayName();
else if (id == MaemoCopyFilesViaMountStep::stepId())
if (id == MaemoCopyFilesViaMountStep::stepId())
return MaemoCopyFilesViaMountStep::displayName();
else if (id == MaemoUploadAndInstallPackageStep::stepId())
if (id == MaemoUploadAndInstallPackageStep::stepId())
return MaemoUploadAndInstallPackageStep::displayName();
else if (id == MaemoInstallDebianPackageToSysrootStep::Id)
if (id == MaemoInstallDebianPackageToSysrootStep::Id)
return MaemoInstallDebianPackageToSysrootStep::displayName();
else if (id == MaemoCopyToSysrootStep::Id)
if (id == MaemoCopyToSysrootStep::Id)
return MaemoCopyToSysrootStep::displayName();
else if (id == MaemoMakeInstallToSysrootStep::Id)
if (id == MaemoMakeInstallToSysrootStep::Id)
return MaemoMakeInstallToSysrootStep::displayName();
else if (id == GenericDirectUploadStep::stepId())
if (id == GenericDirectUploadStep::stepId())
return GenericDirectUploadStep::displayName();
if (id == RemoteLinuxCheckForFreeDiskSpaceStep::stepId())
return RemoteLinuxCheckForFreeDiskSpaceStep::stepDisplayName();
......@@ -117,36 +116,33 @@ bool MaemoDeployStepFactory::canCreate(BuildStepList *parent, const Core::Id id)
BuildStep *MaemoDeployStepFactory::create(BuildStepList *parent, const Core::Id id)
{
Core::Id deviceType
= ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
Core::Id deviceType = DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
if (id == MaemoInstallDebianPackageToSysrootStep::Id) {
if (id == MaemoInstallDebianPackageToSysrootStep::Id)
return new MaemoInstallDebianPackageToSysrootStep(parent);
} else if (id == MaemoCopyToSysrootStep::Id) {
if (id == MaemoCopyToSysrootStep::Id)
return new MaemoCopyToSysrootStep(parent);
} else if (id == MaemoMakeInstallToSysrootStep::Id) {
if (id == MaemoMakeInstallToSysrootStep::Id)