aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
authorhjk <qthjk@ovi.com>2012-08-03 15:24:33 +0200
committerEike Ziller <eike.ziller@nokia.com>2012-08-06 10:37:43 +0200
commit83e573f2ece5902454b19aab8ecac4f4ca4b91e5 (patch)
treeda1520aa62a5eb87d9c9e770a5ef974d77be3a7b /src/plugins/projectexplorer
parent7ca93f9b1e728b99a0a4d554733a1fa31e6ab4d9 (diff)
use new id comparison operators to reduce line noise and save cycles
Change-Id: I2e7d81a4efb75877901d29964df4f71314e951b4 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.cpp4
-rw-r--r--src/plugins/projectexplorer/buildstepspage.cpp4
-rw-r--r--src/plugins/projectexplorer/deployconfiguration.cpp8
-rw-r--r--src/plugins/projectexplorer/devicesupport/desktopdevicefactory.cpp4
-rw-r--r--src/plugins/projectexplorer/processstep.cpp4
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp8
-rw-r--r--src/plugins/projectexplorer/settingsaccessor.cpp14
7 files changed, 23 insertions, 23 deletions
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index e5f3d9356f..4ca1bd7903 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -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);
}
diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp
index e450f58981..e0f3d96d4f 100644
--- a/src/plugins/projectexplorer/buildstepspage.cpp
+++ b/src/plugins/projectexplorer/buildstepspage.cpp
@@ -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();
}
diff --git a/src/plugins/projectexplorer/deployconfiguration.cpp b/src/plugins/projectexplorer/deployconfiguration.cpp
index 1704764d98..d7853eca37 100644
--- a/src/plugins/projectexplorer/deployconfiguration.cpp
+++ b/src/plugins/projectexplorer/deployconfiguration.cpp
@@ -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;
}
///
diff --git a/src/plugins/projectexplorer/devicesupport/desktopdevicefactory.cpp b/src/plugins/projectexplorer/devicesupport/desktopdevicefactory.cpp
index 4494fbf463..a5a3a4221c 100644
--- a/src/plugins/projectexplorer/devicesupport/desktopdevicefactory.cpp
+++ b/src/plugins/projectexplorer/devicesupport/desktopdevicefactory.cpp
@@ -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
diff --git a/src/plugins/projectexplorer/processstep.cpp b/src/plugins/projectexplorer/processstep.cpp
index 509552ff2c..a4116b2ce8 100644
--- a/src/plugins/projectexplorer/processstep.cpp
+++ b/src/plugins/projectexplorer/processstep.cpp
@@ -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();
}
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index b55b0aaf1b..a646124379 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -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())
diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp
index d6a3bb4ace..9874035146 100644
--- a/src/plugins/projectexplorer/settingsaccessor.cpp
+++ b/src/plugins/projectexplorer/settingsaccessor.cpp
@@ -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",