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

Change-Id: I2e7d81a4efb75877901d29964df4f71314e951b4
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
This commit is contained in:
hjk
2012-08-03 15:24:33 +02:00
committed by Eike Ziller
parent 7ca93f9b1e
commit 83e573f2ec
68 changed files with 209 additions and 215 deletions

View File

@@ -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)

View File

@@ -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>();

View File

@@ -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

View File

@@ -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>();

View File

@@ -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>();

View File

@@ -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))
if (parent->target()->project()->id() == Constants::AUTOTOOLS_PROJECT_ID)
return parent->id() == ProjectExplorer::Constants::BUILDSTEPS_BUILD;
return false;
return parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
}
////////////////////////

View File

@@ -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))
if (parent->target()->project()->id() == Constants::AUTOTOOLS_PROJECT_ID)
return parent->id() == ProjectExplorer::Constants::BUILDSTEPS_BUILD;
return false;
return parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
}
/////////////////////////

View File

@@ -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

View File

@@ -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))
if (parent->target()->project()->id() == Constants::AUTOTOOLS_PROJECT_ID)
return parent->id() == ProjectExplorer::Constants::BUILDSTEPS_BUILD;
return false;
return parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
}
////////////////////////

View File

@@ -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))
if (parent->target()->project()->id() == AUTOTOOLS_PROJECT_ID)
return id == MAKE_STEP_ID;
return false;
return Core::Id(MAKE_STEP_ID) == id;
}
BuildStep *MakeStepFactory::create(BuildStepList *parent, const Core::Id id)

View File

@@ -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;
}

View File

@@ -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))
if (parent->target()->project()->id() == Constants::CMAKEPROJECT_ID)
return id == MS_ID;
return false;
return Core::Id(MS_ID) == id;
}
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();
}

View File

@@ -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; }

View File

@@ -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

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -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))
if (parent->target()->project()->id() == Constants::GENERICPROJECT_ID)
return id == GENERIC_MS_ID;
return false;
return id == Core::Id(GENERIC_MS_ID);
}
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>();
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();

View File

@@ -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

View File

@@ -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();

View File

@@ -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();
}

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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()

View File

@@ -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)
return new MaemoMakeInstallToSysrootStep(parent);
} else if (id == MaemoInstallPackageViaMountStep::stepId()
|| (id == Core::Id(OldMaemoDeployStepId) && deviceType == Core::Id(Maemo5OsType))) {
if (id == MaemoInstallPackageViaMountStep::stepId()
|| (id == OldMaemoDeployStepId && deviceType == Maemo5OsType))
return new MaemoInstallPackageViaMountStep(parent);
} else if (id == MaemoCopyFilesViaMountStep::stepId()) {
if (id == MaemoCopyFilesViaMountStep::stepId())
return new MaemoCopyFilesViaMountStep(parent);
} else if (id == MaemoUploadAndInstallPackageStep::stepId()
|| (id == Core::Id(OldMaemoDeployStepId) && deviceType == Core::Id(HarmattanOsType))) {
if (id == MaemoUploadAndInstallPackageStep::stepId()
|| (id == OldMaemoDeployStepId && deviceType == HarmattanOsType))
return new MaemoUploadAndInstallPackageStep(parent);
} else if (id == GenericDirectUploadStep::stepId()) {
if (id == GenericDirectUploadStep::stepId())
return new GenericDirectUploadStep(parent, id);
} else if (id == RemoteLinuxCheckForFreeDiskSpaceStep::stepId()) {
if (id == RemoteLinuxCheckForFreeDiskSpaceStep::stepId())
return new RemoteLinuxCheckForFreeDiskSpaceStep(parent);
}
return 0;
}
bool MaemoDeployStepFactory::canRestore(BuildStepList *parent, const QVariantMap &map) const
{
return canCreate(parent, idFromMap(map))
|| idFromMap(map) == Core::Id(OldMaemoDeployStepId);
return canCreate(parent, idFromMap(map)) || idFromMap(map) == OldMaemoDeployStepId;
}
BuildStep *MaemoDeployStepFactory::restore(BuildStepList *parent, const QVariantMap &map)

View File

@@ -65,13 +65,13 @@ bool MaemoGlobal::hasMaemoDevice(const Profile *p)
return false;
const Core::Id type = dev->type();
return type == Core::Id(Maemo5OsType) || type == Core::Id(HarmattanOsType);
return type == Maemo5OsType || type == HarmattanOsType;
}
bool MaemoGlobal::supportsMaemoDevice(const Profile *p)
{
const Core::Id type = DeviceTypeProfileInformation::deviceTypeId(p);
return type == Core::Id(Maemo5OsType) || type == Core::Id(HarmattanOsType);
return type == Maemo5OsType || type == HarmattanOsType;
}
bool MaemoGlobal::isValidMaemo5QtVersion(const QString &qmakePath)
@@ -122,14 +122,14 @@ QString MaemoGlobal::devrootshPath()
int MaemoGlobal::applicationIconSize(const Target *target)
{
Core::Id deviceType = DeviceTypeProfileInformation::deviceTypeId(target->profile());
return deviceType == Core::Id(HarmattanOsType) ? 80 : 64;
return deviceType == HarmattanOsType ? 80 : 64;
}
QString MaemoGlobal::remoteSudo(Core::Id deviceType, const QString &uname)
{
if (uname == QLatin1String("root"))
return QString();
if (deviceType == Core::Id(Maemo5OsType) || deviceType == Core::Id(HarmattanOsType))
if (deviceType == Maemo5OsType || deviceType == HarmattanOsType)
return devrootshPath();
return QString(); // Using sudo would open a can of worms.
}
@@ -199,7 +199,7 @@ QString MaemoGlobal::madCommand(const QString &qmakePath)
QString MaemoGlobal::madDeveloperUiName(Core::Id deviceType)
{
return deviceType == Core::Id(HarmattanOsType)
return deviceType == HarmattanOsType
? tr("SDK Connectivity") : tr("Mad Developer");
}

View File

@@ -236,7 +236,7 @@ QStringList MaemoInstallDebianPackageToSysrootStep::madArguments() const
QStringList args;
args << QLatin1String("xdpkg");
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
if (deviceType == Core::Id(HarmattanOsType))
if (deviceType == HarmattanOsType)
args << QLatin1String("--no-force-downgrade");
args << QLatin1String("-i");
return args;

View File

@@ -93,7 +93,7 @@ bool MaemoPackageCreationFactory::canRestore(ProjectExplorer::BuildStepList *par
const QVariantMap &map) const
{
const Core::Id id = ProjectExplorer::idFromMap(map);
return canCreate(parent, id) || id == Core::Id(OldCreatePackageId);
return canCreate(parent, id) || id == OldCreatePackageId;
}
BuildStep *MaemoPackageCreationFactory::restore(ProjectExplorer::BuildStepList *parent,

View File

@@ -238,7 +238,7 @@ QString AbstractMaemoPackageCreationStep::replaceDots(const QString &name) const
{
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
// Idiotic OVI store requirement for N900 (but not allowed for N9 ...).
if (deviceType == Core::Id(Maemo5OsType)) {
if (deviceType == Maemo5OsType) {
QString adaptedName = name;
return adaptedName.replace(QLatin1Char('.'), QLatin1Char('_'));
}

View File

@@ -607,7 +607,7 @@ QStringList MaemoPublisherFremantleFree::findProblems() const
ProjectExplorer::Target *target = m_buildConfig->target();
Core::Id deviceType
= ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target->profile());
if (deviceType != Core::Id(Maemo5OsType))
if (deviceType != Maemo5OsType)
return QStringList();
const QString &description = DebianManager::shortDescription(DebianManager::debianDirectory(target));

View File

@@ -101,11 +101,11 @@ QList<ProjectExplorer::Abi> MaemoQtVersion::detectQtAbis() const
QList<ProjectExplorer::Abi> result;
if (!isValid())
return result;
if (m_deviceType == Core::Id(Maemo5OsType)) {
if (m_deviceType == Maemo5OsType) {
result.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture, ProjectExplorer::Abi::LinuxOS,
ProjectExplorer::Abi::MaemoLinuxFlavor, ProjectExplorer::Abi::ElfFormat,
32));
} else if (m_deviceType == Core::Id(HarmattanOsType)) {
} else if (m_deviceType == HarmattanOsType) {
result.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture, ProjectExplorer::Abi::LinuxOS,
ProjectExplorer::Abi::HarmattanLinuxFlavor,
ProjectExplorer::Abi::ElfFormat,
@@ -116,9 +116,9 @@ QList<ProjectExplorer::Abi> MaemoQtVersion::detectQtAbis() const
QString MaemoQtVersion::description() const
{
if (m_deviceType == Core::Id(Maemo5OsType))
if (m_deviceType == Maemo5OsType)
return QCoreApplication::translate("QtVersion", "Maemo", "Qt Version is meant for Maemo5");
else if (m_deviceType == Core::Id(HarmattanOsType))
if (m_deviceType == HarmattanOsType)
return QCoreApplication::translate("QtVersion", "Harmattan ", "Qt Version is meant for Harmattan");
return QString();
}
@@ -143,7 +143,7 @@ Core::FeatureSet MaemoQtVersion::availableFeatures() const
features |= Core::FeatureSet(QtSupport::Constants::FEATURE_QTQUICK_COMPONENTS_MEEGO);
features |= Core::FeatureSet(QtSupport::Constants::FEATURE_MOBILE);
if (deviceType() != Core::Id(Maemo5OsType)) //Only Maemo5 has proper support for Widgets
if (deviceType() != Maemo5OsType) //Only Maemo5 has proper support for Widgets
features.remove(Core::Feature(QtSupport::Constants::FEATURE_QWIDGETS));
return features;

View File

@@ -77,7 +77,7 @@ void MaemoRunConfiguration::init()
SLOT(handleRemoteMountsChanged()));
connect(m_remoteMounts, SIGNAL(modelReset()), SLOT(handleRemoteMountsChanged()));
if (DeviceTypeProfileInformation::deviceTypeId(target()->profile()) != Core::Id(HarmattanOsType))
if (DeviceTypeProfileInformation::deviceTypeId(target()->profile()) != HarmattanOsType)
debuggerAspect()->suppressQmlDebuggingOptions();
}

View File

@@ -157,7 +157,7 @@ bool MaemoRunConfigurationFactory::canHandle(Target *t) const
if (!qobject_cast<Qt4Project *>(t->project()))
return false;
Core::Id devType = DeviceTypeProfileInformation::deviceTypeId(t->profile());
return devType == Core::Id(Maemo5OsType) || devType == Core::Id(HarmattanOsType);
return devType == Maemo5OsType || devType == HarmattanOsType;
}
QList<RunConfiguration *> MaemoRunConfigurationFactory::runConfigurationsForNode(Target *t, Node *n)

View File

@@ -62,10 +62,8 @@ using namespace ProjectExplorer;
using namespace Qt4ProjectManager;
using namespace RemoteLinux;
namespace {
const QString OldDeployConfigId = QLatin1String("2.2MaemoDeployConfig");
const char OldDeployConfigId[] = "2.2MaemoDeployConfig";
const char DEPLOYMENT_ASSISTANT_SETTING[] = "RemoteLinux.DeploymentAssistant";
} // namespace
namespace Madde {
namespace Internal {
@@ -124,9 +122,9 @@ QString Qt4MaemoDeployConfiguration::qmakeScope() const
{
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
if (deviceType == Core::Id(Maemo5OsType))
if (deviceType == Maemo5OsType)
return QLatin1String("maemo5");
else if (deviceType == Core::Id(HarmattanOsType))
if (deviceType == HarmattanOsType)
return QLatin1String("contains(MEEGO_EDITION,harmattan)");
return QString("unix");
}
@@ -135,9 +133,9 @@ QString Qt4MaemoDeployConfiguration::installPrefix() const
{
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
if (deviceType == Core::Id(Maemo5OsType))
if (deviceType == Maemo5OsType)
return QLatin1String("/opt");
else if (deviceType == Core::Id(HarmattanOsType))
if (deviceType == HarmattanOsType)
return QLatin1String("/opt");
return QLatin1String("/usr/local");
}
@@ -188,7 +186,7 @@ void Qt4MaemoDeployConfiguration::setupDebianPackaging()
connect(dm, SIGNAL(debianDirectoryChanged(Utils::FileName)), this, SLOT(debianDirChanged(Utils::FileName)));
// Set up aegis manifest on harmattan:
if (deviceType == Core::Id(HarmattanOsType)) {
if (deviceType == HarmattanOsType) {
Utils::FileName manifest = debianDir;
const QString manifestName = QLatin1String("manifest.aegis");
manifest.appendPath(manifestName);
@@ -270,10 +268,10 @@ QList<Core::Id> Qt4MaemoDeployConfigurationFactory::availableCreationIds(Target
return ids;
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->profile());
if (deviceType == Core::Id(Maemo5OsType))
if (deviceType == Maemo5OsType)
ids << Qt4MaemoDeployConfiguration::fremantleWithPackagingId()
<< Qt4MaemoDeployConfiguration::fremantleWithoutPackagingId();
else if (deviceType == Core::Id(HarmattanOsType))
else if (deviceType == HarmattanOsType)
ids << Qt4MaemoDeployConfiguration::harmattanId();
return ids;
}
@@ -324,7 +322,7 @@ bool Qt4MaemoDeployConfigurationFactory::canRestore(Target *parent, const QVaria
{
Core::Id id = idFromMap(map);
return canHandle(parent)
&& (availableCreationIds(parent).contains(id) || id == Core::Id(OldDeployConfigId))
&& (availableCreationIds(parent).contains(id) || id == OldDeployConfigId)
&& MaemoGlobal::supportsMaemoDevice(parent->profile());
}
@@ -334,10 +332,10 @@ DeployConfiguration *Qt4MaemoDeployConfigurationFactory::restore(Target *parent,
return 0;
Core::Id id = idFromMap(map);
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->profile());
if (id == Core::Id(OldDeployConfigId)) {
if (deviceType == Core::Id(Maemo5OsType))
if (id == OldDeployConfigId) {
if (deviceType == Maemo5OsType)
id = Qt4MaemoDeployConfiguration::fremantleWithPackagingId();
else if (deviceType == Core::Id(HarmattanOsType))
else if (deviceType == HarmattanOsType)
id = Qt4MaemoDeployConfiguration::harmattanId();
}
Qt4MaemoDeployConfiguration * const dc

View File

@@ -173,9 +173,9 @@ bool BuildConfiguration::fromMap(const QVariantMap &map)
delete list;
return false;
}
if (list->id() == Core::Id(Constants::BUILDSTEPS_BUILD))
if (list->id() == Constants::BUILDSTEPS_BUILD)
list->setDefaultDisplayName(tr("Build"));
else if (list->id() == Core::Id(Constants::BUILDSTEPS_CLEAN))
else if (list->id() == Constants::BUILDSTEPS_CLEAN)
list->setDefaultDisplayName(tr("Clean"));
m_stepLists.append(list);
}

View File

@@ -514,9 +514,9 @@ BuildStepsPage::~BuildStepsPage()
QString BuildStepsPage::displayName() const
{
if (m_id == Core::Id(Constants::BUILDSTEPS_BUILD))
if (m_id == Constants::BUILDSTEPS_BUILD)
return tr("Build Steps");
if (m_id == Core::Id(Constants::BUILDSTEPS_CLEAN))
if (m_id == Constants::BUILDSTEPS_CLEAN)
return tr("Clean Steps");
return QString();
}

View File

@@ -130,7 +130,7 @@ bool DeployConfiguration::fromMap(const QVariantMap &map)
}
// We assume that we hold the deploy list
Q_ASSERT(m_stepList && m_stepList->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY));
Q_ASSERT(m_stepList && m_stepList->id() == ProjectExplorer::Constants::BUILDSTEPS_DEPLOY);
return true;
}
@@ -169,7 +169,7 @@ QList<Core::Id> DeployConfigurationFactory::availableCreationIds(Target *parent)
QString DeployConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(Constants::DEFAULT_DEPLOYCONFIGURATION_ID))
if (id == Constants::DEFAULT_DEPLOYCONFIGURATION_ID)
//: Display name of the default deploy configuration
return tr("Deploy Configuration");
return QString();
@@ -179,7 +179,7 @@ bool DeployConfigurationFactory::canCreate(Target *parent, const Core::Id id) co
{
if (!canHandle(parent))
return false;
return id == Core::Id(Constants::DEFAULT_DEPLOYCONFIGURATION_ID);
return id == Constants::DEFAULT_DEPLOYCONFIGURATION_ID;
}
DeployConfiguration *DeployConfigurationFactory::create(Target *parent, const Core::Id id)
@@ -244,7 +244,7 @@ bool DeployConfigurationFactory::canHandle(Target *parent) const
{
if (!parent->project()->supportsProfile(parent->profile()))
return false;
return DeviceTypeProfileInformation::deviceTypeId(parent->profile()) == Core::Id(Constants::DESKTOP_DEVICE_TYPE);
return DeviceTypeProfileInformation::deviceTypeId(parent->profile()) == Constants::DESKTOP_DEVICE_TYPE;
}
///

View File

@@ -40,7 +40,7 @@ DesktopDeviceFactory::DesktopDeviceFactory(QObject *parent) : IDeviceFactory(par
QString DesktopDeviceFactory::displayNameForId(Core::Id type) const
{
if (type == Core::Id(Constants::DESKTOP_DEVICE_TYPE))
if (type == Constants::DESKTOP_DEVICE_TYPE)
return tr("Desktop");
return QString();
}
@@ -63,7 +63,7 @@ IDevice::Ptr DesktopDeviceFactory::create(Core::Id id) const
bool DesktopDeviceFactory::canRestore(const QVariantMap &map) const
{
return IDevice::idFromMap(map) == Core::Id(Constants::DESKTOP_DEVICE_ID);
return IDevice::idFromMap(map) == Constants::DESKTOP_DEVICE_ID;
}
IDevice::Ptr DesktopDeviceFactory::restore(const QVariantMap &map) const

View File

@@ -180,7 +180,7 @@ ProcessStepFactory::~ProcessStepFactory()
bool ProcessStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
Q_UNUSED(parent);
return id == Core::Id(PROCESS_STEP_ID);
return id == PROCESS_STEP_ID;
}
BuildStep *ProcessStepFactory::create(BuildStepList *parent, const Core::Id id)
@@ -227,7 +227,7 @@ QList<Core::Id> ProcessStepFactory::availableCreationIds(BuildStepList *parent)
}
QString ProcessStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(PROCESS_STEP_ID))
if (id == PROCESS_STEP_ID)
return ProcessStep::tr("Custom Process Step", "item in combobox");
return QString();
}

View File

@@ -1809,11 +1809,11 @@ void ProjectExplorerPlugin::deploy(QList<Project *> projects)
QString ProjectExplorerPlugin::displayNameForStepId(Core::Id stepId)
{
if (stepId == Core::Id(Constants::BUILDSTEPS_CLEAN))
if (stepId == Constants::BUILDSTEPS_CLEAN)
return tr("Clean");
else if (stepId == Core::Id(Constants::BUILDSTEPS_BUILD))
if (stepId == Constants::BUILDSTEPS_BUILD)
return tr("Build");
else if (stepId == Core::Id(Constants::BUILDSTEPS_DEPLOY))
if (stepId == Constants::BUILDSTEPS_DEPLOY)
return tr("Deploy");
return tr("Build");
}
@@ -1845,7 +1845,7 @@ int ProjectExplorerPlugin::queue(QList<Project *> projects, QList<Core::Id> step
if (!pro || !pro->activeTarget())
continue;
BuildStepList *bsl = 0;
if (id == Core::Id(Constants::BUILDSTEPS_DEPLOY)
if (id == Constants::BUILDSTEPS_DEPLOY
&& pro->activeTarget()->activeDeployConfiguration())
bsl = pro->activeTarget()->activeDeployConfiguration()->stepList();
else if (pro->activeTarget()->activeBuildConfiguration())

View File

@@ -955,11 +955,11 @@ QVariantMap Version0Handler::convertBuildConfigurations(Project *project, const
// Find a valid Id to use:
QString id;
if (project->id() == Core::Id("GenericProjectManager.GenericProject")) {
if (project->id() == "GenericProjectManager.GenericProject") {
id = QLatin1String("GenericProjectManager.GenericBuildConfiguration");
} else if (project->id() == Core::Id("CMakeProjectManager.CMakeProject")) {
} else if (project->id() == "CMakeProjectManager.CMakeProject") {
id = QLatin1String("CMakeProjectManager.CMakeBuildConfiguration");
} else if (project->id() == Core::Id("Qt4ProjectManager.Qt4Project")) {
} else if (project->id() == "Qt4ProjectManager.Qt4Project") {
result.insert(QLatin1String("Qt4ProjectManager.Qt4BuildConfiguration.NeedsV0Update"), QVariant());
id = QLatin1String("Qt4ProjectManager.Qt4BuildConfiguration");
} else {
@@ -1403,17 +1403,17 @@ QVariantMap Version1Handler::update(Project *project, const QVariantMap &map)
// Generate a list of all possible targets for the project:
QList<TargetDescription> targets;
if (project->id() == Core::Id("GenericProjectManager.GenericProject"))
if (project->id() == "GenericProjectManager.GenericProject")
targets << TargetDescription(QString::fromLatin1("GenericProjectManager.GenericTarget"),
QCoreApplication::translate("GenericProjectManager::GenericTarget",
"Desktop",
"Generic desktop target display name"));
else if (project->id() == Core::Id("CMakeProjectManager.CMakeProject"))
else if (project->id() == "CMakeProjectManager.CMakeProject")
targets << TargetDescription(QString::fromLatin1("CMakeProjectManager.DefaultCMakeTarget"),
QCoreApplication::translate("CMakeProjectManager::Internal::CMakeTarget",
"Desktop",
"CMake Default target display name"));
else if (project->id() == Core::Id("Qt4ProjectManager.Qt4Project"))
else if (project->id() == "Qt4ProjectManager.Qt4Project")
targets << TargetDescription(QString::fromLatin1("Qt4ProjectManager.Target.DesktopTarget"),
QCoreApplication::translate("Qt4ProjectManager::Internal::Qt4Target",
"Desktop",
@@ -1434,7 +1434,7 @@ QVariantMap Version1Handler::update(Project *project, const QVariantMap &map)
QCoreApplication::translate("Qt4ProjectManager::Internal::Qt4Target",
"Maemo Device",
"Qt4 Maemo Device target display name"));
else if (project->id() == Core::Id("QmlProjectManager.QmlProject"))
else if (project->id() == "QmlProjectManager.QmlProject")
targets << TargetDescription(QString::fromLatin1("QmlProjectManager.QmlTarget"),
QCoreApplication::translate("QmlProjectManager::QmlTarget",
"QML Viewer",

View File

@@ -666,19 +666,18 @@ void DesignModeWidget::setup()
QWidget *projectsExplorer = 0;
QWidget *fileSystemExplorer = 0;
foreach (Core::INavigationWidgetFactory *factory, factories) {
Core::NavigationView navigationView;
navigationView.widget = 0;
if (factory->id() == Core::Id("Projects")) {
if (factory->id() == "Projects") {
navigationView = factory->createWidget();
projectsExplorer = navigationView.widget;
projectsExplorer->setWindowTitle(tr("Projects"));
} else if (factory->id() == Core::Id("File System")) {
} else if (factory->id() == "File System") {
navigationView = factory->createWidget();
fileSystemExplorer = navigationView.widget;
fileSystemExplorer->setWindowTitle(tr("File System"));
} else if (factory->id() == Core::Id("Open Documents")) {
} else if (factory->id() == "Open Documents") {
navigationView = factory->createWidget();
openDocumentsWidget = navigationView.widget;
openDocumentsWidget->setWindowTitle(tr("Open Documents"));

View File

@@ -471,7 +471,7 @@ int FunctionHintProposalModel::activeArgument(const QString &prefix) const
// -----------------------------
bool QmlJSCompletionAssistProvider::supportsEditor(const Core::Id &editorId) const
{
return editorId == Core::Id(Constants::C_QMLJSEDITOR_ID);
return editorId == Constants::C_QMLJSEDITOR_ID;
}
int QmlJSCompletionAssistProvider::activationCharSequenceLength() const

View File

@@ -96,7 +96,7 @@ QmlJSQuickFixAssistProvider::~QmlJSQuickFixAssistProvider()
bool QmlJSQuickFixAssistProvider::supportsEditor(const Core::Id &editorId) const
{
return editorId == Core::Id(Constants::C_QMLJSEDITOR_ID);
return editorId == Constants::C_QMLJSEDITOR_ID;
}
IAssistProcessor *QmlJSQuickFixAssistProvider::createProcessor() const

View File

@@ -43,7 +43,9 @@ namespace Internal {
QmlProjectRunConfigurationFactory::QmlProjectRunConfigurationFactory(QObject *parent) :
ProjectExplorer::IRunConfigurationFactory(parent)
{ setObjectName(QLatin1String("QmlProjectRunConfigurationFactory")); }
{
setObjectName(QLatin1String("QmlProjectRunConfigurationFactory"));
}
QmlProjectRunConfigurationFactory::~QmlProjectRunConfigurationFactory()
{
@@ -58,7 +60,7 @@ QList<Core::Id> QmlProjectRunConfigurationFactory::availableCreationIds(ProjectE
QString QmlProjectRunConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(Constants::QML_RC_ID))
if (id == Constants::QML_RC_ID)
return tr("Run QML Script");
return QString();
}
@@ -67,7 +69,7 @@ bool QmlProjectRunConfigurationFactory::canCreate(ProjectExplorer::Target *paren
{
if (!canHandle(parent))
return false;
return id == Core::Id(Constants::QML_RC_ID);
return id == Constants::QML_RC_ID;
}
ProjectExplorer::RunConfiguration *QmlProjectRunConfigurationFactory::create(ProjectExplorer::Target *parent, const Core::Id id)
@@ -113,7 +115,7 @@ bool QmlProjectRunConfigurationFactory::canHandle(ProjectExplorer::Target *paren
if (!qobject_cast<QmlProject *>(parent->project()))
return false;
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->profile());
return deviceType == Core::Id(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
return deviceType == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;
}
} // namespace Internal

View File

@@ -57,7 +57,7 @@ BlackBerryCreatePackageStepFactory::~BlackBerryCreatePackageStepFactory()
QList<Core::Id> BlackBerryCreatePackageStepFactory::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>();
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
@@ -69,7 +69,7 @@ QList<Core::Id> BlackBerryCreatePackageStepFactory::availableCreationIds(
QString BlackBerryCreatePackageStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(Constants::QNX_CREATE_PACKAGE_BS_ID))
if (id == Constants::QNX_CREATE_PACKAGE_BS_ID)
return tr("Create BAR Packages");
return QString();
}

View File

@@ -75,7 +75,7 @@ QList<Core::Id> BlackBerryDeployConfigurationFactory::availableCreationIds(Proje
QString BlackBerryDeployConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(Constants::QNX_BB_DEPLOYCONFIGURATION_ID))
if (id == Constants::QNX_BB_DEPLOYCONFIGURATION_ID)
return tr("Deploy to BlackBerry Device");
return QString();

View File

@@ -50,7 +50,7 @@ BlackBerryDeployStepFactory::BlackBerryDeployStepFactory()
QList<Core::Id> BlackBerryDeployStepFactory::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>();
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
@@ -62,7 +62,7 @@ QList<Core::Id> BlackBerryDeployStepFactory::availableCreationIds(ProjectExplore
QString BlackBerryDeployStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(Constants::QNX_DEPLOY_PACKAGE_BS_ID))
if (id == Constants::QNX_DEPLOY_PACKAGE_BS_ID)
return tr("Deploy Package");
return QString();
}

View File

@@ -76,7 +76,7 @@ ProjectExplorer::IDevice::Ptr BlackBerryDeviceConfigurationFactory::create(Core:
bool BlackBerryDeviceConfigurationFactory::canRestore(const QVariantMap &map) const
{
return ProjectExplorer::IDevice::typeFromMap(map) == Core::Id(Constants::QNX_BB_OS_TYPE);
return ProjectExplorer::IDevice::typeFromMap(map) == Constants::QNX_BB_OS_TYPE;
}
ProjectExplorer::IDevice::Ptr BlackBerryDeviceConfigurationFactory::restore(const QVariantMap &map) const

View File

@@ -51,7 +51,7 @@ QnxDeployStepFactory::QnxDeployStepFactory()
QList<Core::Id> QnxDeployStepFactory::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>();
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());

View File

@@ -77,7 +77,7 @@ ProjectExplorer::IDevice::Ptr QnxDeviceConfigurationFactory::create(Core::Id id)
bool QnxDeviceConfigurationFactory::canRestore(const QVariantMap &map) const
{
return ProjectExplorer::IDevice::typeFromMap(map) == Core::Id(Constants::QNX_QNX_OS_TYPE);
return ProjectExplorer::IDevice::typeFromMap(map) == Constants::QNX_QNX_OS_TYPE;
}
ProjectExplorer::IDevice::Ptr QnxDeviceConfigurationFactory::restore(const QVariantMap &map) const

View File

@@ -51,7 +51,7 @@ public:
bool matches(const ProjectExplorer::Profile *p) const
{
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceProfileInformation::device(p);
if (dev.isNull() || dev->id() != Core::Id(ProjectExplorer::Constants::DESKTOP_DEVICE_ID))
if (dev.isNull() || dev->id() != ProjectExplorer::Constants::DESKTOP_DEVICE_ID)
return false;
QtSupport::BaseQtVersion *version = QtSupport::QtProfileInformation::qtVersion(p);
return version && version->type() == QtSupport::Constants::DESKTOPQT;

View File

@@ -518,9 +518,9 @@ MakeStepFactory::~MakeStepFactory()
bool MakeStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
if (parent->target()->project()->id() != Core::Id(Constants::QT4PROJECT_ID))
if (parent->target()->project()->id() == Constants::QT4PROJECT_ID)
return id == MAKESTEP_BS_ID;
return false;
return (id == Core::Id(MAKESTEP_BS_ID));
}
BuildStep *MakeStepFactory::create(BuildStepList *parent, const Core::Id id)
@@ -528,7 +528,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->setUserArguments(QLatin1String("clean"));
}
@@ -565,14 +565,14 @@ BuildStep *MakeStepFactory::restore(BuildStepList *parent, const QVariantMap &ma
QList<Core::Id> MakeStepFactory::availableCreationIds(BuildStepList *parent) const
{
if (parent->target()->project()->id() == Core::Id(Constants::QT4PROJECT_ID))
if (parent->target()->project()->id() == Constants::QT4PROJECT_ID)
return QList<Core::Id>() << Core::Id(MAKESTEP_BS_ID);
return QList<Core::Id>();
}
QString MakeStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(MAKESTEP_BS_ID))
if (id == MAKESTEP_BS_ID)
return tr("Make");
return QString();
}

View File

@@ -109,7 +109,7 @@ ProFileCompletionAssistProvider::~ProFileCompletionAssistProvider()
bool ProFileCompletionAssistProvider::supportsEditor(const Core::Id &editorId) const
{
return editorId == Core::Id(Qt4ProjectManager::Constants::PROFILE_EDITOR_ID);
return editorId == Qt4ProjectManager::Constants::PROFILE_EDITOR_ID;
}
bool ProFileCompletionAssistProvider::isAsynchronous() const

View File

@@ -739,11 +739,11 @@ QMakeStepFactory::~QMakeStepFactory()
bool QMakeStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_BUILD)
return false;
if (!qobject_cast<Qt4BuildConfiguration *>(parent->parent()))
return false;
return (id == Core::Id(QMAKE_BS_ID));
return id == QMAKE_BS_ID;
}
ProjectExplorer::BuildStep *QMakeStepFactory::create(BuildStepList *parent, const Core::Id id)
@@ -783,7 +783,7 @@ ProjectExplorer::BuildStep *QMakeStepFactory::restore(BuildStepList *parent, con
QList<Core::Id> QMakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_BUILD)
if (Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(parent->parent()))
if (!bc->qmakeStep())
return QList<Core::Id>() << Core::Id(QMAKE_BS_ID);
@@ -792,7 +792,7 @@ QList<Core::Id> QMakeStepFactory::availableCreationIds(ProjectExplorer::BuildSte
QString QMakeStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(QMAKE_BS_ID))
if (id == QMAKE_BS_ID)
return tr("qmake");
return QString();
}

View File

@@ -812,7 +812,7 @@ bool Qt4RunConfigurationFactory::canHandle(ProjectExplorer::Target *t) const
if (!qobject_cast<Qt4Project *>(t->project()))
return false;
Core::Id devType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(t->profile());
return devType == Core::Id(ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE);
return devType == ProjectExplorer::Constants::DESKTOP_DEVICE_TYPE;
}
QList<ProjectExplorer::RunConfiguration *> Qt4RunConfigurationFactory::runConfigurationsForNode(ProjectExplorer::Target *t, ProjectExplorer::Node *n)

View File

@@ -750,7 +750,7 @@ S60CreatePackageStepFactory::~S60CreatePackageStepFactory()
bool S60CreatePackageStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
{
return canHandle(parent) && id == Core::Id(SIGN_BS_ID);
return canHandle(parent) && id == SIGN_BS_ID;
}
ProjectExplorer::BuildStep *S60CreatePackageStepFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id)
@@ -774,7 +774,7 @@ ProjectExplorer::BuildStep *S60CreatePackageStepFactory::clone(ProjectExplorer::
bool S60CreatePackageStepFactory::canHandle(ProjectExplorer::BuildStepList *parent) const
{
if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY))
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
return false;
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
if (deviceType != SymbianIDeviceFactory::deviceType())
@@ -808,7 +808,7 @@ QList<Core::Id> S60CreatePackageStepFactory::availableCreationIds(ProjectExplore
QString S60CreatePackageStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(SIGN_BS_ID))
if (id == SIGN_BS_ID)
return tr("Create SIS Package");
return QString();
}

View File

@@ -412,7 +412,7 @@ bool S60DeployConfigurationFactory::canCreate(Target *parent, const Core::Id id)
ProjectExplorer::IDevice::ConstPtr dev = ProjectExplorer::DeviceProfileInformation::device(parent->profile());
if (dev.isNull() || dev->type() != SymbianIDeviceFactory::deviceType())
return false;
return id == Core::Id(S60_DEPLOYCONFIGURATION_ID);
return id == S60_DEPLOYCONFIGURATION_ID;
}
bool S60DeployConfigurationFactory::canRestore(Target *parent, const QVariantMap& map) const
@@ -436,7 +436,7 @@ bool S60DeployConfigurationFactory::canClone(Target *parent, DeployConfiguration
{
if (!qobject_cast<Qt4Project *>(parent->project()))
return false;
return source->id() == Core::Id(S60_DEPLOYCONFIGURATION_ID);
return source->id() == S60_DEPLOYCONFIGURATION_ID;
}
DeployConfiguration *S60DeployConfigurationFactory::clone(Target *parent, DeployConfiguration *source)

View File

@@ -678,7 +678,7 @@ S60DeployStepFactory::~S60DeployStepFactory()
bool S60DeployStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
{
return canHandle(parent) && id == Core::Id(S60_DEPLOY_STEP_ID);
return canHandle(parent) && id == S60_DEPLOY_STEP_ID;
}
ProjectExplorer::BuildStep *S60DeployStepFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id)
@@ -706,7 +706,7 @@ ProjectExplorer::BuildStep *S60DeployStepFactory::clone(ProjectExplorer::BuildSt
bool S60DeployStepFactory::canHandle(BuildStepList *parent) const
{
if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY))
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
return false;
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->target()->profile());
if (deviceType != SymbianIDeviceFactory::deviceType())
@@ -739,7 +739,7 @@ QList<Core::Id> S60DeployStepFactory::availableCreationIds(ProjectExplorer::Buil
QString S60DeployStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(S60_DEPLOY_STEP_ID))
if (id == S60_DEPLOY_STEP_ID)
return tr("Deploy SIS Package");
return QString();
}

View File

@@ -379,7 +379,7 @@ bool S60DeviceRunConfigurationFactory::canRestore(Target *parent, const QVariant
return false;
const Core::Id id = ProjectExplorer::idFromMap(map);
return id == Core::Id(S60_DEVICE_RC_ID);
return id == S60_DEVICE_RC_ID;
}
RunConfiguration *S60DeviceRunConfigurationFactory::restore(Target *parent, const QVariantMap &map)
@@ -398,7 +398,7 @@ bool S60DeviceRunConfigurationFactory::canClone(Target *parent, RunConfiguration
{
if (!canHandle(parent))
return false;
return source->id() == Core::Id(S60_DEVICE_RC_ID);
return source->id() == S60_DEVICE_RC_ID;
}
RunConfiguration *S60DeviceRunConfigurationFactory::clone(Target *parent, RunConfiguration *source)

View File

@@ -55,7 +55,7 @@ S60PublishingBuildSettingsPageOvi::S60PublishingBuildSettingsPageOvi(S60Publishe
#if 0 // FIXME: This needs serious work!
QList<Qt4BuildConfiguration *> list;
foreach (const ProjectExplorer::Target *const target, project->targets()) {
if (target->id() != Core::Id(Qt4ProjectManager::Constants::S60_DEVICE_TARGET_ID))
if (target->id() != Qt4ProjectManager::Constants::S60_DEVICE_TARGET_ID)
continue;
foreach (ProjectExplorer::BuildConfiguration * const bc, target->buildConfigurations()) {
Qt4BuildConfiguration * const qt4bc

View File

@@ -599,17 +599,16 @@ QList<Core::Id> Qt4BuildConfigurationFactory::availableCreationIds(const Target
QString Qt4BuildConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (id != Core::Id(QT4_BC_ID))
return QString();
if (id == QT4_BC_ID)
return tr("Qmake based build");
return QString();
}
bool Qt4BuildConfigurationFactory::canCreate(const Target *parent, const Core::Id id) const
{
if (!canHandle(parent))
return false;
return id == Core::Id(QT4_BC_ID);
return id == QT4_BC_ID;
}
BuildConfiguration *Qt4BuildConfigurationFactory::create(ProjectExplorer::Target *parent, const Core::Id id, const QString &name)
@@ -676,7 +675,7 @@ bool Qt4BuildConfigurationFactory::canRestore(const Target *parent, const QVaria
{
if (!canHandle(parent))
return false;
return ProjectExplorer::idFromMap(map) == Core::Id(QT4_BC_ID);
return ProjectExplorer::idFromMap(map) == QT4_BC_ID;
}
BuildConfiguration *Qt4BuildConfigurationFactory::restore(Target *parent, const QVariantMap &map)

View File

@@ -360,7 +360,7 @@ bool CustomExecutableRunConfigurationFactory::canCreate(ProjectExplorer::Target
{
if (!canHandle(parent))
return false;
return id == Core::Id(CUSTOM_EXECUTABLE_ID);
return id == CUSTOM_EXECUTABLE_ID;
}
ProjectExplorer::RunConfiguration *
@@ -422,7 +422,7 @@ QList<Core::Id> CustomExecutableRunConfigurationFactory::availableCreationIds(Pr
QString CustomExecutableRunConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (id == Core::Id(CUSTOM_EXECUTABLE_ID))
if (id == CUSTOM_EXECUTABLE_ID)
return tr("Custom Executable");
return QString();
}

View File

@@ -46,7 +46,7 @@ GenericLinuxDeviceConfigurationFactory::GenericLinuxDeviceConfigurationFactory(Q
QString GenericLinuxDeviceConfigurationFactory::displayNameForId(Core::Id type) const
{
QTC_ASSERT(type == Core::Id(Constants::GenericLinuxOsType), return QString());
QTC_ASSERT(type == Constants::GenericLinuxOsType, return QString());
return tr("Generic Linux Device");
}
@@ -57,7 +57,7 @@ QList<Core::Id> GenericLinuxDeviceConfigurationFactory::availableCreationIds() c
IDevice::Ptr GenericLinuxDeviceConfigurationFactory::create(Core::Id id) const
{
QTC_ASSERT(id == Core::Id(Constants::GenericLinuxOsType), return IDevice::Ptr());
QTC_ASSERT(id == Constants::GenericLinuxOsType, return IDevice::Ptr());
GenericLinuxDeviceConfigurationWizard wizard;
if (wizard.exec() != QDialog::Accepted)
return IDevice::Ptr();
@@ -66,7 +66,7 @@ IDevice::Ptr GenericLinuxDeviceConfigurationFactory::create(Core::Id id) const
bool GenericLinuxDeviceConfigurationFactory::canRestore(const QVariantMap &map) const
{
return IDevice::typeFromMap(map) == Core::Id(Constants::GenericLinuxOsType);
return IDevice::typeFromMap(map) == Constants::GenericLinuxOsType;
}
IDevice::Ptr GenericLinuxDeviceConfigurationFactory::restore(const QVariantMap &map) const

View File

@@ -203,9 +203,9 @@ QString LinuxDevice::displayNameForActionId(Core::Id actionId) const
{
QTC_ASSERT(actionIds().contains(actionId), return QString());
if (actionId == Core::Id(Constants::GenericTestDeviceActionId))
if (actionId == Constants::GenericTestDeviceActionId)
return tr("Test");
if (actionId == Core::Id(Constants::GenericDeployKeyToDeviceActionId))
if (actionId == Constants::GenericDeployKeyToDeviceActionId)
return tr("Deploy Public Key...");
return QString(); // Can't happen.
}
@@ -216,9 +216,9 @@ void LinuxDevice::executeAction(Core::Id actionId, QWidget *parent) const
QDialog *d = 0;
const LinuxDevice::ConstPtr device = sharedFromThis().staticCast<const LinuxDevice>();
if (actionId == Core::Id(Constants::GenericTestDeviceActionId))
if (actionId == Constants::GenericTestDeviceActionId)
d = new LinuxDeviceTestDialog(device, new GenericLinuxDeviceTester, parent);
else if (actionId == Core::Id(Constants::GenericDeployKeyToDeviceActionId))
else if (actionId == Constants::GenericDeployKeyToDeviceActionId)
d = PublicKeyDeploymentDialog::createDialog(device, parent);
if (d)
d->exec();

View File

@@ -68,7 +68,7 @@ QList<Core::Id> RemoteLinuxDeployConfigurationFactory::availableCreationIds(Targ
if (!tc || tc->targetAbi().os() != ProjectExplorer::Abi::LinuxOS)
return ids;
const Core::Id devType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(parent->profile());
if (devType == Core::Id(Constants::GenericLinuxOsType))
if (devType == Constants::GenericLinuxOsType)
ids << genericDeployConfigurationId();
return ids;
}

View File

@@ -144,7 +144,7 @@ bool RemoteLinuxRunConfigurationFactory::canHandle(Target *t) const
return false;
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(t->profile());
return deviceType == Core::Id(RemoteLinux::Constants::GenericLinuxOsType);
return deviceType == RemoteLinux::Constants::GenericLinuxOsType;
}
QList<RunConfiguration *> RemoteLinuxRunConfigurationFactory::runConfigurationsForNode(Target *t, ProjectExplorer::Node *n)

View File

@@ -48,7 +48,7 @@ using namespace TaskList::Internal;
bool StopMonitoringHandler::canHandle(const ProjectExplorer::Task &task) const
{
return task.category == Core::Id(Constants::TASKLISTTASK_ID);
return task.category == Constants::TASKLISTTASK_ID;
}
void StopMonitoringHandler::handle(const ProjectExplorer::Task &task)