summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/android/androidconstants.h2
-rw-r--r--src/plugins/android/androiddeployconfiguration.cpp26
-rw-r--r--src/plugins/android/androiddeployconfiguration.h8
-rw-r--r--src/plugins/android/androiddeploystep.cpp2
-rw-r--r--src/plugins/android/androiddeploystep.h2
-rw-r--r--src/plugins/android/androiddeploystepfactory.cpp22
-rw-r--r--src/plugins/android/androiddeploystepfactory.h26
-rw-r--r--src/plugins/android/androidpackagecreationfactory.cpp22
-rw-r--r--src/plugins/android/androidpackagecreationfactory.h27
-rw-r--r--src/plugins/android/androidpackagecreationstep.cpp2
-rw-r--r--src/plugins/android/androidpackagecreationstep.h2
-rw-r--r--src/plugins/android/androidpackagecreationwidget.cpp6
-rw-r--r--src/plugins/android/androidpackageinstallationfactory.cpp24
-rw-r--r--src/plugins/android/androidpackageinstallationfactory.h27
-rw-r--r--src/plugins/android/androidpackageinstallationstep.cpp2
-rw-r--r--src/plugins/android/androidpackageinstallationstep.h2
-rw-r--r--src/plugins/android/androidqtversion.cpp8
-rw-r--r--src/plugins/android/androidqtversion.h18
-rw-r--r--src/plugins/android/androidrunconfiguration.cpp2
-rw-r--r--src/plugins/android/androidrunfactories.cpp28
-rw-r--r--src/plugins/android/androidrunfactories.h8
-rw-r--r--src/plugins/android/androidtarget.cpp2
-rw-r--r--src/plugins/android/androidtarget.h2
-rw-r--r--src/plugins/android/androidtargetfactory.cpp39
-rw-r--r--src/plugins/android/androidtargetfactory.h18
-rw-r--r--src/plugins/autotoolsprojectmanager/autogenstep.cpp29
-rw-r--r--src/plugins/autotoolsprojectmanager/autogenstep.h10
-rw-r--r--src/plugins/autotoolsprojectmanager/autoreconfstep.cpp29
-rw-r--r--src/plugins/autotoolsprojectmanager/autoreconfstep.h10
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp29
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h10
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsproject.cpp6
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolsproject.h2
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolstarget.cpp24
-rw-r--r--src/plugins/autotoolsprojectmanager/autotoolstarget.h10
-rw-r--r--src/plugins/autotoolsprojectmanager/configurestep.cpp29
-rw-r--r--src/plugins/autotoolsprojectmanager/configurestep.h10
-rw-r--r--src/plugins/autotoolsprojectmanager/makestep.cpp29
-rw-r--r--src/plugins/autotoolsprojectmanager/makestep.h10
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp21
-rw-r--r--src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h8
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.cpp6
-rw-r--r--src/plugins/cmakeprojectmanager/cmakeproject.h2
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp31
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.h8
-rw-r--r--src/plugins/cmakeprojectmanager/cmaketarget.cpp22
-rw-r--r--src/plugins/cmakeprojectmanager/cmaketarget.h10
-rw-r--r--src/plugins/cmakeprojectmanager/makestep.cpp29
-rw-r--r--src/plugins/cmakeprojectmanager/makestep.h18
-rw-r--r--src/plugins/coreplugin/id.h2
-rw-r--r--src/plugins/genericprojectmanager/genericbuildconfiguration.cpp23
-rw-r--r--src/plugins/genericprojectmanager/genericbuildconfiguration.h12
-rw-r--r--src/plugins/genericprojectmanager/genericmakestep.cpp32
-rw-r--r--src/plugins/genericprojectmanager/genericmakestep.h33
-rw-r--r--src/plugins/genericprojectmanager/genericproject.cpp6
-rw-r--r--src/plugins/genericprojectmanager/genericproject.h2
-rw-r--r--src/plugins/genericprojectmanager/generictarget.cpp20
-rw-r--r--src/plugins/genericprojectmanager/generictarget.h10
-rw-r--r--src/plugins/madde/maddeuploadandinstallpackagesteps.cpp8
-rw-r--r--src/plugins/madde/maddeuploadandinstallpackagesteps.h4
-rw-r--r--src/plugins/madde/maemoconstants.h4
-rw-r--r--src/plugins/madde/maemodeploybymountsteps.cpp8
-rw-r--r--src/plugins/madde/maemodeploybymountsteps.h4
-rw-r--r--src/plugins/madde/maemodeploystepfactory.cpp21
-rw-r--r--src/plugins/madde/maemodeploystepfactory.h29
-rw-r--r--src/plugins/madde/maemoglobal.cpp14
-rw-r--r--src/plugins/madde/maemoglobal.h9
-rw-r--r--src/plugins/madde/maemoinstalltosysrootstep.cpp18
-rw-r--r--src/plugins/madde/maemoinstalltosysrootstep.h10
-rw-r--r--src/plugins/madde/maemopackagecreationfactory.cpp22
-rw-r--r--src/plugins/madde/maemopackagecreationfactory.h29
-rw-r--r--src/plugins/madde/maemopackagecreationstep.cpp10
-rw-r--r--src/plugins/madde/maemopackagecreationstep.h7
-rw-r--r--src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp2
-rw-r--r--src/plugins/madde/maemopublishingwizardfactories.cpp2
-rw-r--r--src/plugins/madde/maemoqtversion.cpp12
-rw-r--r--src/plugins/madde/maemoqtversion.h4
-rw-r--r--src/plugins/madde/maemorunconfiguration.cpp2
-rw-r--r--src/plugins/madde/maemorunconfiguration.h2
-rw-r--r--src/plugins/madde/maemorunfactories.cpp36
-rw-r--r--src/plugins/madde/maemorunfactories.h8
-rw-r--r--src/plugins/madde/qt4maemodeployconfiguration.cpp35
-rw-r--r--src/plugins/madde/qt4maemodeployconfiguration.h24
-rw-r--r--src/plugins/madde/qt4maemotarget.cpp23
-rw-r--r--src/plugins/madde/qt4maemotarget.h21
-rw-r--r--src/plugins/madde/qt4maemotargetfactory.cpp65
-rw-r--r--src/plugins/madde/qt4maemotargetfactory.h20
-rw-r--r--src/plugins/projectexplorer/abstractprocessstep.cpp2
-rw-r--r--src/plugins/projectexplorer/abstractprocessstep.h2
-rw-r--r--src/plugins/projectexplorer/applicationrunconfiguration.cpp2
-rw-r--r--src/plugins/projectexplorer/applicationrunconfiguration.h2
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.cpp20
-rw-r--r--src/plugins/projectexplorer/buildconfiguration.h14
-rw-r--r--src/plugins/projectexplorer/buildsettingspropertiespage.cpp10
-rw-r--r--src/plugins/projectexplorer/buildstep.cpp2
-rw-r--r--src/plugins/projectexplorer/buildstep.h10
-rw-r--r--src/plugins/projectexplorer/buildsteplist.cpp6
-rw-r--r--src/plugins/projectexplorer/buildsteplist.h4
-rw-r--r--src/plugins/projectexplorer/buildstepspage.cpp19
-rw-r--r--src/plugins/projectexplorer/buildstepspage.h6
-rw-r--r--src/plugins/projectexplorer/customexecutablerunconfiguration.cpp18
-rw-r--r--src/plugins/projectexplorer/customexecutablerunconfiguration.h8
-rw-r--r--src/plugins/projectexplorer/deployconfiguration.cpp20
-rw-r--r--src/plugins/projectexplorer/deployconfiguration.h10
-rw-r--r--src/plugins/projectexplorer/processstep.cpp20
-rw-r--r--src/plugins/projectexplorer/processstep.h10
-rw-r--r--src/plugins/projectexplorer/project.cpp8
-rw-r--r--src/plugins/projectexplorer/project.h6
-rw-r--r--src/plugins/projectexplorer/projectconfiguration.cpp18
-rw-r--r--src/plugins/projectexplorer/projectconfiguration.h10
-rw-r--r--src/plugins/projectexplorer/projectexplorer.cpp58
-rw-r--r--src/plugins/projectexplorer/projectexplorer.h5
-rw-r--r--src/plugins/projectexplorer/projectwindow.cpp2
-rw-r--r--src/plugins/projectexplorer/runconfiguration.cpp8
-rw-r--r--src/plugins/projectexplorer/runconfiguration.h12
-rw-r--r--src/plugins/projectexplorer/runsettingspropertiespage.cpp14
-rw-r--r--src/plugins/projectexplorer/settingsaccessor.cpp14
-rw-r--r--src/plugins/projectexplorer/target.cpp15
-rw-r--r--src/plugins/projectexplorer/target.h18
-rw-r--r--src/plugins/projectexplorer/targetsettingspanel.cpp6
-rw-r--r--src/plugins/projectexplorer/toolchain.cpp4
-rw-r--r--src/plugins/projectexplorer/toolchain.h3
-rw-r--r--src/plugins/qmlprojectmanager/qmlproject.cpp6
-rw-r--r--src/plugins/qmlprojectmanager/qmlproject.h2
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp2
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp19
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.h8
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojecttarget.cpp20
-rw-r--r--src/plugins/qmlprojectmanager/qmlprojecttarget.h10
-rw-r--r--src/plugins/qt4projectmanager/buildconfigurationinfo.h2
-rw-r--r--src/plugins/qt4projectmanager/makestep.cpp29
-rw-r--r--src/plugins/qt4projectmanager/makestep.h10
-rw-r--r--src/plugins/qt4projectmanager/qmakestep.cpp31
-rw-r--r--src/plugins/qt4projectmanager/qmakestep.h10
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp10
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.h4
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4desktoptarget.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4desktoptarget.h7
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp35
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h21
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp44
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h8
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4simulatortarget.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4simulatortarget.h4
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp33
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.h20
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp8
-rw-r--r--src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.h4
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/qt4symbiantarget.cpp14
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/qt4symbiantarget.h8
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp34
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.h26
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp33
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h10
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp37
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h8
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp29
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60deploystep.h8
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp36
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h8
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp6
-rw-r--r--src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h4
-rw-r--r--src/plugins/qt4projectmanager/qt4basetargetfactory.h26
-rw-r--r--src/plugins/qt4projectmanager/qt4buildconfiguration.cpp39
-rw-r--r--src/plugins/qt4projectmanager/qt4buildconfiguration.h10
-rw-r--r--src/plugins/qt4projectmanager/qt4nodes.cpp2
-rw-r--r--src/plugins/qt4projectmanager/qt4project.cpp8
-rw-r--r--src/plugins/qt4projectmanager/qt4project.h2
-rw-r--r--src/plugins/qt4projectmanager/qt4projectmanager.cpp4
-rw-r--r--src/plugins/qt4projectmanager/qt4target.cpp30
-rw-r--r--src/plugins/qt4projectmanager/qt4target.h6
-rw-r--r--src/plugins/qt4projectmanager/winceqtversion.cpp8
-rw-r--r--src/plugins/qt4projectmanager/winceqtversion.h4
-rw-r--r--src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp8
-rw-r--r--src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp10
-rw-r--r--src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtwizard.cpp2
-rw-r--r--src/plugins/qt4projectmanager/wizards/qtwizard.h2
-rw-r--r--src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp22
-rw-r--r--src/plugins/qt4projectmanager/wizards/targetsetuppage.h4
-rw-r--r--src/plugins/qtsupport/baseqtversion.cpp2
-rw-r--r--src/plugins/qtsupport/baseqtversion.h6
-rw-r--r--src/plugins/qtsupport/qtversionmanager.cpp8
-rw-r--r--src/plugins/qtsupport/qtversionmanager.h6
-rw-r--r--src/plugins/remotelinux/abstractembeddedlinuxtarget.cpp2
-rw-r--r--src/plugins/remotelinux/abstractembeddedlinuxtarget.h2
-rw-r--r--src/plugins/remotelinux/abstractpackagingstep.cpp2
-rw-r--r--src/plugins/remotelinux/abstractpackagingstep.h2
-rw-r--r--src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp2
-rw-r--r--src/plugins/remotelinux/abstractremotelinuxdeploystep.h2
-rw-r--r--src/plugins/remotelinux/embeddedlinuxqtversion.cpp8
-rw-r--r--src/plugins/remotelinux/embeddedlinuxqtversion.h4
-rw-r--r--src/plugins/remotelinux/embeddedlinuxtargetfactory.cpp31
-rw-r--r--src/plugins/remotelinux/embeddedlinuxtargetfactory.h18
-rw-r--r--src/plugins/remotelinux/genericdirectuploadstep.cpp6
-rw-r--r--src/plugins/remotelinux/genericdirectuploadstep.h4
-rw-r--r--src/plugins/remotelinux/genericembeddedlinuxtarget.cpp5
-rw-r--r--src/plugins/remotelinux/genericembeddedlinuxtarget.h2
-rw-r--r--src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp10
-rw-r--r--src/plugins/remotelinux/genericremotelinuxdeploystepfactory.h8
-rw-r--r--src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.cpp6
-rw-r--r--src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.h5
-rw-r--r--src/plugins/remotelinux/remotelinuxdeployconfiguration.cpp2
-rw-r--r--src/plugins/remotelinux/remotelinuxdeployconfiguration.h2
-rw-r--r--src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp16
-rw-r--r--src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.h10
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfiguration.cpp2
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfiguration.h2
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp39
-rw-r--r--src/plugins/remotelinux/remotelinuxrunconfigurationfactory.h8
-rw-r--r--src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp3
-rw-r--r--src/plugins/remotelinux/tarpackagecreationstep.cpp4
-rw-r--r--src/plugins/remotelinux/tarpackagecreationstep.h2
-rw-r--r--src/plugins/remotelinux/uploadandinstalltarpackagestep.cpp4
-rw-r--r--src/plugins/remotelinux/uploadandinstalltarpackagestep.h2
217 files changed, 1381 insertions, 1359 deletions
diff --git a/src/plugins/android/androidconstants.h b/src/plugins/android/androidconstants.h
index 22798b17e7..c7a0b9ae89 100644
--- a/src/plugins/android/androidconstants.h
+++ b/src/plugins/android/androidconstants.h
@@ -56,7 +56,7 @@ enum AndroidQemuStatus {
#define ANDROID_BAT_SUFFIX ""
#endif
-static const QLatin1String ANDROID_RC_ID(ANDROID_PREFIX);
+static const char ANDROID_RC_ID[] = ANDROID_PREFIX;
static const QLatin1String ANDROID_RC_ID_PREFIX(ANDROID_PREFIX ".");
static const QLatin1String AndroidArgumentsKey(ANDROID_PREFIX ".Arguments");
diff --git a/src/plugins/android/androiddeployconfiguration.cpp b/src/plugins/android/androiddeployconfiguration.cpp
index 78c3f1ee5a..0efd9a46c0 100644
--- a/src/plugins/android/androiddeployconfiguration.cpp
+++ b/src/plugins/android/androiddeployconfiguration.cpp
@@ -45,7 +45,7 @@
using namespace Android::Internal;
AndroidDeployConfiguration::AndroidDeployConfiguration(ProjectExplorer::Target *parent)
- :DeployConfiguration(parent, QLatin1String(ANDROID_DEPLOYCONFIGURATION_ID))
+ :DeployConfiguration(parent, Core::Id(ANDROID_DEPLOYCONFIGURATION_ID))
{
setDisplayName(tr("Deploy to Android device"));
setDefaultDisplayName(displayName());
@@ -66,17 +66,18 @@ AndroidDeployConfigurationFactory::AndroidDeployConfigurationFactory(QObject *pa
ProjectExplorer::DeployConfigurationFactory(parent)
{ }
-bool AndroidDeployConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const QString &id) const
+bool AndroidDeployConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const
{
AndroidTarget *t = qobject_cast<AndroidTarget *>(parent);
- if (!t || t->id() != QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
- || !id.startsWith(QLatin1String(ANDROID_DEPLOYCONFIGURATION_ID)))
+ if (!t || t->id() != Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
+ || !id.toString().startsWith(QLatin1String(ANDROID_DEPLOYCONFIGURATION_ID)))
return false;
return true;
}
-ProjectExplorer::DeployConfiguration *AndroidDeployConfigurationFactory::create(ProjectExplorer::Target *parent, const QString &/*id*/)
+ProjectExplorer::DeployConfiguration *AndroidDeployConfigurationFactory::create(ProjectExplorer::Target *parent, const Core::Id id)
{
+ Q_UNUSED(id);
AndroidDeployConfiguration *dc = new AndroidDeployConfiguration(parent);
if (!dc)
return 0;
@@ -108,7 +109,7 @@ bool AndroidDeployConfigurationFactory::canClone(ProjectExplorer::Target *parent
{
if (!qobject_cast<AndroidTarget *>(parent))
return false;
- return source->id() == QLatin1String(ANDROID_DEPLOYCONFIGURATION_ID);
+ return source->id() == Core::Id(ANDROID_DEPLOYCONFIGURATION_ID);
}
ProjectExplorer::DeployConfiguration *AndroidDeployConfigurationFactory::clone(ProjectExplorer::Target *parent, ProjectExplorer::DeployConfiguration *source)
@@ -119,17 +120,20 @@ ProjectExplorer::DeployConfiguration *AndroidDeployConfigurationFactory::clone(P
return new AndroidDeployConfiguration(t, source);
}
-QStringList AndroidDeployConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
+QList<Core::Id> AndroidDeployConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
{
AndroidTarget *target = qobject_cast<AndroidTarget *>(parent);
if (!target ||
- target->id() != QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID))
- return QStringList();
+ target->id() != Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID))
+ return QList<Core::Id>();
- return target->qt4Project()->applicationProFilePathes(QLatin1String(ANDROID_DC_PREFIX));
+ QList<Core::Id> result;
+ foreach (const QString &id, target->qt4Project()->applicationProFilePathes(QLatin1String(ANDROID_DC_PREFIX)))
+ result << Core::Id(id.toUtf8().constData());
+ return result;
}
-QString AndroidDeployConfigurationFactory::displayNameForId(const QString &/*id*/) const
+QString AndroidDeployConfigurationFactory::displayNameForId(const Core::Id/*id*/) const
{
return tr("Deploy on Android");
}
diff --git a/src/plugins/android/androiddeployconfiguration.h b/src/plugins/android/androiddeployconfiguration.h
index e6550e421f..5a08c4f8ee 100644
--- a/src/plugins/android/androiddeployconfiguration.h
+++ b/src/plugins/android/androiddeployconfiguration.h
@@ -62,16 +62,16 @@ class AndroidDeployConfigurationFactory : public ProjectExplorer::DeployConfigur
public:
explicit AndroidDeployConfigurationFactory(QObject *parent = 0);
- bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
+ ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
ProjectExplorer::DeployConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::DeployConfiguration *source) const;
ProjectExplorer::DeployConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::DeployConfiguration *source);
- QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
// used to translate the ids to names to display to the user
- QString displayNameForId(const QString &id) const;
+ QString displayNameForId(const Core::Id id) const;
};
diff --git a/src/plugins/android/androiddeploystep.cpp b/src/plugins/android/androiddeploystep.cpp
index 64c024add3..57b6d9d1c8 100644
--- a/src/plugins/android/androiddeploystep.cpp
+++ b/src/plugins/android/androiddeploystep.cpp
@@ -58,7 +58,7 @@ using namespace Qt4ProjectManager;
namespace Android {
namespace Internal {
-const QLatin1String AndroidDeployStep::Id("Qt4ProjectManager.AndroidDeployStep");
+const Core::Id AndroidDeployStep::Id("Qt4ProjectManager.AndroidDeployStep");
AndroidDeployStep::AndroidDeployStep(ProjectExplorer::BuildStepList *parent)
: BuildStep(parent, Id)
diff --git a/src/plugins/android/androiddeploystep.h b/src/plugins/android/androiddeploystep.h
index a7627e927b..73553baf84 100644
--- a/src/plugins/android/androiddeploystep.h
+++ b/src/plugins/android/androiddeploystep.h
@@ -123,7 +123,7 @@ private:
QString m_runQASIPackagePath;
AndroidDeployAction m_runDeployAction;
- static const QLatin1String Id;
+ static const Core::Id Id;
};
} // namespace Internal
diff --git a/src/plugins/android/androiddeploystepfactory.cpp b/src/plugins/android/androiddeploystepfactory.cpp
index 289b4f18b1..4344b69208 100644
--- a/src/plugins/android/androiddeploystepfactory.cpp
+++ b/src/plugins/android/androiddeploystepfactory.cpp
@@ -51,16 +51,16 @@ AndroidDeployStepFactory::AndroidDeployStepFactory(QObject *parent)
{
}
-QStringList AndroidDeployStepFactory::availableCreationIds(BuildStepList *parent) const
+QList<Core::Id> AndroidDeployStepFactory::availableCreationIds(BuildStepList *parent) const
{
- if (parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
- && parent->target()->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
+ if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
+ && parent->target()->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
&& !parent->contains(AndroidDeployStep::Id))
- return QStringList() << AndroidDeployStep::Id;
- return QStringList();
+ return QList<Core::Id>() << AndroidDeployStep::Id;
+ return QList<Core::Id>();
}
-QString AndroidDeployStepFactory::displayNameForId(const QString &id) const
+QString AndroidDeployStepFactory::displayNameForId(const Core::Id id) const
{
if (id == AndroidDeployStep::Id)
return QCoreApplication::translate("Qt4ProjectManager::Internal::AndroidDeployStepFactory",
@@ -68,15 +68,15 @@ QString AndroidDeployStepFactory::displayNameForId(const QString &id) const
return QString();
}
-bool AndroidDeployStepFactory::canCreate(BuildStepList *parent, const QString &id) const
+bool AndroidDeployStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
- return parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
- && id == QLatin1String(AndroidDeployStep::Id)
- && parent->target()->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
+ return parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
+ && id == Core::Id(AndroidDeployStep::Id)
+ && parent->target()->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
&& !parent->contains(AndroidDeployStep::Id);
}
-BuildStep *AndroidDeployStepFactory::create(BuildStepList *parent, const QString &id)
+BuildStep *AndroidDeployStepFactory::create(BuildStepList *parent, const Core::Id id)
{
Q_ASSERT(canCreate(parent, id));
return new AndroidDeployStep(parent);
diff --git a/src/plugins/android/androiddeploystepfactory.h b/src/plugins/android/androiddeploystepfactory.h
index c2361acb3f..5d7ee376d8 100644
--- a/src/plugins/android/androiddeploystepfactory.h
+++ b/src/plugins/android/androiddeploystepfactory.h
@@ -44,24 +44,20 @@ class AndroidDeployStepFactory : public ProjectExplorer::IBuildStepFactory
public:
explicit AndroidDeployStepFactory(QObject *parent = 0);
- virtual QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- virtual QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
+ QString displayNameForId(const Core::Id id) const;
- virtual bool canCreate(ProjectExplorer::BuildStepList *parent,
- const QString &id) const;
- virtual ProjectExplorer::BuildStep *
- create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ bool canCreate(ProjectExplorer::BuildStepList *parent,
+ const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
- virtual bool canRestore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map) const;
- virtual ProjectExplorer::BuildStep *
- restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
+ bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
+ ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
- virtual bool canClone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product) const;
- virtual ProjectExplorer::BuildStep *
- clone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product);
+ bool canClone(ProjectExplorer::BuildStepList *parent,
+ ProjectExplorer::BuildStep *product) const;
+ ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
+ ProjectExplorer::BuildStep *product);
};
} // namespace Internal
diff --git a/src/plugins/android/androidpackagecreationfactory.cpp b/src/plugins/android/androidpackagecreationfactory.cpp
index 1711a3fa02..7b3429cf72 100644
--- a/src/plugins/android/androidpackagecreationfactory.cpp
+++ b/src/plugins/android/androidpackagecreationfactory.cpp
@@ -52,16 +52,16 @@ AndroidPackageCreationFactory::AndroidPackageCreationFactory(QObject *parent)
{
}
-QStringList AndroidPackageCreationFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
+QList<Core::Id> AndroidPackageCreationFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
- if (parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
- && parent->target()->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
+ if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
+ && parent->target()->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
&& !parent->contains(AndroidPackageCreationStep::CreatePackageId))
- return QStringList() << AndroidPackageCreationStep::CreatePackageId;
- return QStringList();
+ return QList<Core::Id>() << AndroidPackageCreationStep::CreatePackageId;
+ return QList<Core::Id>();
}
-QString AndroidPackageCreationFactory::displayNameForId(const QString &id) const
+QString AndroidPackageCreationFactory::displayNameForId(const Core::Id id) const
{
if (id == AndroidPackageCreationStep::CreatePackageId)
return QCoreApplication::translate("Qt4ProjectManager::Internal::AndroidPackageCreationFactory",
@@ -69,15 +69,15 @@ QString AndroidPackageCreationFactory::displayNameForId(const QString &id) const
return QString();
}
-bool AndroidPackageCreationFactory::canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const
+bool AndroidPackageCreationFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
{
- return parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
- && id == QLatin1String(AndroidPackageCreationStep::CreatePackageId)
- && parent->target()->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
+ return parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
+ && id == Core::Id(AndroidPackageCreationStep::CreatePackageId)
+ && parent->target()->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
&& !parent->contains(AndroidPackageCreationStep::CreatePackageId);
}
-BuildStep *AndroidPackageCreationFactory::create(ProjectExplorer::BuildStepList *parent, const QString &id)
+BuildStep *AndroidPackageCreationFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id)
{
Q_ASSERT(canCreate(parent, id));
return new AndroidPackageCreationStep(parent);
diff --git a/src/plugins/android/androidpackagecreationfactory.h b/src/plugins/android/androidpackagecreationfactory.h
index 81f1bd9d48..97261f9e54 100644
--- a/src/plugins/android/androidpackagecreationfactory.h
+++ b/src/plugins/android/androidpackagecreationfactory.h
@@ -43,24 +43,21 @@ class AndroidPackageCreationFactory : public ProjectExplorer::IBuildStepFactory
public:
explicit AndroidPackageCreationFactory(QObject *parent = 0);
- virtual QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- virtual QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
+ QString displayNameForId(const Core::Id id) const;
- virtual bool canCreate(ProjectExplorer::BuildStepList *parent,
- const QString &id) const;
- virtual ProjectExplorer::BuildStep *
- create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ bool canCreate(ProjectExplorer::BuildStepList *parent,
+ const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
- virtual bool canRestore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map) const;
- virtual ProjectExplorer::BuildStep *
- restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
+ bool canRestore(ProjectExplorer::BuildStepList *parent,
+ const QVariantMap &map) const;
+ ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
- virtual bool canClone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product) const;
- virtual ProjectExplorer::BuildStep *
- clone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product);
+ bool canClone(ProjectExplorer::BuildStepList *parent,
+ ProjectExplorer::BuildStep *product) const;
+ ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
+ ProjectExplorer::BuildStep *product);
};
} // namespace Internal
diff --git a/src/plugins/android/androidpackagecreationstep.cpp b/src/plugins/android/androidpackagecreationstep.cpp
index df4ed403b5..3684757987 100644
--- a/src/plugins/android/androidpackagecreationstep.cpp
+++ b/src/plugins/android/androidpackagecreationstep.cpp
@@ -583,7 +583,7 @@ void AndroidPackageCreationStep::raiseError(const QString &shortMsg,
TASK_CATEGORY_BUILDSYSTEM));
}
-const QLatin1String AndroidPackageCreationStep::CreatePackageId("Qt4ProjectManager.AndroidPackageCreationStep");
+const Core::Id AndroidPackageCreationStep::CreatePackageId("Qt4ProjectManager.AndroidPackageCreationStep");
} // namespace Internal
} // namespace Qt4ProjectManager
diff --git a/src/plugins/android/androidpackagecreationstep.h b/src/plugins/android/androidpackagecreationstep.h
index 85ed43414b..9815d0be13 100644
--- a/src/plugins/android/androidpackagecreationstep.h
+++ b/src/plugins/android/androidpackagecreationstep.h
@@ -107,7 +107,7 @@ private:
void raiseError(const QString &shortMsg,
const QString &detailedMsg = QString());
- static const QLatin1String CreatePackageId;
+ static const Core::Id CreatePackageId;
private:
QString m_keystorePath;
diff --git a/src/plugins/android/androidpackagecreationwidget.cpp b/src/plugins/android/androidpackagecreationwidget.cpp
index 3ccc08c8d2..1b0c31743b 100644
--- a/src/plugins/android/androidpackagecreationwidget.cpp
+++ b/src/plugins/android/androidpackagecreationwidget.cpp
@@ -328,9 +328,9 @@ void AndroidPackageCreationWidget::setTargetSDK(const QString &target)
qs->setForced(true);
- bm->buildList(bc->stepList(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)),
- ProjectExplorer::ProjectExplorerPlugin::displayNameForStepId(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)));
- bm->appendStep(qs, ProjectExplorer::ProjectExplorerPlugin::displayNameForStepId(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)));
+ bm->buildList(bc->stepList(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)),
+ ProjectExplorer::ProjectExplorerPlugin::displayNameForStepId(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)));
+ bm->appendStep(qs, ProjectExplorer::ProjectExplorerPlugin::displayNameForStepId(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)));
bc->setSubNodeBuild(0);
// Make the buildconfiguration emit a evironmentChanged() signal
// TODO find a better way
diff --git a/src/plugins/android/androidpackageinstallationfactory.cpp b/src/plugins/android/androidpackageinstallationfactory.cpp
index f6b9ff9fc7..448746e5b7 100644
--- a/src/plugins/android/androidpackageinstallationfactory.cpp
+++ b/src/plugins/android/androidpackageinstallationfactory.cpp
@@ -51,16 +51,16 @@ AndroidPackageInstallationFactory::AndroidPackageInstallationFactory(QObject *pa
{
}
-QStringList AndroidPackageInstallationFactory::availableCreationIds(BuildStepList *parent) const
+QList<Core::Id> AndroidPackageInstallationFactory::availableCreationIds(BuildStepList *parent) const
{
- if (parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
- && parent->target()->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
- && !parent->contains(AndroidPackageInstallationStep::Id))
- return QStringList() << AndroidPackageInstallationStep::Id;
- return QStringList();
+ if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
+ && parent->target()->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
+ && !parent->contains(Core::Id(AndroidPackageInstallationStep::Id)))
+ return QList<Core::Id>() << Core::Id(AndroidPackageInstallationStep::Id);
+ return QList<Core::Id>();
}
-QString AndroidPackageInstallationFactory::displayNameForId(const QString &id) const
+QString AndroidPackageInstallationFactory::displayNameForId(const Core::Id id) const
{
if (id == AndroidPackageInstallationStep::Id)
return QCoreApplication::translate("Qt4ProjectManager::Internal::AndroidPackageInstallationFactory",
@@ -68,15 +68,15 @@ QString AndroidPackageInstallationFactory::displayNameForId(const QString &id) c
return QString();
}
-bool AndroidPackageInstallationFactory::canCreate(BuildStepList *parent, const QString &id) const
+bool AndroidPackageInstallationFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
- return parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
- && id == QLatin1String(AndroidPackageInstallationStep::Id)
- && parent->target()->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
+ return parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
+ && id == Core::Id(AndroidPackageInstallationStep::Id)
+ && parent->target()->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)
&& !parent->contains(AndroidPackageInstallationStep::Id);
}
-BuildStep *AndroidPackageInstallationFactory::create(BuildStepList *parent, const QString &id)
+BuildStep *AndroidPackageInstallationFactory::create(BuildStepList *parent, const Core::Id id)
{
Q_ASSERT(canCreate(parent, id));
return new AndroidPackageInstallationStep(parent);
diff --git a/src/plugins/android/androidpackageinstallationfactory.h b/src/plugins/android/androidpackageinstallationfactory.h
index b6619f99e8..1603e95790 100644
--- a/src/plugins/android/androidpackageinstallationfactory.h
+++ b/src/plugins/android/androidpackageinstallationfactory.h
@@ -43,24 +43,21 @@ class AndroidPackageInstallationFactory: public ProjectExplorer::IBuildStepFacto
public:
explicit AndroidPackageInstallationFactory(QObject *parent = 0);
- virtual QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- virtual QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
+ QString displayNameForId(const Core::Id id) const;
- virtual bool canCreate(ProjectExplorer::BuildStepList *parent,
- const QString &id) const;
- virtual ProjectExplorer::BuildStep *
- create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ bool canCreate(ProjectExplorer::BuildStepList *parent,
+ const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
- virtual bool canRestore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map) const;
- virtual ProjectExplorer::BuildStep *
- restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
+ bool canRestore(ProjectExplorer::BuildStepList *parent,
+ const QVariantMap &map) const;
+ ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
- virtual bool canClone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product) const;
- virtual ProjectExplorer::BuildStep *
- clone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product);
+ bool canClone(ProjectExplorer::BuildStepList *parent,
+ ProjectExplorer::BuildStep *product) const;
+ ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
+ ProjectExplorer::BuildStep *product);
};
} // namespace Internal
diff --git a/src/plugins/android/androidpackageinstallationstep.cpp b/src/plugins/android/androidpackageinstallationstep.cpp
index d5b0cf19ee..2d3fb6eeb4 100644
--- a/src/plugins/android/androidpackageinstallationstep.cpp
+++ b/src/plugins/android/androidpackageinstallationstep.cpp
@@ -39,7 +39,7 @@
using namespace Android::Internal;
-const QLatin1String AndroidPackageInstallationStep::Id("Qt4ProjectManager.AndroidPackageInstallationStep");
+const Core::Id AndroidPackageInstallationStep::Id("Qt4ProjectManager.AndroidPackageInstallationStep");
AndroidPackageInstallationStep::AndroidPackageInstallationStep(ProjectExplorer::BuildStepList *bsl) : MakeStep(bsl, Id)
{
diff --git a/src/plugins/android/androidpackageinstallationstep.h b/src/plugins/android/androidpackageinstallationstep.h
index 1fdf148678..8b0b269d4a 100644
--- a/src/plugins/android/androidpackageinstallationstep.h
+++ b/src/plugins/android/androidpackageinstallationstep.h
@@ -50,7 +50,7 @@ private:
AndroidPackageInstallationStep *other);
private:
- static const QLatin1String Id;
+ static const Core::Id Id;
};
} // namespace Internal
diff --git a/src/plugins/android/androidqtversion.cpp b/src/plugins/android/androidqtversion.cpp
index aeae9afeee..9fa3f795c4 100644
--- a/src/plugins/android/androidqtversion.cpp
+++ b/src/plugins/android/androidqtversion.cpp
@@ -90,14 +90,14 @@ QList<ProjectExplorer::Abi> AndroidQtVersion::detectQtAbis() const
32);
}
-bool AndroidQtVersion::supportsTargetId(const QString &id) const
+bool AndroidQtVersion::supportsTargetId(const Core::Id id) const
{
- return id == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID);
+ return id == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID);
}
-QSet<QString> AndroidQtVersion::supportedTargetIds() const
+QSet<Core::Id> AndroidQtVersion::supportedTargetIds() const
{
- return QSet<QString>() << QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID);
+ return QSet<Core::Id>() << Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID);
}
QString AndroidQtVersion::description() const
diff --git a/src/plugins/android/androidqtversion.h b/src/plugins/android/androidqtversion.h
index b57432cb0b..be6f6800fa 100644
--- a/src/plugins/android/androidqtversion.h
+++ b/src/plugins/android/androidqtversion.h
@@ -45,19 +45,19 @@ public:
~AndroidQtVersion ();
AndroidQtVersion *clone() const;
- virtual QString type() const;
+ QString type() const;
- virtual bool isValid() const;
- virtual QString invalidReason() const;
+ bool isValid() const;
+ QString invalidReason() const;
- virtual QList<ProjectExplorer::Abi> detectQtAbis() const;
+ QList<ProjectExplorer::Abi> detectQtAbis() const;
- virtual bool supportsTargetId(const QString &id) const;
- virtual QSet<QString> supportedTargetIds() const;
+ bool supportsTargetId(const Core::Id id) const;
+ QSet<Core::Id> supportedTargetIds() const;
- virtual Core::FeatureSet availableFeatures() const;
- virtual QString platformName() const;
- virtual QString platformDisplayName() const;
+ Core::FeatureSet availableFeatures() const;
+ QString platformName() const;
+ QString platformDisplayName() const;
QString description() const;
};
diff --git a/src/plugins/android/androidrunconfiguration.cpp b/src/plugins/android/androidrunconfiguration.cpp
index 370725381b..0b33498543 100644
--- a/src/plugins/android/androidrunconfiguration.cpp
+++ b/src/plugins/android/androidrunconfiguration.cpp
@@ -52,7 +52,7 @@ using namespace ProjectExplorer;
AndroidRunConfiguration::AndroidRunConfiguration(AndroidTarget *parent,
const QString &proFilePath)
- : RunConfiguration(parent, QLatin1String(ANDROID_RC_ID))
+ : RunConfiguration(parent, Core::Id(ANDROID_RC_ID))
, m_proFilePath(proFilePath)
{
init();
diff --git a/src/plugins/android/androidrunfactories.cpp b/src/plugins/android/androidrunfactories.cpp
index 253e6559b8..2df6eb973f 100644
--- a/src/plugins/android/androidrunfactories.cpp
+++ b/src/plugins/android/androidrunfactories.cpp
@@ -53,11 +53,13 @@ using namespace Qt4ProjectManager;
namespace {
-QString pathFromId(const QString &id)
+QString pathFromId(const Core::Id id)
{
- if (!id.startsWith(ANDROID_RC_ID_PREFIX))
+ QString pathStr = QString::fromUtf8(id.name());
+ const QString prefix = QLatin1String(ANDROID_RC_ID_PREFIX);
+ if (!pathStr.startsWith(prefix))
return QString();
- return id.mid(QString(ANDROID_RC_ID_PREFIX).size());
+ return pathStr.mid(prefix.size());
}
} // namespace
@@ -72,11 +74,11 @@ AndroidRunConfigurationFactory::~AndroidRunConfigurationFactory()
}
bool AndroidRunConfigurationFactory::canCreate(Target *parent,
- const QString &/*id*/) const
+ const Core::Id/*id*/) const
{
AndroidTarget *target = qobject_cast<AndroidTarget *>(parent);
if (!target
- || target->id() != QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)) {
+ || target->id() != Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)) {
return false;
}
return true;
@@ -89,8 +91,8 @@ bool AndroidRunConfigurationFactory::canRestore(Target *parent,
Q_UNUSED(map)
if (!qobject_cast<AndroidTarget *>(parent))
return false;
- return ProjectExplorer::idFromMap(map)
- .startsWith(QLatin1String(ANDROID_RC_ID));
+ QString id = QString::fromUtf8(ProjectExplorer::idFromMap(map).name());
+ return id.startsWith(QLatin1String(ANDROID_RC_ID));
}
bool AndroidRunConfigurationFactory::canClone(Target *parent,
@@ -99,27 +101,27 @@ bool AndroidRunConfigurationFactory::canClone(Target *parent,
return canCreate(parent, source->id());
}
-QStringList AndroidRunConfigurationFactory::availableCreationIds(Target *parent) const
+QList<Core::Id> AndroidRunConfigurationFactory::availableCreationIds(Target *parent) const
{
- QStringList ids;
+ QList<Core::Id> ids;
if (AndroidTarget *t = qobject_cast<AndroidTarget *>(parent)) {
- if (t->id() == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)) {
+ if (t->id() == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID)) {
QList<Qt4ProFileNode *> nodes = t->qt4Project()->allProFiles();
foreach (Qt4ProFileNode *node, nodes)
if (node->projectType() == ApplicationTemplate || node->projectType() == LibraryTemplate)
- ids << node->targetInformation().target;
+ ids << Core::Id(node->targetInformation().target);
}
}
return ids;
}
-QString AndroidRunConfigurationFactory::displayNameForId(const QString &id) const
+QString AndroidRunConfigurationFactory::displayNameForId(const Core::Id id) const
{
return QFileInfo(pathFromId(id)).completeBaseName();
}
RunConfiguration *AndroidRunConfigurationFactory::create(Target *parent,
- const QString &id)
+ const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
diff --git a/src/plugins/android/androidrunfactories.h b/src/plugins/android/androidrunfactories.h
index d9d0f1c6b4..859298fd86 100644
--- a/src/plugins/android/androidrunfactories.h
+++ b/src/plugins/android/androidrunfactories.h
@@ -59,11 +59,11 @@ public:
explicit AndroidRunConfigurationFactory(QObject *parent = 0);
~AndroidRunConfigurationFactory();
- QString displayNameForId(const QString &id) const;
- QStringList availableCreationIds(Target *parent) const;
+ QString displayNameForId(const Core::Id id) const;
+ QList<Core::Id> availableCreationIds(Target *parent) const;
- bool canCreate(Target *parent, const QString &id) const;
- RunConfiguration *create(Target *parent, const QString &id);
+ bool canCreate(Target *parent, const Core::Id id) const;
+ RunConfiguration *create(Target *parent, const Core::Id id);
bool canRestore(Target *parent, const QVariantMap &map) const;
RunConfiguration *restore(Target *parent, const QVariantMap &map);
diff --git a/src/plugins/android/androidtarget.cpp b/src/plugins/android/androidtarget.cpp
index ed6a63cb50..3204b8ecaf 100644
--- a/src/plugins/android/androidtarget.cpp
+++ b/src/plugins/android/androidtarget.cpp
@@ -78,7 +78,7 @@ namespace {
namespace Android {
namespace Internal {
-AndroidTarget::AndroidTarget(Qt4Project *parent, const QString &id) :
+AndroidTarget::AndroidTarget(Qt4Project *parent, const Core::Id id) :
Qt4BaseTarget(parent, id)
, m_androidFilesWatcher(new QFileSystemWatcher(this))
, m_buildConfigurationFactory(new Qt4BuildConfigurationFactory(this))
diff --git a/src/plugins/android/androidtarget.h b/src/plugins/android/androidtarget.h
index f9f2751734..dbbd13273d 100644
--- a/src/plugins/android/androidtarget.h
+++ b/src/plugins/android/androidtarget.h
@@ -89,7 +89,7 @@ public:
ReleaseBuildSigned
};
- explicit AndroidTarget(Qt4ProjectManager::Qt4Project *parent, const QString &id);
+ explicit AndroidTarget(Qt4ProjectManager::Qt4Project *parent, const Core::Id id);
virtual ~AndroidTarget();
Qt4ProjectManager::Qt4BuildConfigurationFactory *buildConfigurationFactory() const;
diff --git a/src/plugins/android/androidtargetfactory.cpp b/src/plugins/android/androidtargetfactory.cpp
index 8fcd0c04b0..2e4987a5d4 100644
--- a/src/plugins/android/androidtargetfactory.cpp
+++ b/src/plugins/android/androidtargetfactory.cpp
@@ -65,38 +65,39 @@ AndroidTargetFactory::~AndroidTargetFactory()
{
}
-bool AndroidTargetFactory::supportsTargetId(const QString &id) const
+bool AndroidTargetFactory::supportsTargetId(const Core::Id id) const
{
- return id == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID);
+ return id == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID);
}
-QSet<QString> AndroidTargetFactory::targetFeatures(const QString &/*id*/) const
+QSet<QString> AndroidTargetFactory::targetFeatures(const Core::Id id) const
{
+ Q_UNUSED(id);
QSet<QString> features;
features << QLatin1String(Qt4ProjectManager::Constants::MOBILE_TARGETFEATURE_ID);
features << QLatin1String(Qt4ProjectManager::Constants::SHADOWBUILD_TARGETFEATURE_ID);
return features;
}
-QStringList AndroidTargetFactory::supportedTargetIds() const
+QList<Core::Id> AndroidTargetFactory::supportedTargetIds() const
{
- return QStringList() << QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID);
+ return QList<Core::Id>() << Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID);
}
-QString AndroidTargetFactory::displayNameForId(const QString &id) const
+QString AndroidTargetFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID))
+ if (id == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID))
return AndroidTarget::defaultDisplayName();
return QString();
}
-QIcon AndroidTargetFactory::iconForId(const QString &id) const
+QIcon AndroidTargetFactory::iconForId(const Core::Id id) const
{
Q_UNUSED(id)
return QIcon(QLatin1String(Constants::ANDROID_SETTINGS_CATEGORY_ICON));
}
-bool AndroidTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
+bool AndroidTargetFactory::canCreate(ProjectExplorer::Project *parent, const Core::Id id) const
{
if (!qobject_cast<Qt4Project *>(parent))
return false;
@@ -115,18 +116,18 @@ Qt4BaseTarget *AndroidTargetFactory::restore(ProjectExplorer::Project *parent, c
if (!canRestore(parent, map))
return 0;
- const QString id = idFromMap(map);
+ const Core::Id id = idFromMap(map);
AndroidTarget *target = 0;
Qt4Project *qt4project = static_cast<Qt4Project *>(parent);
- if (id == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID))
- target = new AndroidTarget(qt4project, QLatin1String("transient ID"));
+ if (id == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID))
+ target = new AndroidTarget(qt4project, id);
if (target && target->fromMap(map))
return target;
delete target;
return 0;
}
-Qt4BaseTarget *AndroidTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
+Qt4BaseTarget *AndroidTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -146,14 +147,14 @@ Qt4BaseTarget *AndroidTargetFactory::create(ProjectExplorer::Project *parent, co
return create(parent, id, infos);
}
-Qt4BaseTarget *AndroidTargetFactory::create(ProjectExplorer::Project *parent,
- const QString &id, const QList<Qt4ProjectManager::BuildConfigurationInfo> &infos)
+Qt4BaseTarget *AndroidTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id,
+ const QList<Qt4ProjectManager::BuildConfigurationInfo> &infos)
{
if (!canCreate(parent, id))
return 0;
AndroidTarget *target = 0;
- if (id == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID))
+ if (id == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID))
target = new AndroidTarget(static_cast<Qt4Project *>(parent), id);
Q_ASSERT(target);
@@ -168,7 +169,7 @@ Qt4BaseTarget *AndroidTargetFactory::create(ProjectExplorer::Project *parent,
info.importing);
}
- target->addDeployConfiguration(target->createDeployConfiguration(QLatin1String(ANDROID_DEPLOYCONFIGURATION_ID)));
+ target->addDeployConfiguration(target->createDeployConfiguration(Core::Id(ANDROID_DEPLOYCONFIGURATION_ID)));
target->createApplicationProFiles(false);
if (target->runConfigurations().isEmpty())
@@ -176,9 +177,9 @@ Qt4BaseTarget *AndroidTargetFactory::create(ProjectExplorer::Project *parent,
return target;
}
-QString AndroidTargetFactory::buildNameForId(const QString &id) const
+QString AndroidTargetFactory::buildNameForId(const Core::Id id) const
{
- if (id == QLatin1String(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID))
+ if (id == Core::Id(Qt4ProjectManager::Constants::ANDROID_DEVICE_TARGET_ID))
return QLatin1String("android");
return QString();
}
diff --git a/src/plugins/android/androidtargetfactory.h b/src/plugins/android/androidtargetfactory.h
index 6ffe027480..c0f77f390d 100644
--- a/src/plugins/android/androidtargetfactory.h
+++ b/src/plugins/android/androidtargetfactory.h
@@ -46,22 +46,22 @@ public:
AndroidTargetFactory(QObject *parent = 0);
~AndroidTargetFactory();
- QStringList supportedTargetIds() const;
- QString displayNameForId(const QString &id) const;
- QIcon iconForId(const QString &id) const;
+ QList<Core::Id> supportedTargetIds() const;
+ QString displayNameForId(const Core::Id id) const;
+ QIcon iconForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
+ bool canCreate(ProjectExplorer::Project *parent, const Core::Id id) const;
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
Qt4ProjectManager::Qt4BaseTarget *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
- bool supportsTargetId(const QString &id) const;
- virtual QSet<QString> targetFeatures(const QString &id) const;
+ bool supportsTargetId(const Core::Id id) const;
+ virtual QSet<QString> targetFeatures(const Core::Id id) const;
- Qt4ProjectManager::Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id);
- Qt4ProjectManager::Qt4BaseTarget *create(ProjectExplorer::Project *parent, const QString &id,
+ Qt4ProjectManager::Qt4BaseTarget *create(ProjectExplorer::Project *parent, const Core::Id id);
+ Qt4ProjectManager::Qt4BaseTarget *create(ProjectExplorer::Project *parent, const Core::Id id,
const QList<Qt4ProjectManager::BuildConfigurationInfo> &infos);
- QString buildNameForId(const QString &id) const;
+ QString buildNameForId(const Core::Id id) const;
};
} // namespace Internal
diff --git a/src/plugins/autotoolsprojectmanager/autogenstep.cpp b/src/plugins/autotoolsprojectmanager/autogenstep.cpp
index 4c3c4e6607..b3c3176784 100644
--- a/src/plugins/autotoolsprojectmanager/autogenstep.cpp
+++ b/src/plugins/autotoolsprojectmanager/autogenstep.cpp
@@ -65,32 +65,32 @@ AutogenStepFactory::AutogenStepFactory(QObject *parent) :
{
}
-QStringList AutogenStepFactory::availableCreationIds(BuildStepList *parent) const
+QList<Core::Id> AutogenStepFactory::availableCreationIds(BuildStepList *parent) const
{
- if (parent->target()->project()->id() == QLatin1String(Constants::AUTOTOOLS_PROJECT_ID))
- return QStringList() << QLatin1String(AUTOGEN_STEP_ID);
- return QStringList();
+ if (parent->target()->project()->id() == Core::Id(Constants::AUTOTOOLS_PROJECT_ID))
+ return QList<Core::Id>() << Core::Id(AUTOGEN_STEP_ID);
+ return QList<Core::Id>();
}
-QString AutogenStepFactory::displayNameForId(const QString &id) const
+QString AutogenStepFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(AUTOGEN_STEP_ID))
+ if (id == Core::Id(AUTOGEN_STEP_ID))
return tr("Autogen", "Display name for AutotoolsProjectManager::AutogenStep id.");
return QString();
}
-bool AutogenStepFactory::canCreate(BuildStepList *parent, const QString &id) const
+bool AutogenStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
- if (parent->target()->project()->id() != QLatin1String(Constants::AUTOTOOLS_PROJECT_ID))
+ if (parent->target()->project()->id() != Core::Id(Constants::AUTOTOOLS_PROJECT_ID))
return false;
- if (parent->id() != QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
+ if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
return false;
- return QLatin1String(AUTOGEN_STEP_ID) == id;
+ return Core::Id(AUTOGEN_STEP_ID) == id;
}
-BuildStep *AutogenStepFactory::create(BuildStepList *parent, const QString &id)
+BuildStep *AutogenStepFactory::create(BuildStepList *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -111,8 +111,7 @@ BuildStep *AutogenStepFactory::clone(BuildStepList *parent, BuildStep *source)
bool AutogenStepFactory::canRestore(BuildStepList *parent, const QVariantMap &map) const
{
- QString id = idFromMap(map);
- return canCreate(parent, id);
+ return canCreate(parent, idFromMap(map));
}
BuildStep *AutogenStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
@@ -130,13 +129,13 @@ BuildStep *AutogenStepFactory::restore(BuildStepList *parent, const QVariantMap
// AutogenStep class
////////////////////////
AutogenStep::AutogenStep(BuildStepList *bsl) :
- AbstractProcessStep(bsl, QLatin1String(AUTOGEN_STEP_ID)),
+ AbstractProcessStep(bsl, Core::Id(AUTOGEN_STEP_ID)),
m_runAutogen(false)
{
ctor();
}
-AutogenStep::AutogenStep(BuildStepList *bsl, const QString &id) :
+AutogenStep::AutogenStep(BuildStepList *bsl, const Core::Id id) :
AbstractProcessStep(bsl, id)
{
ctor();
diff --git a/src/plugins/autotoolsprojectmanager/autogenstep.h b/src/plugins/autotoolsprojectmanager/autogenstep.h
index b9ddd3bfa7..e000b322c7 100644
--- a/src/plugins/autotoolsprojectmanager/autogenstep.h
+++ b/src/plugins/autotoolsprojectmanager/autogenstep.h
@@ -64,10 +64,10 @@ class AutogenStepFactory : public ProjectExplorer::IBuildStepFactory
public:
AutogenStepFactory(QObject *parent = 0);
- QStringList availableCreationIds(ProjectExplorer::BuildStepList *bc) const;
- QString displayNameForId(const QString &id) const;
- bool canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *bc) const;
+ QString displayNameForId(const Core::Id id) const;
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source);
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
@@ -113,7 +113,7 @@ signals:
protected:
AutogenStep(ProjectExplorer::BuildStepList *bsl, AutogenStep *bs);
- AutogenStep(ProjectExplorer::BuildStepList *bsl, const QString &id);
+ AutogenStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
bool fromMap(const QVariantMap &map);
diff --git a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp
index 587bd68333..9b43fe8f2c 100644
--- a/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp
+++ b/src/plugins/autotoolsprojectmanager/autoreconfstep.cpp
@@ -64,32 +64,32 @@ AutoreconfStepFactory::AutoreconfStepFactory(QObject *parent) :
{
}
-QStringList AutoreconfStepFactory::availableCreationIds(BuildStepList *parent) const
+QList<Core::Id> AutoreconfStepFactory::availableCreationIds(BuildStepList *parent) const
{
- if (parent->target()->project()->id() == QLatin1String(Constants::AUTOTOOLS_PROJECT_ID))
- return QStringList() << QLatin1String(AUTORECONF_STEP_ID);
- return QStringList();
+ if (parent->target()->project()->id() == Core::Id(Constants::AUTOTOOLS_PROJECT_ID))
+ return QList<Core::Id>() << Core::Id(AUTORECONF_STEP_ID);
+ return QList<Core::Id>();
}
-QString AutoreconfStepFactory::displayNameForId(const QString &id) const
+QString AutoreconfStepFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(AUTORECONF_STEP_ID))
+ if (id == Core::Id(AUTORECONF_STEP_ID))
return tr("Autoreconf", "Display name for AutotoolsProjectManager::AutoreconfStep id.");
return QString();
}
-bool AutoreconfStepFactory::canCreate(BuildStepList *parent, const QString &id) const
+bool AutoreconfStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
- if (parent->target()->project()->id() != QLatin1String(Constants::AUTOTOOLS_PROJECT_ID))
+ if (parent->target()->project()->id() != Core::Id(Constants::AUTOTOOLS_PROJECT_ID))
return false;
- if (parent->id() != QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
+ if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
return false;
- return QLatin1String(AUTORECONF_STEP_ID) == id;
+ return Core::Id(AUTORECONF_STEP_ID) == id;
}
-BuildStep *AutoreconfStepFactory::create(BuildStepList *parent, const QString &id)
+BuildStep *AutoreconfStepFactory::create(BuildStepList *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -110,8 +110,7 @@ BuildStep *AutoreconfStepFactory::clone(BuildStepList *parent, BuildStep *source
bool AutoreconfStepFactory::canRestore(BuildStepList *parent, const QVariantMap &map) const
{
- QString id = idFromMap(map);
- return canCreate(parent, id);
+ return canCreate(parent, idFromMap(map));
}
BuildStep *AutoreconfStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
@@ -129,13 +128,13 @@ BuildStep *AutoreconfStepFactory::restore(BuildStepList *parent, const QVariantM
// AutoreconfStep class
/////////////////////////
AutoreconfStep::AutoreconfStep(BuildStepList *bsl) :
- AbstractProcessStep(bsl, QLatin1String(AUTORECONF_STEP_ID)),
+ AbstractProcessStep(bsl, Core::Id(AUTORECONF_STEP_ID)),
m_runAutoreconf(false)
{
ctor();
}
-AutoreconfStep::AutoreconfStep(BuildStepList *bsl, const QString &id) :
+AutoreconfStep::AutoreconfStep(BuildStepList *bsl, const Core::Id id) :
AbstractProcessStep(bsl, id)
{
ctor();
diff --git a/src/plugins/autotoolsprojectmanager/autoreconfstep.h b/src/plugins/autotoolsprojectmanager/autoreconfstep.h
index c5f6fe0769..c5c5b82980 100644
--- a/src/plugins/autotoolsprojectmanager/autoreconfstep.h
+++ b/src/plugins/autotoolsprojectmanager/autoreconfstep.h
@@ -63,11 +63,11 @@ class AutoreconfStepFactory : public ProjectExplorer::IBuildStepFactory
public:
AutoreconfStepFactory(QObject *parent = 0);
- QStringList availableCreationIds(ProjectExplorer::BuildStepList *bc) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *bc) const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source);
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
@@ -113,7 +113,7 @@ signals:
protected:
AutoreconfStep(ProjectExplorer::BuildStepList *bsl, AutoreconfStep *bs);
- AutoreconfStep(ProjectExplorer::BuildStepList *bsl, const QString &id);
+ AutoreconfStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
bool fromMap(const QVariantMap &map);
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
index 92eafe762b..44172b7109 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.cpp
@@ -59,12 +59,12 @@ using namespace ProjectExplorer::Constants;
// AutotoolsBuildConfiguration class
//////////////////////////////////////
AutotoolsBuildConfiguration::AutotoolsBuildConfiguration(AutotoolsTarget *parent)
- : BuildConfiguration(parent, QLatin1String(AUTOTOOLS_BC_ID))
+ : BuildConfiguration(parent, Core::Id(AUTOTOOLS_BC_ID))
{
m_buildDirectory = autotoolsTarget()->defaultBuildDirectory();
}
-AutotoolsBuildConfiguration::AutotoolsBuildConfiguration(AutotoolsTarget *parent, const QString &id)
+AutotoolsBuildConfiguration::AutotoolsBuildConfiguration(AutotoolsTarget *parent, const Core::Id id)
: BuildConfiguration(parent, id)
{
}
@@ -126,30 +126,30 @@ AutotoolsBuildConfigurationFactory::AutotoolsBuildConfigurationFactory(QObject *
{
}
-QStringList AutotoolsBuildConfigurationFactory::availableCreationIds(Target *parent) const
+QList<Core::Id> AutotoolsBuildConfigurationFactory::availableCreationIds(Target *parent) const
{
if (!qobject_cast<AutotoolsTarget *>(parent))
- return QStringList();
- return QStringList() << QLatin1String(AUTOTOOLS_BC_ID);
+ return QList<Core::Id>();
+ return QList<Core::Id>() << Core::Id(AUTOTOOLS_BC_ID);
}
-QString AutotoolsBuildConfigurationFactory::displayNameForId(const QString &id) const
+QString AutotoolsBuildConfigurationFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(AUTOTOOLS_BC_ID))
+ if (id == Core::Id(AUTOTOOLS_BC_ID))
return tr("Build");
return QString();
}
-bool AutotoolsBuildConfigurationFactory::canCreate(Target *parent, const QString &id) const
+bool AutotoolsBuildConfigurationFactory::canCreate(Target *parent, const Core::Id id) const
{
if (!qobject_cast<AutotoolsTarget *>(parent))
return false;
- if (id == QLatin1String(AUTOTOOLS_BC_ID))
+ if (id == Core::Id(AUTOTOOLS_BC_ID))
return true;
return false;
}
-AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::create(Target *parent, const QString &id)
+AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::create(Target *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -170,7 +170,7 @@ AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::create(Target *
bc->setDisplayName(buildConfigurationName);
t->addBuildConfiguration(bc);
- t->addDeployConfiguration(t->createDeployConfiguration(QLatin1String(DEFAULT_DEPLOYCONFIGURATION_ID)));
+ t->addDeployConfiguration(t->createDeployConfiguration(Core::Id(DEFAULT_DEPLOYCONFIGURATION_ID)));
// User needs to choose where the executable file is.
// TODO: Parse the file in *Anjuta style* to be able to add custom RunConfigurations.
t->addRunConfiguration(new CustomExecutableRunConfiguration(t));
@@ -181,7 +181,7 @@ AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::create(Target *
AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::createDefaultConfiguration(AutotoolsTarget *target) const
{
AutotoolsBuildConfiguration *bc = new AutotoolsBuildConfiguration(target);
- BuildStepList *buildSteps = bc->stepList(QLatin1String(BUILDSTEPS_BUILD));
+ BuildStepList *buildSteps = bc->stepList(Core::Id(BUILDSTEPS_BUILD));
// ### Build Steps Build ###
// autogen.sh or autoreconf
@@ -205,7 +205,7 @@ AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::createDefaultCo
makeStep->setBuildTarget(QLatin1String("all"), /*on =*/ true);
// ### Build Steps Clean ###
- BuildStepList *cleanSteps = bc->stepList(QLatin1String(BUILDSTEPS_CLEAN));
+ BuildStepList *cleanSteps = bc->stepList(Core::Id(BUILDSTEPS_CLEAN));
MakeStep *cleanMakeStep = new MakeStep(cleanSteps);
cleanMakeStep->setAdditionalArguments(QLatin1String("clean"));
cleanMakeStep->setClean(true);
@@ -231,8 +231,7 @@ AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::clone(Target *p
bool AutotoolsBuildConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const
{
- QString id = idFromMap(map);
- return canCreate(parent, id);
+ return canCreate(parent, idFromMap(map));
}
AutotoolsBuildConfiguration *AutotoolsBuildConfigurationFactory::restore(Target *parent, const QVariantMap &map)
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h
index 9c772f7196..b4880f17fc 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h
+++ b/src/plugins/autotoolsprojectmanager/autotoolsbuildconfiguration.h
@@ -59,7 +59,7 @@ public:
BuildType buildType() const;
protected:
- AutotoolsBuildConfiguration(AutotoolsTarget *parent, const QString &id);
+ AutotoolsBuildConfiguration(AutotoolsTarget *parent, const Core::Id id);
AutotoolsBuildConfiguration(AutotoolsTarget *parent, AutotoolsBuildConfiguration *source);
bool fromMap(const QVariantMap &map);
@@ -75,11 +75,11 @@ class AutotoolsBuildConfigurationFactory : public ProjectExplorer::IBuildConfigu
public:
explicit AutotoolsBuildConfigurationFactory(QObject *parent = 0);
- QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- AutotoolsBuildConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
+ AutotoolsBuildConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
AutotoolsBuildConfiguration *createDefaultConfiguration(AutotoolsTarget *target) const;
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) const;
AutotoolsBuildConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source);
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp
index 92603861af..180e40c888 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.cpp
@@ -128,9 +128,9 @@ QString AutotoolsProject::displayName() const
return m_projectName;
}
-QString AutotoolsProject::id() const
+Core::Id AutotoolsProject::id() const
{
- return QLatin1String(Constants::AUTOTOOLS_PROJECT_ID);
+ return Core::Id(Constants::AUTOTOOLS_PROJECT_ID);
}
Core::IDocument *AutotoolsProject::document() const
@@ -189,7 +189,7 @@ bool AutotoolsProject::fromMap(const QVariantMap &map)
if (!hasUserFile) {
AutotoolsTargetFactory *factory =
ExtensionSystem::PluginManager::instance()->getObject<AutotoolsTargetFactory>();
- AutotoolsTarget *t = factory->create(this, QLatin1String(Constants::DEFAULT_AUTOTOOLS_TARGET_ID));
+ AutotoolsTarget *t = factory->create(this, Core::Id(Constants::DEFAULT_AUTOTOOLS_TARGET_ID));
QTC_ASSERT(t, return false);
QTC_ASSERT(t->activeBuildConfiguration(), return false);
diff --git a/src/plugins/autotoolsprojectmanager/autotoolsproject.h b/src/plugins/autotoolsprojectmanager/autotoolsproject.h
index b737e11ebb..e253ecc5fa 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolsproject.h
+++ b/src/plugins/autotoolsprojectmanager/autotoolsproject.h
@@ -77,7 +77,7 @@ public:
~AutotoolsProject();
QString displayName() const;
- QString id() const;
+ Core::Id id() const;
Core::IDocument *document() const;
ProjectExplorer::IProjectManager *projectManager() const;
AutotoolsTarget *activeTarget() const;
diff --git a/src/plugins/autotoolsprojectmanager/autotoolstarget.cpp b/src/plugins/autotoolsprojectmanager/autotoolstarget.cpp
index 431a9e6367..c061fe9ac7 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolstarget.cpp
+++ b/src/plugins/autotoolsprojectmanager/autotoolstarget.cpp
@@ -54,9 +54,9 @@ using namespace AutotoolsProjectManager;
using namespace AutotoolsProjectManager::Internal;
using namespace ProjectExplorer;
-static QString displayNameForId(const QString &id)
+static QString displayNameForId(const Core::Id id)
{
- if (id == QLatin1String(AutotoolsProjectManager::Constants::DEFAULT_AUTOTOOLS_TARGET_ID))
+ if (id == Core::Id(AutotoolsProjectManager::Constants::DEFAULT_AUTOTOOLS_TARGET_ID))
return QApplication::translate("AutotoolsProjectManager::Internal::AutotoolsTarget",
"Desktop", "Autotools Default target display name");
return QString();
@@ -67,7 +67,7 @@ static QString displayNameForId(const QString &id)
//////////////////////////
AutotoolsTarget::AutotoolsTarget(AutotoolsProject *parent) :
- Target(parent, QLatin1String(Constants::DEFAULT_AUTOTOOLS_TARGET_ID)),
+ Target(parent, Core::Id(Constants::DEFAULT_AUTOTOOLS_TARGET_ID)),
m_buildConfigurationFactory(new AutotoolsBuildConfigurationFactory(this))
{
setDefaultDisplayName(displayNameForId(id()));
@@ -113,29 +113,29 @@ AutotoolsTargetFactory::AutotoolsTargetFactory(QObject *parent) :
{
}
-bool AutotoolsTargetFactory::supportsTargetId(const QString &id) const
+bool AutotoolsTargetFactory::supportsTargetId(const Core::Id id) const
{
- return id == QLatin1String(Constants::DEFAULT_AUTOTOOLS_TARGET_ID);
+ return id == Core::Id(Constants::DEFAULT_AUTOTOOLS_TARGET_ID);
}
-QStringList AutotoolsTargetFactory::supportedTargetIds() const
+QList<Core::Id> AutotoolsTargetFactory::supportedTargetIds() const
{
- return QStringList() << QLatin1String(Constants::DEFAULT_AUTOTOOLS_TARGET_ID);
+ return QList<Core::Id>() << Core::Id(Constants::DEFAULT_AUTOTOOLS_TARGET_ID);
}
-QString AutotoolsTargetFactory::displayNameForId(const QString &id) const
+QString AutotoolsTargetFactory::displayNameForId(const Core::Id id) const
{
return ::displayNameForId(id);
}
-bool AutotoolsTargetFactory::canCreate(Project *parent, const QString &id) const
+bool AutotoolsTargetFactory::canCreate(Project *parent, const Core::Id id) const
{
if (!qobject_cast<AutotoolsProject *>(parent))
return false;
- return id == QLatin1String(Constants::DEFAULT_AUTOTOOLS_TARGET_ID);
+ return id == Core::Id(Constants::DEFAULT_AUTOTOOLS_TARGET_ID);
}
-AutotoolsTarget *AutotoolsTargetFactory::create(Project *parent, const QString &id)
+AutotoolsTarget *AutotoolsTargetFactory::create(Project *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -149,7 +149,7 @@ AutotoolsTarget *AutotoolsTargetFactory::create(Project *parent, const QString &
bc->setDisplayName(tr("Default Build"));
t->addBuildConfiguration(bc);
- t->addDeployConfiguration(t->createDeployConfiguration(QLatin1String(ProjectExplorer::Constants::DEFAULT_DEPLOYCONFIGURATION_ID)));
+ t->addDeployConfiguration(t->createDeployConfiguration(Core::Id(ProjectExplorer::Constants::DEFAULT_DEPLOYCONFIGURATION_ID)));
// User needs to choose where the executable file is.
// TODO: Parse the file in *Anjuta style* to be able to add custom RunConfigurations.
t->addRunConfiguration(new CustomExecutableRunConfiguration(t));
diff --git a/src/plugins/autotoolsprojectmanager/autotoolstarget.h b/src/plugins/autotoolsprojectmanager/autotoolstarget.h
index 55aa55fc84..64589805a3 100644
--- a/src/plugins/autotoolsprojectmanager/autotoolstarget.h
+++ b/src/plugins/autotoolsprojectmanager/autotoolstarget.h
@@ -82,13 +82,13 @@ class AutotoolsTargetFactory : public ProjectExplorer::ITargetFactory
public:
explicit AutotoolsTargetFactory(QObject *parent = 0);
- bool supportsTargetId(const QString &id) const;
+ bool supportsTargetId(const Core::Id id) const;
- QStringList supportedTargetIds() const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> supportedTargetIds() const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
- AutotoolsTarget *create(ProjectExplorer::Project *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Project *parent, const Core::Id id) const;
+ AutotoolsTarget *create(ProjectExplorer::Project *parent, const Core::Id id);
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
AutotoolsTarget *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
};
diff --git a/src/plugins/autotoolsprojectmanager/configurestep.cpp b/src/plugins/autotoolsprojectmanager/configurestep.cpp
index 095911a326..e1af40dd17 100644
--- a/src/plugins/autotoolsprojectmanager/configurestep.cpp
+++ b/src/plugins/autotoolsprojectmanager/configurestep.cpp
@@ -65,32 +65,32 @@ ConfigureStepFactory::ConfigureStepFactory(QObject *parent) :
{
}
-QStringList ConfigureStepFactory::availableCreationIds(BuildStepList *parent) const
+QList<Core::Id> ConfigureStepFactory::availableCreationIds(BuildStepList *parent) const
{
- if (parent->target()->project()->id() == QLatin1String(Constants::AUTOTOOLS_PROJECT_ID))
- return QStringList() << QLatin1String(CONFIGURE_STEP_ID);
- return QStringList();
+ if (parent->target()->project()->id() == Core::Id(Constants::AUTOTOOLS_PROJECT_ID))
+ return QList<Core::Id>() << Core::Id(CONFIGURE_STEP_ID);
+ return QList<Core::Id>();
}
-QString ConfigureStepFactory::displayNameForId(const QString &id) const
+QString ConfigureStepFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(CONFIGURE_STEP_ID))
+ if (id == Core::Id(CONFIGURE_STEP_ID))
return tr("Configure", "Display name for AutotoolsProjectManager::ConfigureStep id.");
return QString();
}
-bool ConfigureStepFactory::canCreate(BuildStepList *parent, const QString &id) const
+bool ConfigureStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
- if (parent->target()->project()->id() != QLatin1String(Constants::AUTOTOOLS_PROJECT_ID))
+ if (parent->target()->project()->id() != Core::Id(Constants::AUTOTOOLS_PROJECT_ID))
return false;
- if (parent->id() != QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
+ if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
return false;
- return QLatin1String(CONFIGURE_STEP_ID) == id;
+ return Core::Id(CONFIGURE_STEP_ID) == id;
}
-BuildStep *ConfigureStepFactory::create(BuildStepList *parent, const QString &id)
+BuildStep *ConfigureStepFactory::create(BuildStepList *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -111,8 +111,7 @@ BuildStep *ConfigureStepFactory::clone(BuildStepList *parent, BuildStep *source)
bool ConfigureStepFactory::canRestore(BuildStepList *parent, const QVariantMap &map) const
{
- QString id(idFromMap(map));
- return canCreate(parent, id);
+ return canCreate(parent, idFromMap(map));
}
BuildStep *ConfigureStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
@@ -130,13 +129,13 @@ BuildStep *ConfigureStepFactory::restore(BuildStepList *parent, const QVariantMa
// ConfigureStep class
////////////////////////
ConfigureStep::ConfigureStep(BuildStepList* bsl) :
- AbstractProcessStep(bsl, QLatin1String(CONFIGURE_STEP_ID)),
+ AbstractProcessStep(bsl, Core::Id(CONFIGURE_STEP_ID)),
m_runConfigure(false)
{
ctor();
}
-ConfigureStep::ConfigureStep(BuildStepList *bsl, const QString &id) :
+ConfigureStep::ConfigureStep(BuildStepList *bsl, const Core::Id id) :
AbstractProcessStep(bsl, id)
{
ctor();
diff --git a/src/plugins/autotoolsprojectmanager/configurestep.h b/src/plugins/autotoolsprojectmanager/configurestep.h
index c36f0f4a63..884384427b 100644
--- a/src/plugins/autotoolsprojectmanager/configurestep.h
+++ b/src/plugins/autotoolsprojectmanager/configurestep.h
@@ -63,11 +63,11 @@ class ConfigureStepFactory : public ProjectExplorer::IBuildStepFactory
public:
ConfigureStepFactory(QObject *parent = 0);
- QStringList availableCreationIds(ProjectExplorer::BuildStepList *bc) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *bc) const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source);
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
@@ -112,7 +112,7 @@ signals:
protected:
ConfigureStep(ProjectExplorer::BuildStepList *bsl, ConfigureStep *bs);
- ConfigureStep(ProjectExplorer::BuildStepList *bsl, const QString &id);
+ ConfigureStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
bool fromMap(const QVariantMap &map);
diff --git a/src/plugins/autotoolsprojectmanager/makestep.cpp b/src/plugins/autotoolsprojectmanager/makestep.cpp
index e44eee9fe1..d01a13a8ce 100644
--- a/src/plugins/autotoolsprojectmanager/makestep.cpp
+++ b/src/plugins/autotoolsprojectmanager/makestep.cpp
@@ -68,32 +68,32 @@ MakeStepFactory::MakeStepFactory(QObject *parent) :
{
}
-QStringList MakeStepFactory::availableCreationIds(BuildStepList *parent) const
+QList<Core::Id> MakeStepFactory::availableCreationIds(BuildStepList *parent) const
{
- if (parent->target()->project()->id() == QLatin1String(AUTOTOOLS_PROJECT_ID))
- return QStringList() << QLatin1String(MAKE_STEP_ID);
- return QStringList();
+ if (parent->target()->project()->id() == Core::Id(AUTOTOOLS_PROJECT_ID))
+ return QList<Core::Id>() << Core::Id(MAKE_STEP_ID);
+ return QList<Core::Id>();
}
-QString MakeStepFactory::displayNameForId(const QString &id) const
+QString MakeStepFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(MAKE_STEP_ID))
+ if (id == Core::Id(MAKE_STEP_ID))
return tr("Make", "Display name for AutotoolsProjectManager::MakeStep id.");
return QString();
}
-bool MakeStepFactory::canCreate(BuildStepList *parent, const QString &id) const
+bool MakeStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
- if (parent->target()->project()->id() != QLatin1String(AUTOTOOLS_PROJECT_ID))
+ if (parent->target()->project()->id() != Core::Id(AUTOTOOLS_PROJECT_ID))
return false;
- if (parent->id() != QLatin1String(BUILDSTEPS_BUILD))
+ if (parent->id() != Core::Id(BUILDSTEPS_BUILD))
return false;
- return QLatin1String(MAKE_STEP_ID) == id;
+ return Core::Id(MAKE_STEP_ID) == id;
}
-BuildStep *MakeStepFactory::create(BuildStepList *parent, const QString &id)
+BuildStep *MakeStepFactory::create(BuildStepList *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -114,8 +114,7 @@ BuildStep *MakeStepFactory::clone(BuildStepList *parent, BuildStep *source)
bool MakeStepFactory::canRestore(BuildStepList *parent, const QVariantMap &map) const
{
- QString id = idFromMap(map);
- return canCreate(parent, id);
+ return canCreate(parent, idFromMap(map));
}
BuildStep *MakeStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
@@ -133,13 +132,13 @@ BuildStep *MakeStepFactory::restore(BuildStepList *parent, const QVariantMap &ma
// MakeStep class
/////////////////////
MakeStep::MakeStep(BuildStepList* bsl) :
- AbstractProcessStep(bsl, QLatin1String(MAKE_STEP_ID)),
+ AbstractProcessStep(bsl, Core::Id(MAKE_STEP_ID)),
m_clean(false)
{
ctor();
}
-MakeStep::MakeStep(BuildStepList *bsl, const QString &id) :
+MakeStep::MakeStep(BuildStepList *bsl, const Core::Id id) :
AbstractProcessStep(bsl, id),
m_clean(false)
{
diff --git a/src/plugins/autotoolsprojectmanager/makestep.h b/src/plugins/autotoolsprojectmanager/makestep.h
index 15b682d2bf..9a1e180d18 100644
--- a/src/plugins/autotoolsprojectmanager/makestep.h
+++ b/src/plugins/autotoolsprojectmanager/makestep.h
@@ -63,11 +63,11 @@ class MakeStepFactory : public ProjectExplorer::IBuildStepFactory
public:
MakeStepFactory(QObject *parent = 0);
- QStringList availableCreationIds(ProjectExplorer::BuildStepList *bc) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *bc) const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source);
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
@@ -114,7 +114,7 @@ signals:
protected:
MakeStep(ProjectExplorer::BuildStepList *bsl, MakeStep *bs);
- MakeStep(ProjectExplorer::BuildStepList *bsl, const QString &id);
+ MakeStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
bool fromMap(const QVariantMap &map);
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
index 31682c06b8..38ba67a582 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp
@@ -54,7 +54,7 @@ const char BUILD_DIRECTORY_KEY[] = "CMakeProjectManager.CMakeBuildConfiguration.
} // namespace
CMakeBuildConfiguration::CMakeBuildConfiguration(CMakeTarget *parent) :
- BuildConfiguration(parent, QLatin1String(CMAKE_BC_ID))
+ BuildConfiguration(parent, Core::Id(CMAKE_BC_ID))
{
m_buildDirectory = cmakeTarget()->defaultBuildDirectory();
}
@@ -165,30 +165,30 @@ CMakeBuildConfigurationFactory::~CMakeBuildConfigurationFactory()
{
}
-QStringList CMakeBuildConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
+QList<Core::Id> CMakeBuildConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
{
if (!qobject_cast<CMakeTarget *>(parent))
- return QStringList();
- return QStringList() << QLatin1String(CMAKE_BC_ID);
+ return QList<Core::Id>();
+ return QList<Core::Id>() << Core::Id(CMAKE_BC_ID);
}
-QString CMakeBuildConfigurationFactory::displayNameForId(const QString &id) const
+QString CMakeBuildConfigurationFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(CMAKE_BC_ID))
+ if (id == Core::Id(CMAKE_BC_ID))
return tr("Build");
return QString();
}
-bool CMakeBuildConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const QString &id) const
+bool CMakeBuildConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const
{
if (!qobject_cast<CMakeTarget *>(parent))
return false;
- if (id == QLatin1String(CMAKE_BC_ID))
+ if (id == Core::Id(CMAKE_BC_ID))
return true;
return false;
}
-CMakeBuildConfiguration *CMakeBuildConfigurationFactory::create(ProjectExplorer::Target *parent, const QString &id)
+CMakeBuildConfiguration *CMakeBuildConfigurationFactory::create(ProjectExplorer::Target *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -257,8 +257,7 @@ CMakeBuildConfiguration *CMakeBuildConfigurationFactory::clone(ProjectExplorer::
bool CMakeBuildConfigurationFactory::canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const
{
- QString id(ProjectExplorer::idFromMap(map));
- return canCreate(parent, id);
+ return canCreate(parent, ProjectExplorer::idFromMap(map));
}
CMakeBuildConfiguration *CMakeBuildConfigurationFactory::restore(ProjectExplorer::Target *parent, const QVariantMap &map)
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h
index 4b3ec7b0e6..b0f7bb33dd 100644
--- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h
+++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.h
@@ -86,11 +86,11 @@ public:
CMakeBuildConfigurationFactory(QObject *parent = 0);
~CMakeBuildConfigurationFactory();
- QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- CMakeBuildConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
+ CMakeBuildConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) const;
CMakeBuildConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.cpp b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
index 4cde866125..d26df68239 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.cpp
@@ -477,9 +477,9 @@ QString CMakeProject::displayName() const
return m_projectName;
}
-QString CMakeProject::id() const
+Core::Id CMakeProject::id() const
{
- return QLatin1String(Constants::CMAKEPROJECT_ID);
+ return Core::Id(Constants::CMAKEPROJECT_ID);
}
Core::IDocument *CMakeProject::document() const
@@ -525,7 +525,7 @@ bool CMakeProject::fromMap(const QVariantMap &map)
if (!hasUserFile) {
CMakeTargetFactory *factory =
ExtensionSystem::PluginManager::instance()->getObject<CMakeTargetFactory>();
- CMakeTarget *t = factory->create(this, QLatin1String(DEFAULT_CMAKE_TARGET_ID));
+ CMakeTarget *t = factory->create(this, Core::Id(DEFAULT_CMAKE_TARGET_ID));
Q_ASSERT(t);
Q_ASSERT(t->activeBuildConfiguration());
diff --git a/src/plugins/cmakeprojectmanager/cmakeproject.h b/src/plugins/cmakeprojectmanager/cmakeproject.h
index 778bc7fc9e..52183e905b 100644
--- a/src/plugins/cmakeprojectmanager/cmakeproject.h
+++ b/src/plugins/cmakeprojectmanager/cmakeproject.h
@@ -83,7 +83,7 @@ public:
~CMakeProject();
QString displayName() const;
- QString id() const;
+ Core::Id id() const;
Core::IDocument *document() const;
CMakeManager *projectManager() const;
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
index 4e04743482..005ab695c3 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
@@ -70,22 +70,24 @@ const char ARGUMENTS_KEY[] = "CMakeProjectManager.CMakeRunConfiguration.Argument
const char USER_ENVIRONMENT_CHANGES_KEY[] = "CMakeProjectManager.CMakeRunConfiguration.UserEnvironmentChanges";
const char BASE_ENVIRONMENT_BASE_KEY[] = "CMakeProjectManager.BaseEnvironmentBase";
-QString buildTargetFromId(const QString &id)
+QString buildTargetFromId(Core::Id id)
{
- if (!id.startsWith(QLatin1String(CMAKE_RC_PREFIX)))
+ QString idstr = QString::fromUtf8(id.name());
+ if (!idstr.startsWith(QLatin1String(CMAKE_RC_PREFIX)))
return QString();
- return id.mid(QString::fromLatin1(CMAKE_RC_PREFIX).length());
+ return idstr.mid(QString::fromLatin1(CMAKE_RC_PREFIX).length());
}
-QString idFromBuildTarget(const QString &target)
+Core::Id idFromBuildTarget(const QString &target)
{
- return QString::fromLatin1(CMAKE_RC_PREFIX) + target;
+ QString id = QString::fromLatin1(CMAKE_RC_PREFIX) + target;
+ return Core::Id(id.toUtf8().constData());
}
} // namespace
CMakeRunConfiguration::CMakeRunConfiguration(CMakeTarget *parent, const QString &target, const QString &workingDirectory, const QString &title) :
- ProjectExplorer::LocalApplicationRunConfiguration(parent, QString::fromLatin1(CMAKE_RC_PREFIX)),
+ ProjectExplorer::LocalApplicationRunConfiguration(parent, Core::Id(CMAKE_RC_PREFIX)),
m_runMode(Gui),
m_buildTarget(target),
m_workingDirectory(workingDirectory),
@@ -502,24 +504,24 @@ CMakeRunConfigurationFactory::~CMakeRunConfigurationFactory()
}
// used to show the list of possible additons to a project, returns a list of ids
-QStringList CMakeRunConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
+QList<Core::Id> CMakeRunConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
{
CMakeTarget *t(qobject_cast<CMakeTarget *>(parent));
if (!t)
- return QStringList();
- QStringList allIds;
+ return QList<Core::Id>();
+ QList<Core::Id> allIds;
foreach (const QString &buildTarget, t->cmakeProject()->buildTargetTitles())
allIds << idFromBuildTarget(buildTarget);
return allIds;
}
// used to translate the ids to names to display to the user
-QString CMakeRunConfigurationFactory::displayNameForId(const QString &id) const
+QString CMakeRunConfigurationFactory::displayNameForId(const Core::Id id) const
{
return buildTargetFromId(id);
}
-bool CMakeRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const QString &id) const
+bool CMakeRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const
{
CMakeTarget *t(qobject_cast<CMakeTarget *>(parent));
if (!t)
@@ -527,7 +529,8 @@ bool CMakeRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, co
return t->cmakeProject()->hasBuildTarget(buildTargetFromId(id));
}
-ProjectExplorer::RunConfiguration *CMakeRunConfigurationFactory::create(ProjectExplorer::Target *parent, const QString &id)
+ProjectExplorer::RunConfiguration *CMakeRunConfigurationFactory::create(ProjectExplorer::Target *parent,
+ const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -542,7 +545,7 @@ bool CMakeRunConfigurationFactory::canClone(ProjectExplorer::Target *parent, Pro
{
if (!qobject_cast<CMakeTarget *>(parent))
return false;
- return source->id() == QLatin1String(CMAKE_RC_ID);
+ return source->id() == Core::Id(CMAKE_RC_ID);
}
ProjectExplorer::RunConfiguration *CMakeRunConfigurationFactory::clone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration * source)
@@ -558,7 +561,7 @@ bool CMakeRunConfigurationFactory::canRestore(ProjectExplorer::Target *parent, c
{
if (!qobject_cast<CMakeTarget *>(parent))
return false;
- QString id(ProjectExplorer::idFromMap(map));
+ QString id = QString::fromUtf8(ProjectExplorer::idFromMap(map).name());
return id.startsWith(QLatin1String(CMAKE_RC_ID));
}
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
index 02cb879e29..bf64aa3691 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
@@ -168,15 +168,15 @@ public:
explicit CMakeRunConfigurationFactory(QObject *parent = 0);
~CMakeRunConfigurationFactory();
- bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
+ ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
ProjectExplorer::RunConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *product) const;
ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *product);
- QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
+ QString displayNameForId(const Core::Id id) const;
};
}
diff --git a/src/plugins/cmakeprojectmanager/cmaketarget.cpp b/src/plugins/cmakeprojectmanager/cmaketarget.cpp
index 4b92f2360f..4672659582 100644
--- a/src/plugins/cmakeprojectmanager/cmaketarget.cpp
+++ b/src/plugins/cmakeprojectmanager/cmaketarget.cpp
@@ -49,8 +49,8 @@ using namespace CMakeProjectManager::Internal;
namespace {
-QString displayNameForId(const QString &id) {
- if (id == QLatin1String(DEFAULT_CMAKE_TARGET_ID))
+QString displayNameForId(const Core::Id id) {
+ if (id == Core::Id(DEFAULT_CMAKE_TARGET_ID))
return QApplication::translate("CMakeProjectManager::Internal::CMakeTarget", "Desktop", "CMake Default target display name");
return QString();
}
@@ -62,7 +62,7 @@ QString displayNameForId(const QString &id) {
// -------------------------------------------------------------------------
CMakeTarget::CMakeTarget(CMakeProject *parent) :
- ProjectExplorer::Target(parent, QLatin1String(DEFAULT_CMAKE_TARGET_ID)),
+ ProjectExplorer::Target(parent, Core::Id(DEFAULT_CMAKE_TARGET_ID)),
m_buildConfigurationFactory(new CMakeBuildConfigurationFactory(this))
{
setDefaultDisplayName(displayNameForId(id()));
@@ -84,9 +84,9 @@ ProjectExplorer::BuildConfigWidget *CMakeTarget::createConfigWidget()
return new CMakeBuildSettingsWidget(this);
}
-bool CMakeTargetFactory::supportsTargetId(const QString &id) const
+bool CMakeTargetFactory::supportsTargetId(const Core::Id id) const
{
- return id == DEFAULT_CMAKE_TARGET_ID;
+ return id == Core::Id(DEFAULT_CMAKE_TARGET_ID);
}
CMakeBuildConfiguration *CMakeTarget::activeBuildConfiguration() const
@@ -178,23 +178,23 @@ CMakeTargetFactory::~CMakeTargetFactory()
{
}
-QStringList CMakeTargetFactory::supportedTargetIds() const
+QList<Core::Id> CMakeTargetFactory::supportedTargetIds() const
{
- return QStringList() << QLatin1String(DEFAULT_CMAKE_TARGET_ID);
+ return QList<Core::Id>() << Core::Id(DEFAULT_CMAKE_TARGET_ID);
}
-QString CMakeTargetFactory::displayNameForId(const QString &id) const
+QString CMakeTargetFactory::displayNameForId(const Core::Id id) const
{
return ::displayNameForId(id);
}
-bool CMakeTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
+bool CMakeTargetFactory::canCreate(ProjectExplorer::Project *parent, const Core::Id id) const
{
if (!qobject_cast<CMakeProject *>(parent))
return false;
- return id == QLatin1String(DEFAULT_CMAKE_TARGET_ID);
+ return id == Core::Id(DEFAULT_CMAKE_TARGET_ID);
}
-CMakeTarget *CMakeTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
+CMakeTarget *CMakeTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
diff --git a/src/plugins/cmakeprojectmanager/cmaketarget.h b/src/plugins/cmakeprojectmanager/cmaketarget.h
index 51da026a68..d9e44487d9 100644
--- a/src/plugins/cmakeprojectmanager/cmaketarget.h
+++ b/src/plugins/cmakeprojectmanager/cmaketarget.h
@@ -83,13 +83,13 @@ public:
CMakeTargetFactory(QObject *parent = 0);
~CMakeTargetFactory();
- bool supportsTargetId(const QString &id) const;
+ bool supportsTargetId(const Core::Id id) const;
- QStringList supportedTargetIds() const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> supportedTargetIds() const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
- CMakeTarget *create(ProjectExplorer::Project *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Project *parent, const Core::Id id) const;
+ CMakeTarget *create(ProjectExplorer::Project *parent, const Core::Id id);
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
CMakeTarget *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
};
diff --git a/src/plugins/cmakeprojectmanager/makestep.cpp b/src/plugins/cmakeprojectmanager/makestep.cpp
index 524ba5548a..cec1683dfc 100644
--- a/src/plugins/cmakeprojectmanager/makestep.cpp
+++ b/src/plugins/cmakeprojectmanager/makestep.cpp
@@ -66,13 +66,13 @@ const char * const ADDITIONAL_ARGUMENTS_KEY("CMakeProjectManager.MakeStep.Additi
// TODO: Move progress information into an IOutputParser!
MakeStep::MakeStep(BuildStepList *bsl) :
- AbstractProcessStep(bsl, QLatin1String(MS_ID)), m_clean(false),
+ AbstractProcessStep(bsl, Core::Id(MS_ID)), m_clean(false),
m_futureInterface(0)
{
ctor();
}
-MakeStep::MakeStep(BuildStepList *bsl, const QString &id) :
+MakeStep::MakeStep(BuildStepList *bsl, const Core::Id id) :
AbstractProcessStep(bsl, id), m_clean(false),
m_futureInterface(0)
{
@@ -339,19 +339,19 @@ MakeStepFactory::~MakeStepFactory()
{
}
-bool MakeStepFactory::canCreate(BuildStepList *parent, const QString &id) const
+bool MakeStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
- if (parent->target()->project()->id() != QLatin1String(Constants::CMAKEPROJECT_ID))
+ if (parent->target()->project()->id() != Core::Id(Constants::CMAKEPROJECT_ID))
return false;
- return QLatin1String(MS_ID) == id;
+ return Core::Id(MS_ID) == id;
}
-BuildStep *MakeStepFactory::create(BuildStepList *parent, const QString &id)
+BuildStep *MakeStepFactory::create(BuildStepList *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
MakeStep *step = new MakeStep(parent);
- if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) {
+ if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)) {
step->setClean(true);
step->setAdditionalArguments("clean");
}
@@ -372,8 +372,7 @@ BuildStep *MakeStepFactory::clone(BuildStepList *parent, BuildStep *source)
bool MakeStepFactory::canRestore(BuildStepList *parent, const QVariantMap &map) const
{
- QString id(ProjectExplorer::idFromMap(map));
- return canCreate(parent, id);
+ return canCreate(parent, idFromMap(map));
}
BuildStep *MakeStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
@@ -387,16 +386,16 @@ BuildStep *MakeStepFactory::restore(BuildStepList *parent, const QVariantMap &ma
return 0;
}
-QStringList MakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
+QList<Core::Id> MakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
- if (parent->target()->project()->id() == QLatin1String(Constants::CMAKEPROJECT_ID))
- return QStringList() << QLatin1String(MS_ID);
- return QStringList();
+ if (parent->target()->project()->id() == Core::Id(Constants::CMAKEPROJECT_ID))
+ return QList<Core::Id>() << Core::Id(MS_ID);
+ return QList<Core::Id>();
}
-QString MakeStepFactory::displayNameForId(const QString &id) const
+QString MakeStepFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(MS_ID))
+ if (id == Core::Id(MS_ID))
return tr("Make", "Display name for CMakeProjectManager::MakeStep id.");
return QString();
}
diff --git a/src/plugins/cmakeprojectmanager/makestep.h b/src/plugins/cmakeprojectmanager/makestep.h
index 270a5b4c77..f585b868c9 100644
--- a/src/plugins/cmakeprojectmanager/makestep.h
+++ b/src/plugins/cmakeprojectmanager/makestep.h
@@ -83,7 +83,7 @@ public:
protected:
MakeStep(ProjectExplorer::BuildStepList *bsl, MakeStep *bs);
- MakeStep(ProjectExplorer::BuildStepList *bsl, const QString &id);
+ MakeStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
bool fromMap(const QVariantMap &map);
@@ -127,15 +127,15 @@ public:
explicit MakeStepFactory(QObject *parent = 0);
virtual ~MakeStepFactory();
- virtual bool canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const;
- virtual ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const QString &id);
- virtual bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const;
- virtual ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source);
- virtual bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
- virtual ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
+ bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const;
+ ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source);
+ bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
+ ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
- virtual QStringList availableCreationIds(ProjectExplorer::BuildStepList *bc) const;
- virtual QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *bc) const;
+ QString displayNameForId(const Core::Id id) const;
};
} // namespace Internal
diff --git a/src/plugins/coreplugin/id.h b/src/plugins/coreplugin/id.h
index 9fc53773d4..527ff693ed 100644
--- a/src/plugins/coreplugin/id.h
+++ b/src/plugins/coreplugin/id.h
@@ -53,6 +53,8 @@ public:
bool isValid() const { return m_id; }
bool operator==(const Id &id) const { return m_id == id.m_id; }
bool operator!=(const Id &id) const { return m_id != id.m_id; }
+ bool operator<(const Id &id) const { return m_id < id.m_id; }
+ bool operator>(const Id &id) const { return m_id > id.m_id; }
int uniqueIdentifier() const { return m_id; }
static Id fromUniqueIdentifier(int uid) { return Id(uid, uid); }
diff --git a/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp b/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
index 4988a9c621..8f37bfc877 100644
--- a/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
+++ b/src/plugins/genericprojectmanager/genericbuildconfiguration.cpp
@@ -54,11 +54,11 @@ const char * const BUILD_DIRECTORY_KEY("GenericProjectManager.GenericBuildConfig
}
GenericBuildConfiguration::GenericBuildConfiguration(GenericTarget *parent)
- : BuildConfiguration(parent, QLatin1String(GENERIC_BC_ID))
+ : BuildConfiguration(parent, Core::Id(GENERIC_BC_ID))
{
}
-GenericBuildConfiguration::GenericBuildConfiguration(GenericTarget *parent, const QString &id)
+GenericBuildConfiguration::GenericBuildConfiguration(GenericTarget *parent, const Core::Id id)
: BuildConfiguration(parent, id)
{
}
@@ -139,30 +139,30 @@ GenericBuildConfigurationFactory::~GenericBuildConfigurationFactory()
{
}
-QStringList GenericBuildConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
+QList<Core::Id> GenericBuildConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
{
if (!qobject_cast<GenericTarget *>(parent))
- return QStringList();
- return QStringList() << QLatin1String(GENERIC_BC_ID);
+ return QList<Core::Id>();
+ return QList<Core::Id>() << Core::Id(GENERIC_BC_ID);
}
-QString GenericBuildConfigurationFactory::displayNameForId(const QString &id) const
+QString GenericBuildConfigurationFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(GENERIC_BC_ID))
+ if (id == Core::Id(GENERIC_BC_ID))
return tr("Build");
return QString();
}
-bool GenericBuildConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const QString &id) const
+bool GenericBuildConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const
{
if (!qobject_cast<GenericTarget *>(parent))
return false;
- if (id == QLatin1String(GENERIC_BC_ID))
+ if (id == Core::Id(GENERIC_BC_ID))
return true;
return false;
}
-BuildConfiguration *GenericBuildConfigurationFactory::create(ProjectExplorer::Target *parent, const QString &id)
+BuildConfiguration *GenericBuildConfigurationFactory::create(ProjectExplorer::Target *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -215,8 +215,7 @@ BuildConfiguration *GenericBuildConfigurationFactory::clone(ProjectExplorer::Tar
bool GenericBuildConfigurationFactory::canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const
{
- QString id(ProjectExplorer::idFromMap(map));
- return canCreate(parent, id);
+ return canCreate(parent, ProjectExplorer::idFromMap(map));
}
BuildConfiguration *GenericBuildConfigurationFactory::restore(ProjectExplorer::Target *parent, const QVariantMap &map)
diff --git a/src/plugins/genericprojectmanager/genericbuildconfiguration.h b/src/plugins/genericprojectmanager/genericbuildconfiguration.h
index 48e567d755..6a2058861a 100644
--- a/src/plugins/genericprojectmanager/genericbuildconfiguration.h
+++ b/src/plugins/genericprojectmanager/genericbuildconfiguration.h
@@ -65,7 +65,7 @@ public:
protected:
GenericBuildConfiguration(GenericTarget *parent, GenericBuildConfiguration *source);
- GenericBuildConfiguration(GenericTarget *parent, const QString &id);
+ GenericBuildConfiguration(GenericTarget *parent, const Core::Id id);
virtual bool fromMap(const QVariantMap &map);
private:
@@ -78,13 +78,13 @@ class GenericBuildConfigurationFactory : public ProjectExplorer::IBuildConfigura
public:
explicit GenericBuildConfigurationFactory(QObject *parent = 0);
- virtual ~GenericBuildConfigurationFactory();
+ ~GenericBuildConfigurationFactory();
- QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- ProjectExplorer::BuildConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
+ ProjectExplorer::BuildConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) const;
ProjectExplorer::BuildConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
diff --git a/src/plugins/genericprojectmanager/genericmakestep.cpp b/src/plugins/genericprojectmanager/genericmakestep.cpp
index 57bb1d49b0..899ffcb359 100644
--- a/src/plugins/genericprojectmanager/genericmakestep.cpp
+++ b/src/plugins/genericprojectmanager/genericmakestep.cpp
@@ -69,13 +69,13 @@ const char * const CLEAN_KEY("GenericProjectManager.GenericMakeStep.Clean");
}
GenericMakeStep::GenericMakeStep(ProjectExplorer::BuildStepList *parent) :
- AbstractProcessStep(parent, QLatin1String(GENERIC_MS_ID)),
+ AbstractProcessStep(parent, Core::Id(GENERIC_MS_ID)),
m_clean(false)
{
ctor();
}
-GenericMakeStep::GenericMakeStep(ProjectExplorer::BuildStepList *parent, const QString &id) :
+GenericMakeStep::GenericMakeStep(ProjectExplorer::BuildStepList *parent, const Core::Id id) :
AbstractProcessStep(parent, id),
m_clean(false)
{
@@ -315,20 +315,20 @@ GenericMakeStepFactory::~GenericMakeStepFactory()
}
bool GenericMakeStepFactory::canCreate(ProjectExplorer::BuildStepList *parent,
- const QString &id) const
+ const Core::Id id) const
{
- if (parent->target()->project()->id() != QLatin1String(Constants::GENERICPROJECT_ID))
+ if (parent->target()->project()->id() != Core::Id(Constants::GENERICPROJECT_ID))
return false;
- return id == QLatin1String(GENERIC_MS_ID);
+ return id == Core::Id(GENERIC_MS_ID);
}
ProjectExplorer::BuildStep *GenericMakeStepFactory::create(ProjectExplorer::BuildStepList *parent,
- const QString &id)
+ const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
GenericMakeStep *step = new GenericMakeStep(parent);
- if (parent->id() == ProjectExplorer::Constants::BUILDSTEPS_CLEAN) {
+ if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)) {
step->setClean(true);
step->setBuildTarget("clean", /* on = */ true);
}
@@ -338,8 +338,7 @@ ProjectExplorer::BuildStep *GenericMakeStepFactory::create(ProjectExplorer::Buil
bool GenericMakeStepFactory::canClone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *source) const
{
- const QString id(source->id());
- return canCreate(parent, id);
+ return canCreate(parent, source->id());
}
ProjectExplorer::BuildStep *GenericMakeStepFactory::clone(ProjectExplorer::BuildStepList *parent,
@@ -355,8 +354,7 @@ ProjectExplorer::BuildStep *GenericMakeStepFactory::clone(ProjectExplorer::Build
bool GenericMakeStepFactory::canRestore(ProjectExplorer::BuildStepList *parent,
const QVariantMap &map) const
{
- QString id(ProjectExplorer::idFromMap(map));
- return canCreate(parent, id);
+ return canCreate(parent, ProjectExplorer::idFromMap(map));
}
ProjectExplorer::BuildStep *GenericMakeStepFactory::restore(ProjectExplorer::BuildStepList *parent,
@@ -371,16 +369,16 @@ ProjectExplorer::BuildStep *GenericMakeStepFactory::restore(ProjectExplorer::Bui
return 0;
}
-QStringList GenericMakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
+QList<Core::Id> GenericMakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
- if (parent->target()->project()->id() != QLatin1String(Constants::GENERICPROJECT_ID))
- return QStringList();
- return QStringList() << QLatin1String(GENERIC_MS_ID);
+ if (parent->target()->project()->id() != Core::Id(Constants::GENERICPROJECT_ID))
+ return QList<Core::Id>();
+ return QList<Core::Id>() << Core::Id(GENERIC_MS_ID);
}
-QString GenericMakeStepFactory::displayNameForId(const QString &id) const
+QString GenericMakeStepFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(GENERIC_MS_ID))
+ if (id == Core::Id(GENERIC_MS_ID))
return QCoreApplication::translate("GenericProjectManager::Internal::GenericMakeStep",
GENERIC_MS_DISPLAY_NAME);
return QString();
diff --git a/src/plugins/genericprojectmanager/genericmakestep.h b/src/plugins/genericprojectmanager/genericmakestep.h
index 46ee7944e3..2a7a4fa7aa 100644
--- a/src/plugins/genericprojectmanager/genericmakestep.h
+++ b/src/plugins/genericprojectmanager/genericmakestep.h
@@ -78,7 +78,7 @@ public:
protected:
GenericMakeStep(ProjectExplorer::BuildStepList *parent, GenericMakeStep *bs);
- GenericMakeStep(ProjectExplorer::BuildStepList *parent, const QString &id);
+ GenericMakeStep(ProjectExplorer::BuildStepList *parent, const Core::Id id);
virtual bool fromMap(const QVariantMap &map);
private:
@@ -115,23 +115,20 @@ class GenericMakeStepFactory : public ProjectExplorer::IBuildStepFactory
public:
explicit GenericMakeStepFactory(QObject *parent = 0);
- virtual ~GenericMakeStepFactory();
-
- virtual bool canCreate(ProjectExplorer::BuildStepList *parent,
- const QString &id) const;
- virtual ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent,
- const QString &id);
- virtual bool canClone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *source) const;
- virtual ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *source);
- virtual bool canRestore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map) const;
- virtual ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map);
-
- virtual QStringList availableCreationIds(ProjectExplorer::BuildStepList *bc) const;
- virtual QString displayNameForId(const QString &id) const;
+ ~GenericMakeStepFactory();
+
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
+ bool canClone(ProjectExplorer::BuildStepList *parent,
+ ProjectExplorer::BuildStep *source) const;
+ ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
+ ProjectExplorer::BuildStep *source);
+ bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
+ ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent,
+ const QVariantMap &map);
+
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *bc) const;
+ QString displayNameForId(const Core::Id id) const;
};
} // namespace Internal
diff --git a/src/plugins/genericprojectmanager/genericproject.cpp b/src/plugins/genericprojectmanager/genericproject.cpp
index a7ea37a461..06dfaa30c8 100644
--- a/src/plugins/genericprojectmanager/genericproject.cpp
+++ b/src/plugins/genericprojectmanager/genericproject.cpp
@@ -415,9 +415,9 @@ QString GenericProject::displayName() const
return m_projectName;
}
-QString GenericProject::id() const
+Core::Id GenericProject::id() const
{
- return QLatin1String(Constants::GENERICPROJECT_ID);
+ return Core::Id(Constants::GENERICPROJECT_ID);
}
Core::IDocument *GenericProject::document() const
@@ -484,7 +484,7 @@ bool GenericProject::fromMap(const QVariantMap &map)
if (targets().isEmpty()) {
GenericTargetFactory *factory =
ExtensionSystem::PluginManager::instance()->getObject<GenericTargetFactory>();
- addTarget(factory->create(this, QLatin1String(GENERIC_DESKTOP_TARGET_ID)));
+ addTarget(factory->create(this, Core::Id(GENERIC_DESKTOP_TARGET_ID)));
}
QString id = map.value(QLatin1String(TOOLCHAIN_KEY)).toString();
diff --git a/src/plugins/genericprojectmanager/genericproject.h b/src/plugins/genericprojectmanager/genericproject.h
index f35d7eb611..a36f2323c4 100644
--- a/src/plugins/genericprojectmanager/genericproject.h
+++ b/src/plugins/genericprojectmanager/genericproject.h
@@ -81,7 +81,7 @@ public:
QString configFileName() const;
QString displayName() const;
- QString id() const;
+ Core::Id id() const;
Core::IDocument *document() const;
ProjectExplorer::IProjectManager *projectManager() const;
GenericTarget *activeTarget() const;
diff --git a/src/plugins/genericprojectmanager/generictarget.cpp b/src/plugins/genericprojectmanager/generictarget.cpp
index f3572ca5ce..314d423d84 100644
--- a/src/plugins/genericprojectmanager/generictarget.cpp
+++ b/src/plugins/genericprojectmanager/generictarget.cpp
@@ -54,7 +54,7 @@ using namespace GenericProjectManager::Internal;
////////////////////////////////////////////////////////////////////////////////////
GenericTarget::GenericTarget(GenericProject *parent) :
- ProjectExplorer::Target(parent, QLatin1String(GENERIC_DESKTOP_TARGET_ID)),
+ ProjectExplorer::Target(parent, Core::Id(GENERIC_DESKTOP_TARGET_ID)),
m_buildConfigurationFactory(new GenericBuildConfigurationFactory(this))
{
setDefaultDisplayName(QApplication::translate("GenericProjectManager::GenericTarget",
@@ -96,33 +96,33 @@ GenericTargetFactory::GenericTargetFactory(QObject *parent) :
{
}
-bool GenericTargetFactory::supportsTargetId(const QString &id) const
+bool GenericTargetFactory::supportsTargetId(const Core::Id id) const
{
- return id == QLatin1String(GENERIC_DESKTOP_TARGET_ID);
+ return id == Core::Id(GENERIC_DESKTOP_TARGET_ID);
}
-QStringList GenericTargetFactory::supportedTargetIds() const
+QList<Core::Id> GenericTargetFactory::supportedTargetIds() const
{
- return QStringList() << QLatin1String(GENERIC_DESKTOP_TARGET_ID);
+ return QList<Core::Id>() << Core::Id(GENERIC_DESKTOP_TARGET_ID);
}
-QString GenericTargetFactory::displayNameForId(const QString &id) const
+QString GenericTargetFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(GENERIC_DESKTOP_TARGET_ID))
+ if (id == Core::Id(GENERIC_DESKTOP_TARGET_ID))
return QCoreApplication::translate("GenericProjectManager::GenericTarget",
GENERIC_DESKTOP_TARGET_DISPLAY_NAME,
"Generic desktop target display name");
return QString();
}
-bool GenericTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
+bool GenericTargetFactory::canCreate(ProjectExplorer::Project *parent, const Core::Id id) const
{
if (!qobject_cast<GenericProject *>(parent))
return false;
- return id == QLatin1String(GENERIC_DESKTOP_TARGET_ID);
+ return id == Core::Id(GENERIC_DESKTOP_TARGET_ID);
}
-GenericTarget *GenericTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
+GenericTarget *GenericTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
diff --git a/src/plugins/genericprojectmanager/generictarget.h b/src/plugins/genericprojectmanager/generictarget.h
index 7f4df5d3f3..48eef3e9f5 100644
--- a/src/plugins/genericprojectmanager/generictarget.h
+++ b/src/plugins/genericprojectmanager/generictarget.h
@@ -83,13 +83,13 @@ class GenericTargetFactory : public ProjectExplorer::ITargetFactory
public:
explicit GenericTargetFactory(QObject *parent = 0);
- bool supportsTargetId(const QString &id) const;
+ bool supportsTargetId(const Core::Id id) const;
- QStringList supportedTargetIds() const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> supportedTargetIds() const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
- GenericTarget *create(ProjectExplorer::Project *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Project *parent, const Core::Id id) const;
+ GenericTarget *create(ProjectExplorer::Project *parent, const Core::Id id);
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
GenericTarget *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
};
diff --git a/src/plugins/madde/maddeuploadandinstallpackagesteps.cpp b/src/plugins/madde/maddeuploadandinstallpackagesteps.cpp
index 2071dfb7af..d1b224d4a5 100644
--- a/src/plugins/madde/maddeuploadandinstallpackagesteps.cpp
+++ b/src/plugins/madde/maddeuploadandinstallpackagesteps.cpp
@@ -188,9 +188,9 @@ bool MaemoUploadAndInstallPackageStep::initInternal(QString *error)
return deployService()->isDeploymentPossible(error);
}
-QString MaemoUploadAndInstallPackageStep::stepId()
+Core::Id MaemoUploadAndInstallPackageStep::stepId()
{
- return QLatin1String("MaemoUploadAndInstallDpkgPackageStep");
+ return Core::Id("MaemoUploadAndInstallDpkgPackageStep");
}
QString MaemoUploadAndInstallPackageStep::displayName()
@@ -235,9 +235,9 @@ bool MeegoUploadAndInstallPackageStep::initInternal(QString *error)
return deployService()->isDeploymentPossible(error);
}
-QString MeegoUploadAndInstallPackageStep::stepId()
+Core::Id MeegoUploadAndInstallPackageStep::stepId()
{
- return QLatin1String("MaemoUploadAndInstallRpmPackageStep");
+ return Core::Id("MaemoUploadAndInstallRpmPackageStep");
}
QString MeegoUploadAndInstallPackageStep::displayName()
diff --git a/src/plugins/madde/maddeuploadandinstallpackagesteps.h b/src/plugins/madde/maddeuploadandinstallpackagesteps.h
index 2667daaba9..fafd47a838 100644
--- a/src/plugins/madde/maddeuploadandinstallpackagesteps.h
+++ b/src/plugins/madde/maddeuploadandinstallpackagesteps.h
@@ -51,7 +51,7 @@ public:
bool initInternal(QString *error = 0);
- static QString stepId();
+ static Core::Id stepId();
static QString displayName();
private:
@@ -72,7 +72,7 @@ public:
bool initInternal(QString *error);
- static QString stepId();
+ static Core::Id stepId();
static QString displayName();
private:
diff --git a/src/plugins/madde/maemoconstants.h b/src/plugins/madde/maemoconstants.h
index 111dabfb3b..ea27711b13 100644
--- a/src/plugins/madde/maemoconstants.h
+++ b/src/plugins/madde/maemoconstants.h
@@ -49,8 +49,8 @@ const char MeeGoOsType[] = "MeeGoOsType";
#define EXEC_SUFFIX ""
#endif
-static const QLatin1String MAEMO_RC_ID(PREFIX);
-static const QLatin1String MAEMO_RC_ID_PREFIX(PREFIX ".");
+static const char MAEMO_RC_ID[] = PREFIX;
+static const char MAEMO_RC_ID_PREFIX[] = PREFIX ".";
static const QLatin1String LastDeployedHostsKey(PREFIX ".LastDeployedHosts");
static const QLatin1String LastDeployedFilesKey(PREFIX ".LastDeployedFiles");
diff --git a/src/plugins/madde/maemodeploybymountsteps.cpp b/src/plugins/madde/maemodeploybymountsteps.cpp
index e30338e3b6..3407aae74a 100644
--- a/src/plugins/madde/maemodeploybymountsteps.cpp
+++ b/src/plugins/madde/maemodeploybymountsteps.cpp
@@ -433,9 +433,9 @@ bool MaemoInstallPackageViaMountStep::initInternal(QString *error)
return deployService()->isDeploymentPossible(error);
}
-QString MaemoInstallPackageViaMountStep::stepId()
+Core::Id MaemoInstallPackageViaMountStep::stepId()
{
- return QLatin1String("MaemoMountAndInstallDeployStep");
+ return Core::Id("MaemoMountAndInstallDeployStep");
}
QString MaemoInstallPackageViaMountStep::displayName()
@@ -479,9 +479,9 @@ bool MaemoCopyFilesViaMountStep::initInternal(QString *error)
return deployService()->isDeploymentPossible(error);
}
-QString MaemoCopyFilesViaMountStep::stepId()
+Core::Id MaemoCopyFilesViaMountStep::stepId()
{
- return QLatin1String("MaemoMountAndCopyDeployStep");
+ return Core::Id("MaemoMountAndCopyDeployStep");
}
QString MaemoCopyFilesViaMountStep::displayName()
diff --git a/src/plugins/madde/maemodeploybymountsteps.h b/src/plugins/madde/maemodeploybymountsteps.h
index 9176aa8277..aa0e1b2c67 100644
--- a/src/plugins/madde/maemodeploybymountsteps.h
+++ b/src/plugins/madde/maemodeploybymountsteps.h
@@ -49,7 +49,7 @@ public:
bool initInternal(QString *error = 0);
- static QString stepId();
+ static Core::Id stepId();
static QString displayName();
private:
@@ -72,7 +72,7 @@ public:
bool initInternal(QString *error = 0);
- static QString stepId();
+ static Core::Id stepId();
static QString displayName();
private:
diff --git a/src/plugins/madde/maemodeploystepfactory.cpp b/src/plugins/madde/maemodeploystepfactory.cpp
index d28925e639..35b8c0640b 100644
--- a/src/plugins/madde/maemodeploystepfactory.cpp
+++ b/src/plugins/madde/maemodeploystepfactory.cpp
@@ -61,9 +61,9 @@ MaemoDeployStepFactory::MaemoDeployStepFactory(QObject *parent)
{
}
-QStringList MaemoDeployStepFactory::availableCreationIds(BuildStepList *parent) const
+QList<Core::Id> MaemoDeployStepFactory::availableCreationIds(BuildStepList *parent) const
{
- QStringList ids;
+ QList<Core::Id> ids;
if (!qobject_cast<Qt4MaemoDeployConfiguration *>(parent->parent()))
return ids;
@@ -81,12 +81,13 @@ QStringList MaemoDeployStepFactory::availableCreationIds(BuildStepList *parent)
if (qobject_cast<Qt4HarmattanTarget *>(parent->target()))
ids << GenericDirectUploadStep::stepId();
if (qobject_cast<Qt4Maemo5Target *>(parent->target()))
- ids << MaemoInstallPackageViaMountStep::stepId() << MaemoCopyFilesViaMountStep::stepId();
+ ids << MaemoInstallPackageViaMountStep::stepId()
+ << MaemoCopyFilesViaMountStep::stepId();
return ids;
}
-QString MaemoDeployStepFactory::displayNameForId(const QString &id) const
+QString MaemoDeployStepFactory::displayNameForId(const Core::Id id) const
{
if (id == MaemoInstallPackageViaMountStep::stepId())
return MaemoInstallPackageViaMountStep::displayName();
@@ -109,12 +110,12 @@ QString MaemoDeployStepFactory::displayNameForId(const QString &id) const
return QString();
}
-bool MaemoDeployStepFactory::canCreate(BuildStepList *parent, const QString &id) const
+bool MaemoDeployStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
return availableCreationIds(parent).contains(id) && !parent->contains(id);
}
-BuildStep *MaemoDeployStepFactory::create(BuildStepList *parent, const QString &id)
+BuildStep *MaemoDeployStepFactory::create(BuildStepList *parent, const Core::Id id)
{
const Target * const t = parent->target();
@@ -127,15 +128,15 @@ BuildStep *MaemoDeployStepFactory::create(BuildStepList *parent, const QString &
} else if (id == MaemoMakeInstallToSysrootStep::Id) {
return new MaemoMakeInstallToSysrootStep(parent);
} else if (id == MaemoInstallPackageViaMountStep::stepId()
- || (id == OldMaemoDeployStepId && qobject_cast< const Qt4Maemo5Target *>(t))) {
+ || (id == Core::Id(OldMaemoDeployStepId) && qobject_cast< const Qt4Maemo5Target *>(t))) {
return new MaemoInstallPackageViaMountStep(parent);
} else if (id == MaemoCopyFilesViaMountStep::stepId()) {
return new MaemoCopyFilesViaMountStep(parent);
} else if (id == MaemoUploadAndInstallPackageStep::stepId()
- || (id == OldMaemoDeployStepId && (qobject_cast<const Qt4HarmattanTarget *>(t)))) {
+ || (id == Core::Id(OldMaemoDeployStepId) && (qobject_cast<const Qt4HarmattanTarget *>(t)))) {
return new MaemoUploadAndInstallPackageStep(parent);
} else if (id == MeegoUploadAndInstallPackageStep::stepId()
- || (id == OldMaemoDeployStepId && (qobject_cast<const Qt4MeegoTarget *>(t)))) {
+ || (id == Core::Id(OldMaemoDeployStepId) && (qobject_cast<const Qt4MeegoTarget *>(t)))) {
return new MeegoUploadAndInstallPackageStep(parent);
} else if (id == GenericDirectUploadStep::stepId()) {
return new GenericDirectUploadStep(parent, id);
@@ -147,7 +148,7 @@ BuildStep *MaemoDeployStepFactory::create(BuildStepList *parent, const QString &
bool MaemoDeployStepFactory::canRestore(BuildStepList *parent, const QVariantMap &map) const
{
return canCreate(parent, idFromMap(map))
- || idFromMap(map) == OldMaemoDeployStepId;
+ || idFromMap(map) == Core::Id(OldMaemoDeployStepId);
}
BuildStep *MaemoDeployStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
diff --git a/src/plugins/madde/maemodeploystepfactory.h b/src/plugins/madde/maemodeploystepfactory.h
index 2f42487c89..65ae0957df 100644
--- a/src/plugins/madde/maemodeploystepfactory.h
+++ b/src/plugins/madde/maemodeploystepfactory.h
@@ -43,24 +43,23 @@ class MaemoDeployStepFactory : public ProjectExplorer::IBuildStepFactory
public:
MaemoDeployStepFactory(QObject *parent = 0);
- virtual QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- virtual QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
+ QString displayNameForId(const Core::Id id) const;
- virtual bool canCreate(ProjectExplorer::BuildStepList *parent,
- const QString &id) const;
- virtual ProjectExplorer::BuildStep *
- create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *
+ create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
- virtual bool canRestore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map) const;
- virtual ProjectExplorer::BuildStep *
- restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
+ bool canRestore(ProjectExplorer::BuildStepList *parent,
+ const QVariantMap &map) const;
+ ProjectExplorer::BuildStep *
+ restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
- virtual bool canClone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product) const;
- virtual ProjectExplorer::BuildStep *
- clone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product);
+ bool canClone(ProjectExplorer::BuildStepList *parent,
+ ProjectExplorer::BuildStep *product) const;
+ ProjectExplorer::BuildStep *
+ clone(ProjectExplorer::BuildStepList *parent,
+ ProjectExplorer::BuildStep *product);
};
} // namespace Internal
diff --git a/src/plugins/madde/maemoglobal.cpp b/src/plugins/madde/maemoglobal.cpp
index 7ff3b4851f..6278e981e2 100644
--- a/src/plugins/madde/maemoglobal.cpp
+++ b/src/plugins/madde/maemoglobal.cpp
@@ -57,25 +57,25 @@ namespace {
static const QLatin1String binQmake("/bin/qmake" EXEC_SUFFIX);
}
-bool MaemoGlobal::isMaemoTargetId(const QString &id)
+bool MaemoGlobal::isMaemoTargetId(const Core::Id id)
{
return isFremantleTargetId(id) || isHarmattanTargetId(id)
|| isMeegoTargetId(id);
}
-bool MaemoGlobal::isFremantleTargetId(const QString &id)
+bool MaemoGlobal::isFremantleTargetId(const Core::Id id)
{
- return id == QLatin1String(MAEMO5_DEVICE_TARGET_ID);
+ return id == Core::Id(MAEMO5_DEVICE_TARGET_ID);
}
-bool MaemoGlobal::isHarmattanTargetId(const QString &id)
+bool MaemoGlobal::isHarmattanTargetId(const Core::Id id)
{
- return id == QLatin1String(HARMATTAN_DEVICE_TARGET_ID);
+ return id == Core::Id(HARMATTAN_DEVICE_TARGET_ID);
}
-bool MaemoGlobal::isMeegoTargetId(const QString &id)
+bool MaemoGlobal::isMeegoTargetId(const Core::Id id)
{
- return id == QLatin1String(MEEGO_DEVICE_TARGET_ID);
+ return id == Core::Id(MEEGO_DEVICE_TARGET_ID);
}
bool MaemoGlobal::isValidMaemo5QtVersion(const QString &qmakePath)
diff --git a/src/plugins/madde/maemoglobal.h b/src/plugins/madde/maemoglobal.h
index 9dfc1b2742..09ad361381 100644
--- a/src/plugins/madde/maemoglobal.h
+++ b/src/plugins/madde/maemoglobal.h
@@ -33,6 +33,7 @@
#ifndef MAEMOGLOBAL_H
#define MAEMOGLOBAL_H
+#include <coreplugin/id.h>
#include <coreplugin/idocument.h>
#include <utils/portlist.h>
#include <utils/environment.h>
@@ -83,10 +84,10 @@ class MaemoGlobal
public:
enum PackagingSystem { Dpkg, Rpm, Tar };
- static bool isMaemoTargetId(const QString &id);
- static bool isFremantleTargetId(const QString &id);
- static bool isHarmattanTargetId(const QString &id);
- static bool isMeegoTargetId(const QString &id);
+ static bool isMaemoTargetId(const Core::Id id);
+ static bool isFremantleTargetId(const Core::Id id);
+ static bool isHarmattanTargetId(const Core::Id id);
+ static bool isMeegoTargetId(const Core::Id id);
static bool isValidMaemo5QtVersion(const QString &qmakePath);
static bool isValidHarmattanQtVersion(const QString &qmakePath);
static bool isValidMeegoQtVersion(const QString &qmakePath);
diff --git a/src/plugins/madde/maemoinstalltosysrootstep.cpp b/src/plugins/madde/maemoinstalltosysrootstep.cpp
index 60096b4ee6..381e057196 100644
--- a/src/plugins/madde/maemoinstalltosysrootstep.cpp
+++ b/src/plugins/madde/maemoinstalltosysrootstep.cpp
@@ -142,7 +142,7 @@ private:
AbstractMaemoInstallPackageToSysrootStep::AbstractMaemoInstallPackageToSysrootStep(BuildStepList *bsl,
- const QString &id)
+ Core::Id id)
: BuildStep(bsl, id)
{
}
@@ -259,8 +259,8 @@ QStringList MaemoInstallDebianPackageToSysrootStep::madArguments() const
return args;
}
-const QString MaemoInstallDebianPackageToSysrootStep::Id
- = QLatin1String("MaemoInstallDebianPackageToSysrootStep");
+const Core::Id MaemoInstallDebianPackageToSysrootStep::Id
+ = Core::Id("MaemoInstallDebianPackageToSysrootStep");
QString MaemoInstallDebianPackageToSysrootStep::displayName()
{
@@ -290,8 +290,8 @@ QStringList MaemoInstallRpmPackageToSysrootStep::madArguments() const
return QStringList() << QLatin1String("xrpm") << QLatin1String("-i");
}
-const QString MaemoInstallRpmPackageToSysrootStep::Id
- = QLatin1String("MaemoInstallRpmPackageToSysrootStep");
+const Core::Id MaemoInstallRpmPackageToSysrootStep::Id
+ = Core::Id("MaemoInstallRpmPackageToSysrootStep");
QString MaemoInstallRpmPackageToSysrootStep::displayName()
{
@@ -369,8 +369,8 @@ BuildStepConfigWidget *MaemoCopyToSysrootStep::createConfigWidget()
return new MaemoCopyFilesToSysrootWidget(this);
}
-const QString MaemoCopyToSysrootStep::Id
- = QLatin1String("MaemoCopyToSysrootStep");
+const Core::Id MaemoCopyToSysrootStep::Id
+ = Core::Id("MaemoCopyToSysrootStep");
QString MaemoCopyToSysrootStep::displayName()
{
return tr("Copy files to sysroot");
@@ -424,8 +424,8 @@ BuildStepConfigWidget *MaemoMakeInstallToSysrootStep::createConfigWidget()
return new MaemoCopyFilesToSysrootWidget(this);
}
-const QString MaemoMakeInstallToSysrootStep::Id
- = QLatin1String("MaemoMakeInstallToSysrootStep");
+const Core::Id MaemoMakeInstallToSysrootStep::Id
+ = Core::Id("MaemoMakeInstallToSysrootStep");
QString MaemoMakeInstallToSysrootStep::displayName()
{
return tr("Copy files to sysroot");
diff --git a/src/plugins/madde/maemoinstalltosysrootstep.h b/src/plugins/madde/maemoinstalltosysrootstep.h
index 57558bc193..344cf338cf 100644
--- a/src/plugins/madde/maemoinstalltosysrootstep.h
+++ b/src/plugins/madde/maemoinstalltosysrootstep.h
@@ -59,7 +59,7 @@ public:
protected:
AbstractMaemoInstallPackageToSysrootStep(ProjectExplorer::BuildStepList *bsl,
- const QString &id);
+ Core::Id id);
AbstractMaemoInstallPackageToSysrootStep(ProjectExplorer::BuildStepList *bsl,
AbstractMaemoInstallPackageToSysrootStep *other);
@@ -85,7 +85,7 @@ public:
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
- static const QString Id;
+ static const Core::Id Id;
static QString displayName();
private:
virtual QStringList madArguments() const;
@@ -101,7 +101,7 @@ public:
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
- static const QString Id;
+ static const Core::Id Id;
static QString displayName();
private:
virtual QStringList madArguments() const;
@@ -119,7 +119,7 @@ public:
virtual void run(QFutureInterface<bool> &fi);
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
- static const QString Id;
+ static const Core::Id Id;
static QString displayName();
private:
QString m_systemRoot;
@@ -138,7 +138,7 @@ public:
virtual bool init();
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
- static const QString Id;
+ static const Core::Id Id;
static QString displayName();
};
diff --git a/src/plugins/madde/maemopackagecreationfactory.cpp b/src/plugins/madde/maemopackagecreationfactory.cpp
index dbb4230176..59e8274b44 100644
--- a/src/plugins/madde/maemopackagecreationfactory.cpp
+++ b/src/plugins/madde/maemopackagecreationfactory.cpp
@@ -49,7 +49,7 @@ using ProjectExplorer::BuildStep;
namespace Madde {
namespace Internal {
namespace {
-const QString OldCreatePackageId("Qt4ProjectManager.MaemoPackageCreationStep");
+const char OldCreatePackageId[] = "Qt4ProjectManager.MaemoPackageCreationStep";
} // anonymous namespace
MaemoPackageCreationFactory::MaemoPackageCreationFactory(QObject *parent)
@@ -57,9 +57,9 @@ MaemoPackageCreationFactory::MaemoPackageCreationFactory(QObject *parent)
{
}
-QStringList MaemoPackageCreationFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
+QList<Core::Id> MaemoPackageCreationFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
- QStringList ids;
+ QList<Core::Id> ids;
if (!qobject_cast<Qt4MaemoDeployConfiguration *>(parent->parent()))
return ids;
if (qobject_cast<AbstractDebBasedQt4MaemoTarget *>(parent->target())
@@ -72,7 +72,7 @@ QStringList MaemoPackageCreationFactory::availableCreationIds(ProjectExplorer::B
return ids;
}
-QString MaemoPackageCreationFactory::displayNameForId(const QString &id) const
+QString MaemoPackageCreationFactory::displayNameForId(const Core::Id id) const
{
if (id == MaemoDebianPackageCreationStep::CreatePackageId) {
return QCoreApplication::translate("RemoteLinux::Internal::MaemoPackageCreationFactory",
@@ -84,12 +84,12 @@ QString MaemoPackageCreationFactory::displayNameForId(const QString &id) const
return QString();
}
-bool MaemoPackageCreationFactory::canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const
+bool MaemoPackageCreationFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
{
return availableCreationIds(parent).contains(id);
}
-BuildStep *MaemoPackageCreationFactory::create(ProjectExplorer::BuildStepList *parent, const QString &id)
+BuildStep *MaemoPackageCreationFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id)
{
Q_ASSERT(canCreate(parent, id));
if (id == MaemoDebianPackageCreationStep::CreatePackageId)
@@ -102,8 +102,8 @@ BuildStep *MaemoPackageCreationFactory::create(ProjectExplorer::BuildStepList *p
bool MaemoPackageCreationFactory::canRestore(ProjectExplorer::BuildStepList *parent,
const QVariantMap &map) const
{
- const QString id = ProjectExplorer::idFromMap(map);
- return canCreate(parent, id) || id == OldCreatePackageId;
+ const Core::Id id = ProjectExplorer::idFromMap(map);
+ return canCreate(parent, id) || id == Core::Id(OldCreatePackageId);
}
BuildStep *MaemoPackageCreationFactory::restore(ProjectExplorer::BuildStepList *parent,
@@ -111,13 +111,13 @@ BuildStep *MaemoPackageCreationFactory::restore(ProjectExplorer::BuildStepList *
{
Q_ASSERT(canRestore(parent, map));
BuildStep * step = 0;
- const QString id = ProjectExplorer::idFromMap(map);
+ const Core::Id id = ProjectExplorer::idFromMap(map);
if (id == MaemoDebianPackageCreationStep::CreatePackageId
- || (id == OldCreatePackageId
+ || (id == Core::Id(OldCreatePackageId)
&& qobject_cast<AbstractDebBasedQt4MaemoTarget *>(parent->target()))) {
step = new MaemoDebianPackageCreationStep(parent);
} else if (id == MaemoRpmPackageCreationStep::CreatePackageId
- || (id == OldCreatePackageId
+ || (id == Core::Id(OldCreatePackageId)
&& qobject_cast<AbstractRpmBasedQt4MaemoTarget *>(parent->target()))) {
step = new MaemoRpmPackageCreationStep(parent);
}
diff --git a/src/plugins/madde/maemopackagecreationfactory.h b/src/plugins/madde/maemopackagecreationfactory.h
index 41df909b0c..02047f2b61 100644
--- a/src/plugins/madde/maemopackagecreationfactory.h
+++ b/src/plugins/madde/maemopackagecreationfactory.h
@@ -42,24 +42,23 @@ class MaemoPackageCreationFactory : public ProjectExplorer::IBuildStepFactory
public:
MaemoPackageCreationFactory(QObject *parent = 0);
- virtual QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- virtual QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
+ QString displayNameForId(const Core::Id id) const;
- virtual bool canCreate(ProjectExplorer::BuildStepList *parent,
- const QString &id) const;
- virtual ProjectExplorer::BuildStep *
- create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *
+ create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
- virtual bool canRestore(ProjectExplorer::BuildStepList *parent,
- const QVariantMap &map) const;
- virtual ProjectExplorer::BuildStep *
- restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
+ bool canRestore(ProjectExplorer::BuildStepList *parent,
+ const QVariantMap &map) const;
+ ProjectExplorer::BuildStep *
+ restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
- virtual bool canClone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product) const;
- virtual ProjectExplorer::BuildStep *
- clone(ProjectExplorer::BuildStepList *parent,
- ProjectExplorer::BuildStep *product);
+ bool canClone(ProjectExplorer::BuildStepList *parent,
+ ProjectExplorer::BuildStep *product) const;
+ ProjectExplorer::BuildStep *
+ clone(ProjectExplorer::BuildStepList *parent,
+ ProjectExplorer::BuildStep *product);
};
} // namespace Internal
diff --git a/src/plugins/madde/maemopackagecreationstep.cpp b/src/plugins/madde/maemopackagecreationstep.cpp
index f1d27b0e97..082a2c0191 100644
--- a/src/plugins/madde/maemopackagecreationstep.cpp
+++ b/src/plugins/madde/maemopackagecreationstep.cpp
@@ -64,7 +64,7 @@ namespace Internal {
const QLatin1String AbstractMaemoPackageCreationStep::DefaultVersionNumber("0.0.1");
AbstractMaemoPackageCreationStep::AbstractMaemoPackageCreationStep(BuildStepList *bsl,
- const QString &id) : AbstractPackagingStep(bsl, id)
+ const Core::Id id) : AbstractPackagingStep(bsl, id)
{
}
@@ -273,8 +273,8 @@ MaemoDebianPackageCreationStep::MaemoDebianPackageCreationStep(BuildStepList *bs
ctor();
}
-const QString MaemoDebianPackageCreationStep::CreatePackageId
- = QLatin1String("MaemoDebianPackageCreationStep");
+const Core::Id MaemoDebianPackageCreationStep::CreatePackageId
+ = Core::Id("MaemoDebianPackageCreationStep");
MaemoDebianPackageCreationStep::MaemoDebianPackageCreationStep(BuildStepList *buildConfig,
MaemoDebianPackageCreationStep *other)
@@ -555,8 +555,8 @@ QString MaemoRpmPackageCreationStep::rpmBuildDir() const
return cachedPackageDirectory() + QLatin1String("/rrpmbuild");
}
-const QString MaemoRpmPackageCreationStep::CreatePackageId
- = QLatin1String("MaemoRpmPackageCreationStep");
+const Core::Id MaemoRpmPackageCreationStep::CreatePackageId
+ = Core::Id("MaemoRpmPackageCreationStep");
} // namespace Internal
} // namespace Madde
diff --git a/src/plugins/madde/maemopackagecreationstep.h b/src/plugins/madde/maemopackagecreationstep.h
index b0b72515f7..bf8e9eaf5e 100644
--- a/src/plugins/madde/maemopackagecreationstep.h
+++ b/src/plugins/madde/maemopackagecreationstep.h
@@ -75,8 +75,7 @@ public:
protected:
- AbstractMaemoPackageCreationStep(ProjectExplorer::BuildStepList *bsl,
- const QString &id);
+ AbstractMaemoPackageCreationStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
AbstractMaemoPackageCreationStep(ProjectExplorer::BuildStepList *buildConfig,
AbstractMaemoPackageCreationStep *other);
@@ -136,7 +135,7 @@ private:
QString m_templatesDirPath;
bool m_debugBuild;
- static const QString CreatePackageId;
+ static const Core::Id CreatePackageId;
};
class MaemoRpmPackageCreationStep : public AbstractMaemoPackageCreationStep
@@ -160,7 +159,7 @@ private:
QString m_specFile;
QString m_packageFileName;
- static const QString CreatePackageId;
+ static const Core::Id CreatePackageId;
};
} // namespace Internal
diff --git a/src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp b/src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp
index 396d1246e3..4d6fa1e138 100644
--- a/src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp
+++ b/src/plugins/madde/maemopublishingbuildsettingspagefremantlefree.cpp
@@ -75,7 +75,7 @@ MaemoPublishingBuildSettingsPageFremantleFree::~MaemoPublishingBuildSettingsPage
void MaemoPublishingBuildSettingsPageFremantleFree::collectBuildConfigurations(const Project *project)
{
foreach (const Target *const target, project->targets()) {
- if (target->id() != QLatin1String(Constants::MAEMO5_DEVICE_TARGET_ID))
+ if (target->id() != Core::Id(Constants::MAEMO5_DEVICE_TARGET_ID))
continue;
foreach (BuildConfiguration * const bc, target->buildConfigurations()) {
Qt4BuildConfiguration * const qt4Bc
diff --git a/src/plugins/madde/maemopublishingwizardfactories.cpp b/src/plugins/madde/maemopublishingwizardfactories.cpp
index 6524527856..ef51f71371 100644
--- a/src/plugins/madde/maemopublishingwizardfactories.cpp
+++ b/src/plugins/madde/maemopublishingwizardfactories.cpp
@@ -73,7 +73,7 @@ bool MaemoPublishingWizardFactoryFremantleFree::canCreateWizard(const Project *p
if (!qobject_cast<const Qt4Project *>(project))
return false;
foreach (const Target *const target, project->targets()) {
- if (target->id() != QLatin1String(Constants::MAEMO5_DEVICE_TARGET_ID))
+ if (target->id() != Core::Id(Constants::MAEMO5_DEVICE_TARGET_ID))
continue;
foreach (const BuildConfiguration *const bc, target->buildConfigurations()) {
const Qt4BuildConfiguration *const qt4Bc
diff --git a/src/plugins/madde/maemoqtversion.cpp b/src/plugins/madde/maemoqtversion.cpp
index 1ca3e9f8bc..8779e292be 100644
--- a/src/plugins/madde/maemoqtversion.cpp
+++ b/src/plugins/madde/maemoqtversion.cpp
@@ -141,22 +141,22 @@ QList<ProjectExplorer::Abi> MaemoQtVersion::detectQtAbis() const
return result;
}
-bool MaemoQtVersion::supportsTargetId(const QString &id) const
+bool MaemoQtVersion::supportsTargetId(Core::Id id) const
{
return supportedTargetIds().contains(id);
}
-QSet<QString> MaemoQtVersion::supportedTargetIds() const
+QSet<Core::Id> MaemoQtVersion::supportedTargetIds() const
{
- QSet<QString> result;
+ QSet<Core::Id> result;
if (!isValid())
return result;
if (m_deviceType == QLatin1String(Maemo5OsType)) {
- result.insert(QLatin1String(Constants::MAEMO5_DEVICE_TARGET_ID));
+ result.insert(Core::Id(Constants::MAEMO5_DEVICE_TARGET_ID));
} else if (m_deviceType == QLatin1String(HarmattanOsType)) {
- result.insert(QLatin1String(Constants::HARMATTAN_DEVICE_TARGET_ID));
+ result.insert(Core::Id(Constants::HARMATTAN_DEVICE_TARGET_ID));
} else if (m_deviceType == QLatin1String(MeeGoOsType)) {
- result.insert(QLatin1String(Constants::MEEGO_DEVICE_TARGET_ID));
+ result.insert(Core::Id(Constants::MEEGO_DEVICE_TARGET_ID));
}
return result;
}
diff --git a/src/plugins/madde/maemoqtversion.h b/src/plugins/madde/maemoqtversion.h
index ec65f43fcc..5d92a4279c 100644
--- a/src/plugins/madde/maemoqtversion.h
+++ b/src/plugins/madde/maemoqtversion.h
@@ -53,8 +53,8 @@ public:
QList<ProjectExplorer::Abi> detectQtAbis() const;
void addToEnvironment(Utils::Environment &env) const;
- bool supportsTargetId(const QString &id) const;
- QSet<QString> supportedTargetIds() const;
+ bool supportsTargetId(Core::Id id) const;
+ QSet<Core::Id> supportedTargetIds() const;
QString description() const;
diff --git a/src/plugins/madde/maemorunconfiguration.cpp b/src/plugins/madde/maemorunconfiguration.cpp
index 04d3e15853..152ccc2ea4 100644
--- a/src/plugins/madde/maemorunconfiguration.cpp
+++ b/src/plugins/madde/maemorunconfiguration.cpp
@@ -192,7 +192,7 @@ const AbstractQt4MaemoTarget *MaemoRunConfiguration::maemoTarget() const
return maemoTarget;
}
-const QString MaemoRunConfiguration::Id = QLatin1String(MAEMO_RC_ID);
+const Core::Id MaemoRunConfiguration::Id = Core::Id(MAEMO_RC_ID);
} // namespace Internal
} // namespace Madde
diff --git a/src/plugins/madde/maemorunconfiguration.h b/src/plugins/madde/maemorunconfiguration.h
index ecd93e9be6..49da9f8a4e 100644
--- a/src/plugins/madde/maemorunconfiguration.h
+++ b/src/plugins/madde/maemorunconfiguration.h
@@ -59,7 +59,7 @@ public:
QString localDirToMountForRemoteGdb() const;
QString remoteProjectSourcesMountPoint() const;
- static const QString Id;
+ static const Core::Id Id;
signals:
void remoteMountsChanged();
diff --git a/src/plugins/madde/maemorunfactories.cpp b/src/plugins/madde/maemorunfactories.cpp
index 90782764ad..db8788db78 100644
--- a/src/plugins/madde/maemorunfactories.cpp
+++ b/src/plugins/madde/maemorunfactories.cpp
@@ -55,11 +55,13 @@ namespace Internal {
namespace {
-QString pathFromId(const QString &id)
+QString pathFromId(Core::Id id)
{
- if (!id.startsWith(MAEMO_RC_ID_PREFIX))
+ QString idStr = QString::fromUtf8(id.name());
+ const QString prefix = QLatin1String(MAEMO_RC_ID_PREFIX);
+ if (!idStr.startsWith(prefix))
return QString();
- return id.mid(QString(MAEMO_RC_ID_PREFIX).size());
+ return idStr.mid(prefix.size());
}
} // namespace
@@ -73,8 +75,7 @@ MaemoRunConfigurationFactory::~MaemoRunConfigurationFactory()
{
}
-bool MaemoRunConfigurationFactory::canCreate(Target *parent,
- const QString &id) const
+bool MaemoRunConfigurationFactory::canCreate(Target *parent, Core::Id id) const
{
return qobject_cast<Qt4BaseTarget *>(parent)->qt4Project()
->hasApplicationProFile(pathFromId(id));
@@ -85,7 +86,7 @@ bool MaemoRunConfigurationFactory::canRestore(Target *parent,
{
Q_UNUSED(parent);
return qobject_cast<AbstractQt4MaemoTarget *>(parent)
- && ProjectExplorer::idFromMap(map).startsWith(QLatin1String(MAEMO_RC_ID));
+ && QString::fromUtf8(ProjectExplorer::idFromMap(map).name()).startsWith(QLatin1String(MAEMO_RC_ID));
}
bool MaemoRunConfigurationFactory::canClone(Target *parent,
@@ -93,24 +94,28 @@ bool MaemoRunConfigurationFactory::canClone(Target *parent,
{
const RemoteLinuxRunConfiguration * const rlrc
= qobject_cast<RemoteLinuxRunConfiguration *>(source);
- return rlrc && canCreate(parent, source->id() + QLatin1Char('.') + rlrc->proFilePath());
+ QString idStr = QString::fromLatin1(source->id().name()) + QLatin1Char('.') + rlrc->proFilePath();
+ return rlrc && canCreate(parent, Core::Id(idStr.toUtf8().constData()));
}
-QStringList MaemoRunConfigurationFactory::availableCreationIds(Target *parent) const
+QList<Core::Id> MaemoRunConfigurationFactory::availableCreationIds(Target *parent) const
{
- if (AbstractQt4MaemoTarget *t = qobject_cast<AbstractQt4MaemoTarget *>(parent))
- return t->qt4Project()->applicationProFilePathes(QLatin1String(MAEMO_RC_ID_PREFIX));
- return QStringList();
+ QList<Core::Id> result;
+ if (AbstractQt4MaemoTarget *t = qobject_cast<AbstractQt4MaemoTarget *>(parent)) {
+ QStringList proFiles = t->qt4Project()->applicationProFilePathes(QLatin1String(MAEMO_RC_ID_PREFIX));
+ foreach (const QString &pf, proFiles)
+ result << Core::Id(pf.toUtf8().constData());
+ }
+ return result;
}
-QString MaemoRunConfigurationFactory::displayNameForId(const QString &id) const
+QString MaemoRunConfigurationFactory::displayNameForId(Core::Id id) const
{
return QFileInfo(pathFromId(id)).completeBaseName()
+ QLatin1String(" (on remote Maemo device)");
}
-RunConfiguration *MaemoRunConfigurationFactory::create(Target *parent,
- const QString &id)
+RunConfiguration *MaemoRunConfigurationFactory::create(Target *parent, Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -132,8 +137,7 @@ RunConfiguration *MaemoRunConfigurationFactory::restore(Target *parent,
return 0;
}
-RunConfiguration *MaemoRunConfigurationFactory::clone(Target *parent,
- RunConfiguration *source)
+RunConfiguration *MaemoRunConfigurationFactory::clone(Target *parent, RunConfiguration *source)
{
if (!canClone(parent, source))
return 0;
diff --git a/src/plugins/madde/maemorunfactories.h b/src/plugins/madde/maemorunfactories.h
index f8b3ed91b3..1461b83f12 100644
--- a/src/plugins/madde/maemorunfactories.h
+++ b/src/plugins/madde/maemorunfactories.h
@@ -57,11 +57,11 @@ public:
explicit MaemoRunConfigurationFactory(QObject *parent = 0);
~MaemoRunConfigurationFactory();
- QString displayNameForId(const QString &id) const;
- QStringList availableCreationIds(Target *parent) const;
+ QString displayNameForId(Core::Id id) const;
+ QList<Core::Id> availableCreationIds(Target *parent) const;
- bool canCreate(Target *parent, const QString &id) const;
- RunConfiguration *create(Target *parent, const QString &id);
+ bool canCreate(Target *parent, Core::Id id) const;
+ RunConfiguration *create(Target *parent, Core::Id id);
bool canRestore(Target *parent, const QVariantMap &map) const;
RunConfiguration *restore(Target *parent, const QVariantMap &map);
diff --git a/src/plugins/madde/qt4maemodeployconfiguration.cpp b/src/plugins/madde/qt4maemodeployconfiguration.cpp
index 9b01066d10..a31cd7deaf 100644
--- a/src/plugins/madde/qt4maemodeployconfiguration.cpp
+++ b/src/plugins/madde/qt4maemodeployconfiguration.cpp
@@ -60,7 +60,7 @@ const QString OldDeployConfigId = QLatin1String("2.2MaemoDeployConfig");
} // namespace
Qt4MaemoDeployConfiguration::Qt4MaemoDeployConfiguration(ProjectExplorer::Target *target,
- const QString &id, const QString &displayName)
+ const Core::Id id, const QString &displayName)
: RemoteLinuxDeployConfiguration(target, id, displayName)
{
}
@@ -91,34 +91,33 @@ DeployConfigurationWidget *Qt4MaemoDeployConfiguration::configurationWidget() co
Qt4MaemoDeployConfiguration::~Qt4MaemoDeployConfiguration() {}
-QString Qt4MaemoDeployConfiguration::fremantleWithPackagingId()
+Core::Id Qt4MaemoDeployConfiguration::fremantleWithPackagingId()
{
- return QLatin1String("DeployToFremantleWithPackaging");
+ return Core::Id("DeployToFremantleWithPackaging");
}
-QString Qt4MaemoDeployConfiguration::fremantleWithoutPackagingId()
+Core::Id Qt4MaemoDeployConfiguration::fremantleWithoutPackagingId()
{
- return QLatin1String("DeployToFremantleWithoutPackaging");
+ return Core::Id("DeployToFremantleWithoutPackaging");
}
-QString Qt4MaemoDeployConfiguration::harmattanId()
+Core::Id Qt4MaemoDeployConfiguration::harmattanId()
{
- return QLatin1String("DeployToHarmattan");
+ return Core::Id("DeployToHarmattan");
}
-QString Qt4MaemoDeployConfiguration::meegoId()
+Core::Id Qt4MaemoDeployConfiguration::meegoId()
{
- return QLatin1String("DeployToMeego");
+ return Core::Id("DeployToMeego");
}
-
Qt4MaemoDeployConfigurationFactory::Qt4MaemoDeployConfigurationFactory(QObject *parent)
: DeployConfigurationFactory(parent)
{ }
-QStringList Qt4MaemoDeployConfigurationFactory::availableCreationIds(Target *parent) const
+QList<Core::Id> Qt4MaemoDeployConfigurationFactory::availableCreationIds(Target *parent) const
{
- QStringList ids;
+ QList<Core::Id> ids;
if (qobject_cast<Qt4Maemo5Target *>(parent)) {
ids << Qt4MaemoDeployConfiguration::fremantleWithPackagingId()
<< Qt4MaemoDeployConfiguration::fremantleWithoutPackagingId();
@@ -131,7 +130,7 @@ QStringList Qt4MaemoDeployConfigurationFactory::availableCreationIds(Target *par
return ids;
}
-QString Qt4MaemoDeployConfigurationFactory::displayNameForId(const QString &id) const
+QString Qt4MaemoDeployConfigurationFactory::displayNameForId(Core::Id id) const
{
if (id == Qt4MaemoDeployConfiguration::fremantleWithoutPackagingId())
return tr("Copy Files to Maemo5 Device");
@@ -145,13 +144,13 @@ QString Qt4MaemoDeployConfigurationFactory::displayNameForId(const QString &id)
}
bool Qt4MaemoDeployConfigurationFactory::canCreate(Target *parent,
- const QString &id) const
+ Core::Id id) const
{
return availableCreationIds(parent).contains(id);
}
DeployConfiguration *Qt4MaemoDeployConfigurationFactory::create(Target *parent,
- const QString &id)
+ Core::Id id)
{
Q_ASSERT(canCreate(parent, id));
@@ -180,7 +179,7 @@ bool Qt4MaemoDeployConfigurationFactory::canRestore(Target *parent,
const QVariantMap &map) const
{
return canCreate(parent, idFromMap(map))
- || (idFromMap(map) == OldDeployConfigId
+ || (idFromMap(map) == Core::Id(OldDeployConfigId)
&& qobject_cast<AbstractQt4MaemoTarget *>(parent));
}
@@ -189,8 +188,8 @@ DeployConfiguration *Qt4MaemoDeployConfigurationFactory::restore(Target *parent,
{
if (!canRestore(parent, map))
return 0;
- QString id = idFromMap(map);
- if (id == OldDeployConfigId) {
+ Core::Id id = idFromMap(map);
+ if (id == Core::Id(OldDeployConfigId)) {
if (qobject_cast<Qt4Maemo5Target *>(parent))
id = Qt4MaemoDeployConfiguration::fremantleWithPackagingId();
else if (qobject_cast<Qt4HarmattanTarget *>(parent))
diff --git a/src/plugins/madde/qt4maemodeployconfiguration.h b/src/plugins/madde/qt4maemodeployconfiguration.h
index 2e6f79431a..5bce71ab02 100644
--- a/src/plugins/madde/qt4maemodeployconfiguration.h
+++ b/src/plugins/madde/qt4maemodeployconfiguration.h
@@ -50,15 +50,15 @@ class Qt4MaemoDeployConfigurationFactory : public ProjectExplorer::DeployConfigu
public:
explicit Qt4MaemoDeployConfigurationFactory(QObject *parent = 0);
- virtual QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
- virtual QString displayNameForId(const QString &id) const;
- virtual bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- virtual ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
- virtual bool canRestore(ProjectExplorer::Target *parent,
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
+ QString displayNameForId(Core::Id id) const;
+ bool canCreate(ProjectExplorer::Target *parent, Core::Id id) const;
+ ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, Core::Id id);
+ bool canRestore(ProjectExplorer::Target *parent,
const QVariantMap &map) const;
- virtual ProjectExplorer::DeployConfiguration *restore(ProjectExplorer::Target *parent,
+ ProjectExplorer::DeployConfiguration *restore(ProjectExplorer::Target *parent,
const QVariantMap &map);
- virtual ProjectExplorer::DeployConfiguration *clone(ProjectExplorer::Target *parent,
+ ProjectExplorer::DeployConfiguration *clone(ProjectExplorer::Target *parent,
ProjectExplorer::DeployConfiguration *product);
};
@@ -73,15 +73,15 @@ public:
QString localDesktopFilePath(const RemoteLinux::DeployableFilesPerProFile *proFileInfo) const;
- static QString fremantleWithPackagingId();
- static QString fremantleWithoutPackagingId();
- static QString harmattanId();
- static QString meegoId();
+ static Core::Id fremantleWithPackagingId();
+ static Core::Id fremantleWithoutPackagingId();
+ static Core::Id harmattanId();
+ static Core::Id meegoId();
private:
friend class Internal::Qt4MaemoDeployConfigurationFactory;
- Qt4MaemoDeployConfiguration(ProjectExplorer::Target *target, const QString &id,
+ Qt4MaemoDeployConfiguration(ProjectExplorer::Target *target, const Core::Id id,
const QString &displayName);
Qt4MaemoDeployConfiguration(ProjectExplorer::Target *target,
Qt4MaemoDeployConfiguration *source);
diff --git a/src/plugins/madde/qt4maemotarget.cpp b/src/plugins/madde/qt4maemotarget.cpp
index b64eb3bfd9..0c4ba4803c 100644
--- a/src/plugins/madde/qt4maemotarget.cpp
+++ b/src/plugins/madde/qt4maemotarget.cpp
@@ -121,7 +121,7 @@ bool adaptTagValue(QByteArray &document, const QByteArray &fieldName,
} // anonymous namespace
-AbstractQt4MaemoTarget::AbstractQt4MaemoTarget(Qt4Project *parent, const QString &id,
+AbstractQt4MaemoTarget::AbstractQt4MaemoTarget(Qt4Project *parent, const Core::Id id,
const QString &qmakeScope) :
AbstractEmbeddedLinuxTarget(parent, id),
m_filesWatcher(new Utils::FileSystemWatcher(this)),
@@ -375,8 +375,9 @@ void AbstractQt4MaemoTarget::raiseError(const QString &reason)
}
AbstractDebBasedQt4MaemoTarget::AbstractDebBasedQt4MaemoTarget(Qt4Project *parent,
- const QString &id, const QString &qmakeScope)
- : AbstractQt4MaemoTarget(parent, id, qmakeScope)
+ const Core::Id id,
+ const QString &qmakeScope) :
+ AbstractQt4MaemoTarget(parent, id, qmakeScope)
{
}
@@ -958,8 +959,8 @@ QString AbstractDebBasedQt4MaemoTarget::shortDayOfWeekName(const QDateTime &dt)
AbstractRpmBasedQt4MaemoTarget::AbstractRpmBasedQt4MaemoTarget(Qt4Project *parent,
- const QString &id, const QString &qmakeScope)
- : AbstractQt4MaemoTarget(parent, id, qmakeScope)
+ const Core::Id id, const QString &qmakeScope) :
+ AbstractQt4MaemoTarget(parent, id, qmakeScope)
{
}
@@ -1123,7 +1124,7 @@ bool AbstractRpmBasedQt4MaemoTarget::setValueForTag(const QByteArray &tag,
return true;
}
-Qt4Maemo5Target::Qt4Maemo5Target(Qt4Project *parent, const QString &id)
+Qt4Maemo5Target::Qt4Maemo5Target(Qt4Project *parent, const Core::Id id)
: AbstractDebBasedQt4MaemoTarget(parent, id, QLatin1String("maemo5"))
{
setDisplayName(defaultDisplayName());
@@ -1167,8 +1168,8 @@ QByteArray Qt4Maemo5Target::defaultSection() const
return "user/hidden";
}
-Qt4HarmattanTarget::Qt4HarmattanTarget(Qt4Project *parent, const QString &id)
- : AbstractDebBasedQt4MaemoTarget(parent, id, QLatin1String("contains(MEEGO_EDITION,harmattan)"))
+Qt4HarmattanTarget::Qt4HarmattanTarget(Qt4Project *parent, const Core::Id id) :
+ AbstractDebBasedQt4MaemoTarget(parent, id, QLatin1String("contains(MEEGO_EDITION,harmattan)"))
{
setDisplayName(defaultDisplayName());
}
@@ -1242,9 +1243,9 @@ QByteArray Qt4HarmattanTarget::defaultSection() const
}
-Qt4MeegoTarget::Qt4MeegoTarget(Qt4Project *parent, const QString &id)
- : AbstractRpmBasedQt4MaemoTarget(parent, id,
- QLatin1String("!isEmpty(MEEGO_VERSION_MAJOR):!contains(MEEGO_EDITION,harmattan)"))
+Qt4MeegoTarget::Qt4MeegoTarget(Qt4Project *parent, const Core::Id id) :
+ AbstractRpmBasedQt4MaemoTarget(parent, id,
+ QLatin1String("!isEmpty(MEEGO_VERSION_MAJOR):!contains(MEEGO_EDITION,harmattan)"))
{
setDisplayName(defaultDisplayName());
}
diff --git a/src/plugins/madde/qt4maemotarget.h b/src/plugins/madde/qt4maemotarget.h
index 3be2877d96..da80854815 100644
--- a/src/plugins/madde/qt4maemotarget.h
+++ b/src/plugins/madde/qt4maemotarget.h
@@ -56,8 +56,8 @@ class AbstractQt4MaemoTarget : public RemoteLinux::AbstractEmbeddedLinuxTarget
friend class Qt4MaemoTargetFactory;
Q_OBJECT
public:
- explicit AbstractQt4MaemoTarget(Qt4ProjectManager::Qt4Project *parent, const QString &id,
- const QString &qmakeScope);
+ AbstractQt4MaemoTarget(Qt4ProjectManager::Qt4Project *parent, const Core::Id id,
+ const QString &qmakeScope);
virtual ~AbstractQt4MaemoTarget();
void createApplicationProFiles(bool reparse);
@@ -119,8 +119,8 @@ class AbstractDebBasedQt4MaemoTarget : public AbstractQt4MaemoTarget
{
Q_OBJECT
public:
- AbstractDebBasedQt4MaemoTarget(Qt4ProjectManager::Qt4Project *parent, const QString &id,
- const QString &qmakeScope);
+ AbstractDebBasedQt4MaemoTarget(Qt4ProjectManager::Qt4Project *parent, const Core::Id id,
+ const QString &qmakeScope);
~AbstractDebBasedQt4MaemoTarget();
QString debianDirPath() const;
@@ -192,8 +192,8 @@ class AbstractRpmBasedQt4MaemoTarget : public AbstractQt4MaemoTarget
{
Q_OBJECT
public:
- AbstractRpmBasedQt4MaemoTarget(Qt4ProjectManager::Qt4Project *parent, const QString &id,
- const QString &qmakeScope);
+ AbstractRpmBasedQt4MaemoTarget(Qt4ProjectManager::Qt4Project *parent, const Core::Id id,
+ const QString &qmakeScope);
~AbstractRpmBasedQt4MaemoTarget();
virtual bool allowsRemoteMounts() const { return false; }
@@ -236,8 +236,7 @@ class Qt4Maemo5Target : public AbstractDebBasedQt4MaemoTarget
{
Q_OBJECT
public:
- explicit Qt4Maemo5Target(Qt4ProjectManager::Qt4Project *parent,
- const QString &id);
+ Qt4Maemo5Target(Qt4ProjectManager::Qt4Project *parent, const Core::Id id);
virtual ~Qt4Maemo5Target();
virtual bool supportsDevice(const QSharedPointer<const ProjectExplorer::IDevice> &device) const;
@@ -262,8 +261,7 @@ class Qt4HarmattanTarget : public AbstractDebBasedQt4MaemoTarget
{
Q_OBJECT
public:
- explicit Qt4HarmattanTarget(Qt4ProjectManager::Qt4Project *parent,
- const QString &id);
+ Qt4HarmattanTarget(Qt4ProjectManager::Qt4Project *parent, const Core::Id id);
virtual ~Qt4HarmattanTarget();
virtual bool supportsDevice(const QSharedPointer<const ProjectExplorer::IDevice> &device) const;
@@ -290,8 +288,7 @@ class Qt4MeegoTarget : public AbstractRpmBasedQt4MaemoTarget
{
Q_OBJECT
public:
- explicit Qt4MeegoTarget(Qt4ProjectManager::Qt4Project *parent,
- const QString &id);
+ Qt4MeegoTarget(Qt4ProjectManager::Qt4Project *parent, const Core::Id id);
virtual ~Qt4MeegoTarget();
virtual bool supportsDevice(const QSharedPointer<const ProjectExplorer::IDevice> &device) const;
static QString defaultDisplayName();
diff --git a/src/plugins/madde/qt4maemotargetfactory.cpp b/src/plugins/madde/qt4maemotargetfactory.cpp
index f2ab143512..23ad45fb98 100644
--- a/src/plugins/madde/qt4maemotargetfactory.cpp
+++ b/src/plugins/madde/qt4maemotargetfactory.cpp
@@ -66,38 +66,38 @@ Qt4MaemoTargetFactory::~Qt4MaemoTargetFactory()
{
}
-bool Qt4MaemoTargetFactory::supportsTargetId(const QString &id) const
+bool Qt4MaemoTargetFactory::supportsTargetId(const Core::Id id) const
{
return MaemoGlobal::isMaemoTargetId(id);
}
-QStringList Qt4MaemoTargetFactory::supportedTargetIds() const
+QList<Core::Id> Qt4MaemoTargetFactory::supportedTargetIds() const
{
- QStringList targetIds;
- targetIds << QLatin1String(MAEMO5_DEVICE_TARGET_ID)
- << QLatin1String(HARMATTAN_DEVICE_TARGET_ID)
- << QLatin1String(MEEGO_DEVICE_TARGET_ID);
+ QList<Core::Id> targetIds;
+ targetIds << Core::Id(MAEMO5_DEVICE_TARGET_ID)
+ << Core::Id(HARMATTAN_DEVICE_TARGET_ID)
+ << Core::Id(MEEGO_DEVICE_TARGET_ID);
return targetIds;
}
-QString Qt4MaemoTargetFactory::displayNameForId(const QString &id) const
+QString Qt4MaemoTargetFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(MAEMO5_DEVICE_TARGET_ID))
+ if (id == Core::Id(MAEMO5_DEVICE_TARGET_ID))
return Qt4Maemo5Target::defaultDisplayName();
- else if (id == QLatin1String(HARMATTAN_DEVICE_TARGET_ID))
+ else if (id == Core::Id(HARMATTAN_DEVICE_TARGET_ID))
return Qt4HarmattanTarget::defaultDisplayName();
- else if (id == QLatin1String(MEEGO_DEVICE_TARGET_ID))
+ else if (id == Core::Id(MEEGO_DEVICE_TARGET_ID))
return Qt4MeegoTarget::defaultDisplayName();
return QString();
}
-QIcon Qt4MaemoTargetFactory::iconForId(const QString &id) const
+QIcon Qt4MaemoTargetFactory::iconForId(const Core::Id id) const
{
Q_UNUSED(id)
return QIcon(":/projectexplorer/images/MaemoDevice.png");
}
-bool Qt4MaemoTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
+bool Qt4MaemoTargetFactory::canCreate(ProjectExplorer::Project *parent, const Core::Id id) const
{
if (!qobject_cast<Qt4Project *>(parent))
return false;
@@ -117,34 +117,34 @@ ProjectExplorer::Target *Qt4MaemoTargetFactory::restore(ProjectExplorer::Project
if (!canRestore(parent, map))
return 0;
- const QString id = idFromMap(map);
+ const Core::Id id = idFromMap(map);
AbstractQt4MaemoTarget *target = 0;
Qt4Project *qt4project = static_cast<Qt4Project *>(parent);
- if (id == QLatin1String(MAEMO5_DEVICE_TARGET_ID))
- target = new Qt4Maemo5Target(qt4project, QLatin1String("transient ID"));
- else if (id == QLatin1String(HARMATTAN_DEVICE_TARGET_ID))
- target = new Qt4HarmattanTarget(qt4project, QLatin1String("transient ID"));
- else if (id == QLatin1String(MEEGO_DEVICE_TARGET_ID))
- target = new Qt4MeegoTarget(qt4project, QLatin1String("transient ID"));
+ if (id == Core::Id(MAEMO5_DEVICE_TARGET_ID))
+ target = new Qt4Maemo5Target(qt4project, id);
+ else if (id == Core::Id(HARMATTAN_DEVICE_TARGET_ID))
+ target = new Qt4HarmattanTarget(qt4project, id);
+ else if (id == Core::Id(MEEGO_DEVICE_TARGET_ID))
+ target = new Qt4MeegoTarget(qt4project, id);
if (target->fromMap(map))
return target;
delete target;
return 0;
}
-QString Qt4MaemoTargetFactory::buildNameForId(const QString &id) const
+QString Qt4MaemoTargetFactory::buildNameForId(const Core::Id id) const
{
- if (id == QLatin1String(MAEMO5_DEVICE_TARGET_ID))
+ if (id == Core::Id(MAEMO5_DEVICE_TARGET_ID))
return QLatin1String("maemo");
- else if (id == QLatin1String(HARMATTAN_DEVICE_TARGET_ID))
+ else if (id == Core::Id(HARMATTAN_DEVICE_TARGET_ID))
return QLatin1String("harmattan");
- else if (id == QLatin1String(MEEGO_DEVICE_TARGET_ID))
+ else if (id == Core::Id(MEEGO_DEVICE_TARGET_ID))
return QLatin1String("meego");
else
return QString();
}
-QString Qt4MaemoTargetFactory::shadowBuildDirectory(const QString &profilePath, const QString &id, const QString &suffix)
+QString Qt4MaemoTargetFactory::shadowBuildDirectory(const QString &profilePath, const Core::Id id, const QString &suffix)
{
#if defined(Q_OS_WIN)
// No shadowbuilding for windows!
@@ -156,8 +156,9 @@ QString Qt4MaemoTargetFactory::shadowBuildDirectory(const QString &profilePath,
#endif
}
-QSet<QString> Qt4MaemoTargetFactory::targetFeatures(const QString & /*id*/) const
+QSet<QString> Qt4MaemoTargetFactory::targetFeatures(const Core::Id id) const
{
+ Q_UNUSED(id);
QSet<QString> features;
features << Qt4ProjectManager::Constants::MOBILE_TARGETFEATURE_ID;
#ifndef Q_OS_WIN
@@ -166,7 +167,7 @@ QSet<QString> Qt4MaemoTargetFactory::targetFeatures(const QString & /*id*/) cons
return features;
}
-ProjectExplorer::Target *Qt4MaemoTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
+ProjectExplorer::Target *Qt4MaemoTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -186,21 +187,21 @@ ProjectExplorer::Target *Qt4MaemoTargetFactory::create(ProjectExplorer::Project
}
ProjectExplorer::Target *Qt4MaemoTargetFactory::create(ProjectExplorer::Project *parent,
- const QString &id, const QList<BuildConfigurationInfo> &infos)
+ const Core::Id id, const QList<BuildConfigurationInfo> &infos)
{
if (!canCreate(parent, id))
return 0;
AbstractQt4MaemoTarget *target = 0;
- QStringList deployConfigIds;
- if (id == QLatin1String(MAEMO5_DEVICE_TARGET_ID)) {
+ QList<Core::Id> deployConfigIds;
+ if (id == Core::Id(MAEMO5_DEVICE_TARGET_ID)) {
target = new Qt4Maemo5Target(static_cast<Qt4Project *>(parent), id);
deployConfigIds << Qt4MaemoDeployConfiguration::fremantleWithPackagingId()
<< Qt4MaemoDeployConfiguration::fremantleWithoutPackagingId();
- } else if (id == QLatin1String(HARMATTAN_DEVICE_TARGET_ID)) {
+ } else if (id == Core::Id(HARMATTAN_DEVICE_TARGET_ID)) {
target = new Qt4HarmattanTarget(static_cast<Qt4Project *>(parent), id);
deployConfigIds << Qt4MaemoDeployConfiguration::harmattanId();
- } else if (id == QLatin1String(MEEGO_DEVICE_TARGET_ID)) {
+ } else if (id == Core::Id(MEEGO_DEVICE_TARGET_ID)) {
target = new Qt4MeegoTarget(static_cast<Qt4Project *>(parent), id);
deployConfigIds << Qt4MaemoDeployConfiguration::meegoId();
}
@@ -211,7 +212,7 @@ ProjectExplorer::Target *Qt4MaemoTargetFactory::create(ProjectExplorer::Project
info.version(), info.buildConfig,
info.additionalArguments, info.directory, info.importing);
- foreach (const QString &deployConfigId, deployConfigIds) {
+ foreach (const Core::Id &deployConfigId, deployConfigIds) {
target->addDeployConfiguration(target->createDeployConfiguration(deployConfigId));
}
target->createApplicationProFiles(false);
diff --git a/src/plugins/madde/qt4maemotargetfactory.h b/src/plugins/madde/qt4maemotargetfactory.h
index 88b4a9dbec..db858de1a2 100644
--- a/src/plugins/madde/qt4maemotargetfactory.h
+++ b/src/plugins/madde/qt4maemotargetfactory.h
@@ -45,24 +45,24 @@ public:
Qt4MaemoTargetFactory(QObject *parent = 0);
~Qt4MaemoTargetFactory();
- QStringList supportedTargetIds() const;
- QString displayNameForId(const QString &id) const;
- QIcon iconForId(const QString &id) const;
+ QList<Core::Id> supportedTargetIds() const;
+ QString displayNameForId(const Core::Id id) const;
+ QIcon iconForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
+ bool canCreate(ProjectExplorer::Project *parent, const Core::Id id) const;
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
ProjectExplorer::Target *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
- QString shadowBuildDirectory(const QString &profilePath, const QString &id, const QString &suffix);
- QString buildNameForId(const QString &id) const;
+ QString shadowBuildDirectory(const QString &profilePath, const Core::Id id, const QString &suffix);
+ QString buildNameForId(const Core::Id id) const;
- bool supportsTargetId(const QString &id) const;
+ bool supportsTargetId(const Core::Id id) const;
- ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id);
- ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id,
+ ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id);
+ ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id,
const QList<Qt4ProjectManager::BuildConfigurationInfo> &infos);
- QSet<QString> targetFeatures(const QString &id) const;
+ QSet<QString> targetFeatures(const Core::Id id) const;
};
} // namespace Internal
diff --git a/src/plugins/projectexplorer/abstractprocessstep.cpp b/src/plugins/projectexplorer/abstractprocessstep.cpp
index 4c970aae7f..e65fb4ef11 100644
--- a/src/plugins/projectexplorer/abstractprocessstep.cpp
+++ b/src/plugins/projectexplorer/abstractprocessstep.cpp
@@ -90,7 +90,7 @@ using namespace ProjectExplorer;
Should be used in init()
*/
-AbstractProcessStep::AbstractProcessStep(BuildStepList *bsl, const QString &id) :
+AbstractProcessStep::AbstractProcessStep(BuildStepList *bsl, const Core::Id id) :
BuildStep(bsl, id), m_timer(0), m_futureInterface(0),
m_ignoreReturnValue(false), m_process(0),
m_eventLoop(0), m_outputParserChain(0)
diff --git a/src/plugins/projectexplorer/abstractprocessstep.h b/src/plugins/projectexplorer/abstractprocessstep.h
index 974c13ec6b..279dd1082f 100644
--- a/src/plugins/projectexplorer/abstractprocessstep.h
+++ b/src/plugins/projectexplorer/abstractprocessstep.h
@@ -73,7 +73,7 @@ public:
void appendOutputParser(ProjectExplorer::IOutputParser *parser);
ProjectExplorer::IOutputParser *outputParser() const;
protected:
- AbstractProcessStep(BuildStepList *bsl, const QString &id);
+ AbstractProcessStep(BuildStepList *bsl, const Core::Id id);
AbstractProcessStep(BuildStepList *bsl, AbstractProcessStep *bs);
virtual void processStarted();
diff --git a/src/plugins/projectexplorer/applicationrunconfiguration.cpp b/src/plugins/projectexplorer/applicationrunconfiguration.cpp
index c31a42c8b5..37d4b9b7c2 100644
--- a/src/plugins/projectexplorer/applicationrunconfiguration.cpp
+++ b/src/plugins/projectexplorer/applicationrunconfiguration.cpp
@@ -41,7 +41,7 @@ namespace ProjectExplorer {
/// LocalApplicationRunConfiguration
-LocalApplicationRunConfiguration::LocalApplicationRunConfiguration(Target *target, const QString &id) :
+LocalApplicationRunConfiguration::LocalApplicationRunConfiguration(Target *target, const Core::Id id) :
RunConfiguration(target, id)
{
}
diff --git a/src/plugins/projectexplorer/applicationrunconfiguration.h b/src/plugins/projectexplorer/applicationrunconfiguration.h
index 024114fd8f..6b36a3186b 100644
--- a/src/plugins/projectexplorer/applicationrunconfiguration.h
+++ b/src/plugins/projectexplorer/applicationrunconfiguration.h
@@ -62,7 +62,7 @@ public:
virtual QStringList dumperLibraryLocations() const = 0;
protected:
- explicit LocalApplicationRunConfiguration(Target *target, const QString &id);
+ explicit LocalApplicationRunConfiguration(Target *target, const Core::Id id);
explicit LocalApplicationRunConfiguration(Target *target, LocalApplicationRunConfiguration *rc);
Utils::AbstractMacroExpander *macroExpander() const;
diff --git a/src/plugins/projectexplorer/buildconfiguration.cpp b/src/plugins/projectexplorer/buildconfiguration.cpp
index 8d5465671e..f49a87ae54 100644
--- a/src/plugins/projectexplorer/buildconfiguration.cpp
+++ b/src/plugins/projectexplorer/buildconfiguration.cpp
@@ -80,18 +80,18 @@ bool BuildConfigMacroExpander::resolveMacro(const QString &name, QString *ret)
}
} // namespace Internal
-BuildConfiguration::BuildConfiguration(Target *target, const QString &id) :
+BuildConfiguration::BuildConfiguration(Target *target, const Core::Id id) :
ProjectConfiguration(target, id),
m_clearSystemEnvironment(false),
m_toolChain(0),
m_macroExpander(0)
{
Q_ASSERT(target);
- BuildStepList *bsl = new BuildStepList(this, QLatin1String(Constants::BUILDSTEPS_BUILD));
+ BuildStepList *bsl = new BuildStepList(this, Core::Id(Constants::BUILDSTEPS_BUILD));
//: Display name of the build build step list. Used as part of the labels in the project window.
bsl->setDefaultDisplayName(tr("Build"));
m_stepLists.append(bsl);
- bsl = new BuildStepList(this, QLatin1String(Constants::BUILDSTEPS_CLEAN));
+ bsl = new BuildStepList(this, Core::Id(Constants::BUILDSTEPS_CLEAN));
//: Display name of the clean build step list. Used as part of the labels in the project window.
bsl->setDefaultDisplayName(tr("Clean"));
m_stepLists.append(bsl);
@@ -136,15 +136,15 @@ Utils::AbstractMacroExpander *BuildConfiguration::macroExpander()
return m_macroExpander;
}
-QStringList BuildConfiguration::knownStepLists() const
+QList<Core::Id> BuildConfiguration::knownStepLists() const
{
- QStringList result;
+ QList<Core::Id> result;
foreach (BuildStepList *list, m_stepLists)
result.append(list->id());
return result;
}
-BuildStepList *BuildConfiguration::stepList(const QString &id) const
+BuildStepList *BuildConfiguration::stepList(Core::Id id) const
{
foreach (BuildStepList *list, m_stepLists)
if (id == list->id())
@@ -188,9 +188,9 @@ bool BuildConfiguration::fromMap(const QVariantMap &map)
delete list;
return false;
}
- if (list->id() == QLatin1String(Constants::BUILDSTEPS_BUILD))
+ if (list->id() == Core::Id(Constants::BUILDSTEPS_BUILD))
list->setDefaultDisplayName(tr("Build"));
- else if (list->id() == QLatin1String(Constants::BUILDSTEPS_CLEAN))
+ else if (list->id() == Core::Id(Constants::BUILDSTEPS_CLEAN))
list->setDefaultDisplayName(tr("Clean"));
m_stepLists.append(list);
}
@@ -200,8 +200,8 @@ bool BuildConfiguration::fromMap(const QVariantMap &map)
// the BC is not completely set up yet!
// TODO: We currently assume there to be at least a clean and build list!
- QTC_CHECK(knownStepLists().contains(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD)));
- QTC_CHECK(knownStepLists().contains(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)));
+ QTC_CHECK(knownStepLists().contains(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD)));
+ QTC_CHECK(knownStepLists().contains(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)));
return ProjectConfiguration::fromMap(map);
}
diff --git a/src/plugins/projectexplorer/buildconfiguration.h b/src/plugins/projectexplorer/buildconfiguration.h
index 5067ee64fd..fc2bb97ef5 100644
--- a/src/plugins/projectexplorer/buildconfiguration.h
+++ b/src/plugins/projectexplorer/buildconfiguration.h
@@ -71,8 +71,8 @@ public:
bool useSystemEnvironment() const;
void setUseSystemEnvironment(bool b);
- QStringList knownStepLists() const;
- BuildStepList *stepList(const QString &id) const;
+ QList<Core::Id> knownStepLists() const;
+ BuildStepList *stepList(Core::Id id) const;
virtual QVariantMap toMap() const;
@@ -107,7 +107,7 @@ signals:
void toolChainChanged();
protected:
- BuildConfiguration(Target *target, const QString &id);
+ BuildConfiguration(Target *target, const Core::Id id);
BuildConfiguration(Target *target, BuildConfiguration *source);
void cloneSteps(BuildConfiguration *source);
@@ -137,12 +137,12 @@ public:
virtual ~IBuildConfigurationFactory();
// used to show the list of possible additons to a target, returns a list of types
- virtual QStringList availableCreationIds(Target *parent) const = 0;
+ virtual QList<Core::Id> availableCreationIds(Target *parent) const = 0;
// used to translate the types to names to display to the user
- virtual QString displayNameForId(const QString &id) const = 0;
+ virtual QString displayNameForId(const Core::Id id) const = 0;
- virtual bool canCreate(Target *parent, const QString &id) const = 0;
- virtual BuildConfiguration *create(Target *parent, const QString &id) = 0;
+ virtual bool canCreate(Target *parent, const Core::Id id) const = 0;
+ virtual BuildConfiguration *create(Target *parent, const Core::Id id) = 0;
// used to recreate the runConfigurations when restoring settings
virtual bool canRestore(Target *parent, const QVariantMap &map) const = 0;
virtual BuildConfiguration *restore(Target *parent, const QVariantMap &map) = 0;
diff --git a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
index 07cfe6e830..986f52de15 100644
--- a/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
+++ b/src/plugins/projectexplorer/buildsettingspropertiespage.cpp
@@ -229,9 +229,9 @@ void BuildSettingsWidget::updateAddButtonMenu()
}
IBuildConfigurationFactory *factory = m_target->buildConfigurationFactory();
if (factory) {
- foreach (const QString &id, factory->availableCreationIds(m_target)) {
+ foreach (Core::Id id, factory->availableCreationIds(m_target)) {
QAction *action = m_addButtonMenu->addAction(factory->displayNameForId(id), this, SLOT(createConfiguration()));
- action->setData(id);
+ action->setData(QVariant::fromValue(id));
}
}
}
@@ -248,8 +248,8 @@ void BuildSettingsWidget::updateBuildSettings()
BuildConfigWidget *generalConfigWidget = m_target->createConfigWidget();
addSubWidget(generalConfigWidget);
- addSubWidget(new BuildStepsPage(m_target, QLatin1String(Constants::BUILDSTEPS_BUILD)));
- addSubWidget(new BuildStepsPage(m_target, QLatin1String(Constants::BUILDSTEPS_CLEAN)));
+ addSubWidget(new BuildStepsPage(m_target, Core::Id(Constants::BUILDSTEPS_BUILD)));
+ addSubWidget(new BuildStepsPage(m_target, Core::Id(Constants::BUILDSTEPS_CLEAN)));
QList<BuildConfigWidget *> subConfigWidgets = m_target->project()->subConfigWidgets();
foreach (BuildConfigWidget *subConfigWidget, subConfigWidgets)
@@ -289,7 +289,7 @@ void BuildSettingsWidget::createConfiguration()
return;
QAction *action = qobject_cast<QAction *>(sender());
- const QString &id = action->data().toString();
+ Core::Id id = action->data().value<Core::Id>();
BuildConfiguration *bc = m_target->buildConfigurationFactory()->create(m_target, id);
if (bc) {
m_target->setActiveBuildConfiguration(bc);
diff --git a/src/plugins/projectexplorer/buildstep.cpp b/src/plugins/projectexplorer/buildstep.cpp
index 86c91f3494..8977b86f0d 100644
--- a/src/plugins/projectexplorer/buildstep.cpp
+++ b/src/plugins/projectexplorer/buildstep.cpp
@@ -126,7 +126,7 @@ static const char buildStepEnabledKey[] = "ProjectExplorer.BuildStep.Enabled";
using namespace ProjectExplorer;
-BuildStep::BuildStep(BuildStepList *bsl, const QString &id) :
+BuildStep::BuildStep(BuildStepList *bsl, const Core::Id id) :
ProjectConfiguration(bsl, id), m_enabled(true)
{
Q_ASSERT(bsl);
diff --git a/src/plugins/projectexplorer/buildstep.h b/src/plugins/projectexplorer/buildstep.h
index 2739c209a9..c529f5f863 100644
--- a/src/plugins/projectexplorer/buildstep.h
+++ b/src/plugins/projectexplorer/buildstep.h
@@ -54,7 +54,7 @@ class PROJECTEXPLORER_EXPORT BuildStep : public ProjectConfiguration
Q_OBJECT
protected:
- BuildStep(BuildStepList *bsl, const QString &id);
+ BuildStep(BuildStepList *bsl, const Core::Id id);
BuildStep(BuildStepList *bsl, BuildStep *bs);
public:
@@ -108,12 +108,12 @@ public:
virtual ~IBuildStepFactory();
// used to show the list of possible additons to a target, returns a list of types
- virtual QStringList availableCreationIds(BuildStepList *parent) const = 0;
+ virtual QList<Core::Id> availableCreationIds(BuildStepList *parent) const = 0;
// used to translate the types to names to display to the user
- virtual QString displayNameForId(const QString &id) const = 0;
+ virtual QString displayNameForId(const Core::Id id) const = 0;
- virtual bool canCreate(BuildStepList *parent, const QString &id) const = 0;
- virtual BuildStep *create(BuildStepList *parent, const QString &id) = 0;
+ virtual bool canCreate(BuildStepList *parent, const Core::Id id) const = 0;
+ virtual BuildStep *create(BuildStepList *parent, const Core::Id id) = 0;
// used to recreate the runConfigurations when restoring settings
virtual bool canRestore(BuildStepList *parent, const QVariantMap &map) const = 0;
virtual BuildStep *restore(BuildStepList *parent, const QVariantMap &map) = 0;
diff --git a/src/plugins/projectexplorer/buildsteplist.cpp b/src/plugins/projectexplorer/buildsteplist.cpp
index 164d0bc830..10f096b823 100644
--- a/src/plugins/projectexplorer/buildsteplist.cpp
+++ b/src/plugins/projectexplorer/buildsteplist.cpp
@@ -68,7 +68,7 @@ const char * const STEPS_PREFIX("ProjectExplorer.BuildStepList.Step.");
} // namespace
-BuildStepList::BuildStepList(QObject *parent, const QString &id) :
+BuildStepList::BuildStepList(QObject *parent, const Core::Id id) :
ProjectConfiguration(parent, id),
m_isNull(false)
{
@@ -87,7 +87,7 @@ BuildStepList::BuildStepList(QObject *parent, BuildStepList *source) :
}
BuildStepList::BuildStepList(QObject *parent, const QVariantMap &data) :
- ProjectConfiguration(parent, QLatin1String("UNKNOWN ID"))
+ ProjectConfiguration(parent, Core::Id())
{
Q_ASSERT(parent);
m_isNull = !fromMap(data);
@@ -124,7 +124,7 @@ bool BuildStepList::isEmpty() const
return m_steps.isEmpty();
}
-bool BuildStepList::contains(const QString &id) const
+bool BuildStepList::contains(const Core::Id id) const
{
foreach (BuildStep *bs, steps()) {
if (bs->id() == id)
diff --git a/src/plugins/projectexplorer/buildsteplist.h b/src/plugins/projectexplorer/buildsteplist.h
index 2db05a9847..e51fc1606b 100644
--- a/src/plugins/projectexplorer/buildsteplist.h
+++ b/src/plugins/projectexplorer/buildsteplist.h
@@ -49,7 +49,7 @@ class PROJECTEXPLORER_EXPORT BuildStepList : public ProjectConfiguration
Q_OBJECT
public:
- BuildStepList(QObject *parent, const QString &id);
+ BuildStepList(QObject *parent, const Core::Id id);
BuildStepList(QObject *parent, BuildStepList *source);
BuildStepList(QObject *parent, const QVariantMap &data);
virtual ~BuildStepList();
@@ -58,7 +58,7 @@ public:
bool isNull() const;
int count() const;
bool isEmpty() const;
- bool contains(const QString &id) const;
+ bool contains(const Core::Id id) const;
void insertStep(int position, BuildStep *step);
bool removeStep(int position);
diff --git a/src/plugins/projectexplorer/buildstepspage.cpp b/src/plugins/projectexplorer/buildstepspage.cpp
index 21129190bc..9e4e197893 100644
--- a/src/plugins/projectexplorer/buildstepspage.cpp
+++ b/src/plugins/projectexplorer/buildstepspage.cpp
@@ -339,14 +339,13 @@ void BuildStepListWidget::init(BuildStepList *bsl)
void BuildStepListWidget::updateAddBuildStepMenu()
{
- QMap<QString, QPair<QString, IBuildStepFactory *> > map;
+ QMap<QString, QPair<Core::Id, IBuildStepFactory *> > map;
//Build up a list of possible steps and save map the display names to the (internal) name and factories.
QList<IBuildStepFactory *> factories = ExtensionSystem::PluginManager::instance()->getObjects<IBuildStepFactory>();
foreach (IBuildStepFactory *factory, factories) {
- QStringList ids = factory->availableCreationIds(m_buildStepList);
- foreach (const QString &id, ids) {
- map.insert(factory->displayNameForId(id), QPair<QString, IBuildStepFactory *>(id, factory));
- }
+ QList<Core::Id> ids = factory->availableCreationIds(m_buildStepList);
+ foreach (Core::Id id, ids)
+ map.insert(factory->displayNameForId(id), QPair<Core::Id, IBuildStepFactory *>(id, factory));
}
// Ask the user which one to add
@@ -354,7 +353,7 @@ void BuildStepListWidget::updateAddBuildStepMenu()
m_addBuildStepHash.clear();
menu->clear();
if (!map.isEmpty()) {
- QMap<QString, QPair<QString, IBuildStepFactory *> >::const_iterator it, end;
+ QMap<QString, QPair<Core::Id, IBuildStepFactory *> >::const_iterator it, end;
end = map.constEnd();
for (it = map.constBegin(); it != end; ++it) {
QAction *action = menu->addAction(it.key());
@@ -394,7 +393,7 @@ void BuildStepListWidget::addBuildStepWidget(int pos, BuildStep *step)
void BuildStepListWidget::triggerAddBuildStep()
{
if (QAction *action = qobject_cast<QAction *>(sender())) {
- QPair<QString, IBuildStepFactory *> pair = m_addBuildStepHash.value(action);
+ QPair<Core::Id, IBuildStepFactory *> pair = m_addBuildStepHash.value(action);
BuildStep *newStep = pair.second->create(m_buildStepList, pair.first);
int pos = m_buildStepList->count();
m_buildStepList->insertStep(pos, newStep);
@@ -533,7 +532,7 @@ void BuildStepListWidget::updateBuildStepButtonsState()
}
}
-BuildStepsPage::BuildStepsPage(Target *target, const QString &id) :
+BuildStepsPage::BuildStepsPage(Target *target, Core::Id id) :
BuildConfigWidget(),
m_id(id),
m_widget(new BuildStepListWidget(this))
@@ -550,9 +549,9 @@ BuildStepsPage::~BuildStepsPage()
QString BuildStepsPage::displayName() const
{
- if (m_id == QLatin1String(Constants::BUILDSTEPS_BUILD))
+ if (m_id == Core::Id(Constants::BUILDSTEPS_BUILD))
return tr("Build Steps");
- if (m_id == QLatin1String(Constants::BUILDSTEPS_CLEAN))
+ if (m_id == Core::Id(Constants::BUILDSTEPS_CLEAN))
return tr("Clean Steps");
return QString();
}
diff --git a/src/plugins/projectexplorer/buildstepspage.h b/src/plugins/projectexplorer/buildstepspage.h
index 7860d135ae..32f6520379 100644
--- a/src/plugins/projectexplorer/buildstepspage.h
+++ b/src/plugins/projectexplorer/buildstepspage.h
@@ -144,7 +144,7 @@ private:
void addBuildStepWidget(int pos, BuildStep *step);
BuildStepList *m_buildStepList;
- QHash<QAction *, QPair<QString, ProjectExplorer::IBuildStepFactory *> > m_addBuildStepHash;
+ QHash<QAction *, QPair<Core::Id, ProjectExplorer::IBuildStepFactory *> > m_addBuildStepHash;
QList<Internal::BuildStepsWidgetData *> m_buildStepsData;
@@ -170,14 +170,14 @@ class BuildStepsPage : public BuildConfigWidget
Q_OBJECT
public:
- BuildStepsPage(Target *target, const QString &id);
+ BuildStepsPage(Target *target, Core::Id id);
virtual ~BuildStepsPage();
QString displayName() const;
void init(BuildConfiguration *bc);
private:
- QString m_id;
+ Core::Id m_id;
BuildStepListWidget *m_widget;
};
diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
index 21c542bcbd..bfe609232d 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.cpp
@@ -82,7 +82,7 @@ void CustomExecutableRunConfiguration::ctor()
}
CustomExecutableRunConfiguration::CustomExecutableRunConfiguration(Target *parent) :
- LocalApplicationRunConfiguration(parent, QLatin1String(CUSTOM_EXECUTABLE_ID)),
+ LocalApplicationRunConfiguration(parent, Core::Id(CUSTOM_EXECUTABLE_ID)),
m_workingDirectory(QLatin1String(ProjectExplorer::Constants::DEFAULT_WORKING_DIR)),
m_runMode(Gui),
m_baseEnvironmentBase(CustomExecutableRunConfiguration::BuildEnvironmentBase)
@@ -359,13 +359,13 @@ CustomExecutableRunConfigurationFactory::~CustomExecutableRunConfigurationFactor
}
-bool CustomExecutableRunConfigurationFactory::canCreate(Target *parent, const QString &id) const
+bool CustomExecutableRunConfigurationFactory::canCreate(Target *parent, const Core::Id id) const
{
Q_UNUSED(parent);
- return id == QLatin1String(CUSTOM_EXECUTABLE_ID);
+ return id == Core::Id(CUSTOM_EXECUTABLE_ID);
}
-RunConfiguration *CustomExecutableRunConfigurationFactory::create(Target *parent, const QString &id)
+RunConfiguration *CustomExecutableRunConfigurationFactory::create(Target *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -376,7 +376,7 @@ RunConfiguration *CustomExecutableRunConfigurationFactory::create(Target *parent
bool CustomExecutableRunConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const
{
- QString id(idFromMap(map));
+ Core::Id id(idFromMap(map));
return canCreate(parent, id);
}
@@ -403,15 +403,15 @@ RunConfiguration *CustomExecutableRunConfigurationFactory::clone(Target *parent,
return new CustomExecutableRunConfiguration(parent, static_cast<CustomExecutableRunConfiguration*>(source));
}
-QStringList CustomExecutableRunConfigurationFactory::availableCreationIds(Target *parent) const
+QList<Core::Id> CustomExecutableRunConfigurationFactory::availableCreationIds(Target *parent) const
{
Q_UNUSED(parent)
- return QStringList() << QLatin1String(CUSTOM_EXECUTABLE_ID);
+ return QList<Core::Id>() << Core::Id(CUSTOM_EXECUTABLE_ID);
}
-QString CustomExecutableRunConfigurationFactory::displayNameForId(const QString &id) const
+QString CustomExecutableRunConfigurationFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(CUSTOM_EXECUTABLE_ID))
+ if (id == Core::Id(CUSTOM_EXECUTABLE_ID))
return tr("Custom Executable");
return QString();
}
diff --git a/src/plugins/projectexplorer/customexecutablerunconfiguration.h b/src/plugins/projectexplorer/customexecutablerunconfiguration.h
index 1654d5c6d0..a2c557d37d 100644
--- a/src/plugins/projectexplorer/customexecutablerunconfiguration.h
+++ b/src/plugins/projectexplorer/customexecutablerunconfiguration.h
@@ -137,11 +137,11 @@ public:
explicit CustomExecutableRunConfigurationFactory(QObject *parent = 0);
~CustomExecutableRunConfigurationFactory();
- QStringList availableCreationIds(Target *parent) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(Target *parent) const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(Target *parent, const QString &id) const;
- RunConfiguration *create(Target *parent, const QString &id);
+ bool canCreate(Target *parent, const Core::Id id) const;
+ RunConfiguration *create(Target *parent, const Core::Id id);
bool canRestore(Target *parent, const QVariantMap &map) const;
RunConfiguration *restore(Target *parent, const QVariantMap &map);
bool canClone(Target *parent, RunConfiguration *product) const;
diff --git a/src/plugins/projectexplorer/deployconfiguration.cpp b/src/plugins/projectexplorer/deployconfiguration.cpp
index 2499ad7f19..789b51ae93 100644
--- a/src/plugins/projectexplorer/deployconfiguration.cpp
+++ b/src/plugins/projectexplorer/deployconfiguration.cpp
@@ -50,12 +50,12 @@ const char * const BUILD_STEP_LIST_PREFIX("ProjectExplorer.BuildConfiguration.Bu
} // namespace
-DeployConfiguration::DeployConfiguration(Target *target, const QString &id) :
+DeployConfiguration::DeployConfiguration(Target *target, const Core::Id id) :
ProjectConfiguration(target, id),
m_stepList(0)
{
Q_ASSERT(target);
- m_stepList = new BuildStepList(this, QLatin1String(Constants::BUILDSTEPS_DEPLOY));
+ m_stepList = new BuildStepList(this, Core::Id(Constants::BUILDSTEPS_DEPLOY));
//: Display name of the deploy build step list. Used as part of the labels in the project window.
m_stepList->setDefaultDisplayName(tr("Deploy"));
//: Default DeployConfiguration display name
@@ -128,7 +128,7 @@ bool DeployConfiguration::fromMap(const QVariantMap &map)
}
// TODO: We assume that we hold the deploy list
- Q_ASSERT(m_stepList && m_stepList->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY));
+ Q_ASSERT(m_stepList && m_stepList->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY));
return true;
}
@@ -158,27 +158,27 @@ DeployConfigurationFactory::DeployConfigurationFactory(QObject *parent) :
DeployConfigurationFactory::~DeployConfigurationFactory()
{ }
-QStringList DeployConfigurationFactory::availableCreationIds(Target *parent) const
+QList<Core::Id> DeployConfigurationFactory::availableCreationIds(Target *parent) const
{
Q_UNUSED(parent);
- return QStringList() << QLatin1String(Constants::DEFAULT_DEPLOYCONFIGURATION_ID);
+ return QList<Core::Id>() << Core::Id(Constants::DEFAULT_DEPLOYCONFIGURATION_ID);
}
-QString DeployConfigurationFactory::displayNameForId(const QString &id) const
+QString DeployConfigurationFactory::displayNameForId(Core::Id id) const
{
- if (id == QLatin1String(Constants::DEFAULT_DEPLOYCONFIGURATION_ID))
+ if (id == Core::Id(Constants::DEFAULT_DEPLOYCONFIGURATION_ID))
//: Display name of the default deploy configuration
return tr("Deploy Configuration");
return QString();
}
-bool DeployConfigurationFactory::canCreate(Target *parent, const QString &id) const
+bool DeployConfigurationFactory::canCreate(Target *parent, Core::Id id) const
{
Q_UNUSED(parent);
- return id == QLatin1String(Constants::DEFAULT_DEPLOYCONFIGURATION_ID);
+ return id == Core::Id(Constants::DEFAULT_DEPLOYCONFIGURATION_ID);
}
-DeployConfiguration *DeployConfigurationFactory::create(Target *parent, const QString &id)
+DeployConfiguration *DeployConfigurationFactory::create(Target *parent, Core::Id id)
{
if (!canCreate(parent, id))
return 0;
diff --git a/src/plugins/projectexplorer/deployconfiguration.h b/src/plugins/projectexplorer/deployconfiguration.h
index cc7bebf3d7..6b96cd7b0c 100644
--- a/src/plugins/projectexplorer/deployconfiguration.h
+++ b/src/plugins/projectexplorer/deployconfiguration.h
@@ -72,7 +72,7 @@ signals:
void enabledChanged();
protected:
- DeployConfiguration(Target *target, const QString &id);
+ DeployConfiguration(Target *target, const Core::Id id);
DeployConfiguration(Target *target, DeployConfiguration *source);
void cloneSteps(DeployConfiguration *source);
@@ -95,12 +95,12 @@ public:
virtual ~DeployConfigurationFactory();
// used to show the list of possible additons to a target, returns a list of types
- virtual QStringList availableCreationIds(Target *parent) const;
+ virtual QList<Core::Id> availableCreationIds(Target *parent) const;
// used to translate the types to names to display to the user
- virtual QString displayNameForId(const QString &id) const;
+ virtual QString displayNameForId(Core::Id id) const;
- virtual bool canCreate(Target *parent, const QString &id) const;
- virtual DeployConfiguration *create(Target *parent, const QString &id);
+ virtual bool canCreate(Target *parent, Core::Id id) const;
+ virtual DeployConfiguration *create(Target *parent, Core::Id id);
// used to recreate the runConfigurations when restoring settings
virtual bool canRestore(Target *parent, const QVariantMap &map) const;
virtual DeployConfiguration *restore(Target *parent, const QVariantMap &map);
diff --git a/src/plugins/projectexplorer/processstep.cpp b/src/plugins/projectexplorer/processstep.cpp
index 98049a2a3a..303e15c63a 100644
--- a/src/plugins/projectexplorer/processstep.cpp
+++ b/src/plugins/projectexplorer/processstep.cpp
@@ -55,12 +55,12 @@ const char PROCESS_ARGUMENTS_KEY[] = "ProjectExplorer.ProcessStep.Arguments";
}
ProcessStep::ProcessStep(BuildStepList *bsl) :
- AbstractProcessStep(bsl, QLatin1String(PROCESS_STEP_ID))
+ AbstractProcessStep(bsl, Core::Id(PROCESS_STEP_ID))
{
ctor();
}
-ProcessStep::ProcessStep(BuildStepList *bsl, const QString &id) :
+ProcessStep::ProcessStep(BuildStepList *bsl, const Core::Id id) :
AbstractProcessStep(bsl, id)
{
ctor();
@@ -179,13 +179,13 @@ ProcessStepFactory::~ProcessStepFactory()
{
}
-bool ProcessStepFactory::canCreate(BuildStepList *parent, const QString &id) const
+bool ProcessStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
Q_UNUSED(parent);
- return id == QLatin1String(PROCESS_STEP_ID);
+ return id == Core::Id(PROCESS_STEP_ID);
}
-BuildStep *ProcessStepFactory::create(BuildStepList *parent, const QString &id)
+BuildStep *ProcessStepFactory::create(BuildStepList *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -206,7 +206,7 @@ BuildStep *ProcessStepFactory::clone(BuildStepList *parent, BuildStep *bs)
bool ProcessStepFactory::canRestore(BuildStepList *parent, const QVariantMap &map) const
{
- QString id(ProjectExplorer::idFromMap(map));
+ Core::Id id = ProjectExplorer::idFromMap(map);
return canCreate(parent, id);
}
@@ -222,14 +222,14 @@ BuildStep *ProcessStepFactory::restore(BuildStepList *parent, const QVariantMap
return 0;
}
-QStringList ProcessStepFactory::availableCreationIds(BuildStepList *parent) const
+QList<Core::Id> ProcessStepFactory::availableCreationIds(BuildStepList *parent) const
{
Q_UNUSED(parent);
- return QStringList() << QLatin1String(PROCESS_STEP_ID);
+ return QList<Core::Id>() << Core::Id(PROCESS_STEP_ID);
}
-QString ProcessStepFactory::displayNameForId(const QString &id) const
+QString ProcessStepFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(PROCESS_STEP_ID))
+ if (id == Core::Id(PROCESS_STEP_ID))
return ProcessStep::tr("Custom Process Step", "item in combobox");
return QString();
}
diff --git a/src/plugins/projectexplorer/processstep.h b/src/plugins/projectexplorer/processstep.h
index 77c2e19f51..68a9cc7879 100644
--- a/src/plugins/projectexplorer/processstep.h
+++ b/src/plugins/projectexplorer/processstep.h
@@ -49,11 +49,11 @@ public:
ProcessStepFactory();
~ProcessStepFactory();
- virtual QStringList availableCreationIds(BuildStepList *parent) const;
- virtual QString displayNameForId(const QString &id) const;
+ virtual QList<Core::Id> availableCreationIds(BuildStepList *parent) const;
+ virtual QString displayNameForId(const Core::Id id) const;
- virtual bool canCreate(BuildStepList *parent, const QString &id) const;
- virtual BuildStep *create(BuildStepList *parent, const QString &id);
+ virtual bool canCreate(BuildStepList *parent, const Core::Id id) const;
+ virtual BuildStep *create(BuildStepList *parent, const Core::Id id);
virtual bool canRestore(BuildStepList *parent, const QVariantMap &map) const;
virtual BuildStep *restore(BuildStepList *parent, const QVariantMap &map);
virtual bool canClone(BuildStepList *parent, BuildStep *product) const;
@@ -87,7 +87,7 @@ public:
protected:
ProcessStep(BuildStepList *bsl, ProcessStep *bs);
- ProcessStep(BuildStepList *bsl, const QString &id);
+ ProcessStep(BuildStepList *bsl, const Core::Id id);
bool fromMap(const QVariantMap &map);
diff --git a/src/plugins/projectexplorer/project.cpp b/src/plugins/projectexplorer/project.cpp
index 46166a08aa..10b5229948 100644
--- a/src/plugins/projectexplorer/project.cpp
+++ b/src/plugins/projectexplorer/project.cpp
@@ -216,7 +216,7 @@ void Project::setActiveTarget(Target *target)
}
}
-Target *Project::target(const QString &id) const
+Target *Project::target(Core::Id id) const
{
foreach (Target * target, d->m_targets) {
if (target->id() == id)
@@ -319,10 +319,10 @@ bool Project::fromMap(const QVariantMap &map)
Target *t = 0;
- const QString id = idFromMap(targetMap);
+ Core::Id id = idFromMap(targetMap);
if (target(id)) {
qWarning("Warning: Duplicated target id found, not restoring second target with id '%s'. Continuing.",
- qPrintable(id));
+ qPrintable(id.name()));
} else {
foreach (ITargetFactory *factory, factories) {
if (factory->canRestore(this, targetMap)) {
@@ -332,7 +332,7 @@ bool Project::fromMap(const QVariantMap &map)
}
if (!t) {
- qWarning("Warning: Unable to restore target '%s'. Continuing.", qPrintable(id));
+ qWarning("Warning: Unable to restore target '%s'. Continuing.", qPrintable(id.name()));
continue;
}
addTarget(t);
diff --git a/src/plugins/projectexplorer/project.h b/src/plugins/projectexplorer/project.h
index f0ec13f151..49d0aec07b 100644
--- a/src/plugins/projectexplorer/project.h
+++ b/src/plugins/projectexplorer/project.h
@@ -35,6 +35,8 @@
#include "projectexplorer_export.h"
+#include <coreplugin/id.h>
+
#include <QObject>
#include <QSet>
#include <QFileSystemModel>
@@ -70,7 +72,7 @@ public:
virtual ~Project();
virtual QString displayName() const = 0;
- virtual QString id() const = 0;
+ virtual Core::Id id() const = 0;
virtual Core::IDocument *document() const = 0;
virtual IProjectManager *projectManager() const = 0;
@@ -87,7 +89,7 @@ public:
// Note: activeTarget can be 0 (if no targets are defined).
Target *activeTarget() const;
void setActiveTarget(Target *target);
- Target *target(const QString &id) const;
+ Target *target(Core::Id id) const;
void saveSettings();
bool restoreSettings();
diff --git a/src/plugins/projectexplorer/projectconfiguration.cpp b/src/plugins/projectexplorer/projectconfiguration.cpp
index 592b28fc9b..78b3a05a25 100644
--- a/src/plugins/projectexplorer/projectconfiguration.cpp
+++ b/src/plugins/projectexplorer/projectconfiguration.cpp
@@ -38,12 +38,10 @@ const char CONFIGURATION_ID_KEY[] = "ProjectExplorer.ProjectConfiguration.Id";
const char DISPLAY_NAME_KEY[] = "ProjectExplorer.ProjectConfiguration.DisplayName";
const char DEFAULT_DISPLAY_NAME_KEY[] = "ProjectExplorer.ProjectConfiguration.DefaultDisplayName";
-ProjectConfiguration::ProjectConfiguration(QObject *parent, const QString &id) :
+ProjectConfiguration::ProjectConfiguration(QObject *parent, const Core::Id &id) :
QObject(parent),
m_id(id)
-{
- Q_ASSERT(!m_id.isEmpty());
-}
+{ }
ProjectConfiguration::ProjectConfiguration(QObject *parent, const ProjectConfiguration *source) :
QObject(parent),
@@ -57,7 +55,7 @@ ProjectConfiguration::ProjectConfiguration(QObject *parent, const ProjectConfigu
ProjectConfiguration::~ProjectConfiguration()
{ }
-QString ProjectConfiguration::id() const
+Core::Id ProjectConfiguration::id() const
{
return m_id;
}
@@ -99,7 +97,7 @@ bool ProjectConfiguration::usesDefaultDisplayName() const
QVariantMap ProjectConfiguration::toMap() const
{
QVariantMap map;
- map.insert(QLatin1String(CONFIGURATION_ID_KEY), m_id);
+ map.insert(QLatin1String(CONFIGURATION_ID_KEY), m_id.name());
map.insert(QLatin1String(DISPLAY_NAME_KEY), m_displayName);
map.insert(QLatin1String(DEFAULT_DISPLAY_NAME_KEY), m_defaultDisplayName);
return map;
@@ -107,17 +105,17 @@ QVariantMap ProjectConfiguration::toMap() const
bool ProjectConfiguration::fromMap(const QVariantMap &map)
{
- m_id = map.value(QLatin1String(CONFIGURATION_ID_KEY), QString()).toString();
+ m_id = Core::Id(map.value(QLatin1String(CONFIGURATION_ID_KEY), QByteArray()).toByteArray().constData());
m_displayName = map.value(QLatin1String(DISPLAY_NAME_KEY), QString()).toString();
m_defaultDisplayName = map.value(QLatin1String(DEFAULT_DISPLAY_NAME_KEY),
m_defaultDisplayName.isEmpty() ?
m_displayName : m_defaultDisplayName).toString();
- return !m_id.isEmpty();
+ return m_id.isValid();
}
-QString ProjectExplorer::idFromMap(const QVariantMap &map)
+Core::Id ProjectExplorer::idFromMap(const QVariantMap &map)
{
- return map.value(QLatin1String(CONFIGURATION_ID_KEY), QString()).toString();
+ return Core::Id(map.value(QLatin1String(CONFIGURATION_ID_KEY), QString()).toString());
}
QString ProjectExplorer::displayNameFromMap(const QVariantMap &map)
diff --git a/src/plugins/projectexplorer/projectconfiguration.h b/src/plugins/projectexplorer/projectconfiguration.h
index 5f44bda1f1..a135056a75 100644
--- a/src/plugins/projectexplorer/projectconfiguration.h
+++ b/src/plugins/projectexplorer/projectconfiguration.h
@@ -35,6 +35,8 @@
#include "projectexplorer_export.h"
+#include <coreplugin/id.h>
+
#include <QObject>
#include <QString>
#include <QVariantMap>
@@ -51,7 +53,7 @@ public:
// ctors are protected
virtual ~ProjectConfiguration();
- QString id() const;
+ Core::Id id() const;
QString displayName() const;
bool usesDefaultDisplayName() const;
@@ -68,17 +70,17 @@ signals:
void displayNameChanged();
protected:
- ProjectConfiguration(QObject *parent, const QString &id);
+ ProjectConfiguration(QObject *parent, const Core::Id &id);
ProjectConfiguration(QObject *parent, const ProjectConfiguration *source);
private:
- QString m_id;
+ Core::Id m_id;
QString m_displayName;
QString m_defaultDisplayName;
};
// helper functions:
-PROJECTEXPLORER_EXPORT QString idFromMap(const QVariantMap &map);
+PROJECTEXPLORER_EXPORT Core::Id idFromMap(const QVariantMap &map);
PROJECTEXPLORER_EXPORT QString displayNameFromMap(const QVariantMap &map);
} // namespace ProjectExplorer
diff --git a/src/plugins/projectexplorer/projectexplorer.cpp b/src/plugins/projectexplorer/projectexplorer.cpp
index 665d1f6b44..493e140d89 100644
--- a/src/plugins/projectexplorer/projectexplorer.cpp
+++ b/src/plugins/projectexplorer/projectexplorer.cpp
@@ -1804,31 +1804,33 @@ bool ProjectExplorerPlugin::saveModifiedFiles()
void ProjectExplorerPlugin::deploy(QList<Project *> projects)
{
- QStringList steps;
+ QList<Core::Id> steps;
if (d->m_projectExplorerSettings.buildBeforeDeploy)
- steps << QLatin1String(Constants::BUILDSTEPS_BUILD);
- steps << QLatin1String(Constants::BUILDSTEPS_DEPLOY);
+ steps << Core::Id(Constants::BUILDSTEPS_BUILD);
+ steps << Core::Id(Constants::BUILDSTEPS_DEPLOY);
queue(projects, steps);
}
-QString ProjectExplorerPlugin::displayNameForStepId(const QString &stepId)
+QString ProjectExplorerPlugin::displayNameForStepId(Core::Id stepId)
{
- if (stepId == QLatin1String(Constants::BUILDSTEPS_CLEAN))
+ if (stepId == Core::Id(Constants::BUILDSTEPS_CLEAN))
return tr("Clean");
- else if (stepId == QLatin1String(Constants::BUILDSTEPS_BUILD))
+ else if (stepId == Core::Id(Constants::BUILDSTEPS_BUILD))
return tr("Build");
- else if (stepId == QLatin1String(Constants::BUILDSTEPS_DEPLOY))
+ else if (stepId == Core::Id(Constants::BUILDSTEPS_DEPLOY))
return tr("Deploy");
return tr("Build");
}
-int ProjectExplorerPlugin::queue(QList<Project *> projects, QStringList stepIds)
+int ProjectExplorerPlugin::queue(QList<Project *> projects, QList<Core::Id> stepIds)
{
if (debug) {
- QStringList projectNames;
+ QStringList projectNames, stepNames;
foreach (const Project *p, projects)
projectNames << p->displayName();
- qDebug() << "Building" << stepIds << "for projects" << projectNames;
+ foreach (const Core::Id id, stepIds)
+ stepNames << id.name();
+ qDebug() << "Building" << stepNames << "for projects" << projectNames;
}
if (!saveModifiedFiles())
@@ -1842,12 +1844,12 @@ int ProjectExplorerPlugin::queue(QList<Project *> projects, QStringList stepIds)
if (pro && pro->needsConfiguration())
preambleMessage.append(tr("The project %1 is not configured, skipping it.\n")
.arg(pro->displayName()));
- foreach (const QString id, stepIds) {
+ foreach (Core::Id id, stepIds) {
foreach (Project *pro, projects) {
if (!pro || !pro->activeTarget())
continue;
BuildStepList *bsl = 0;
- if (id == Core::Id(Constants::BUILDSTEPS_DEPLOY).toString()
+ if (id == Core::Id(Constants::BUILDSTEPS_DEPLOY)
&& pro->activeTarget()->activeDeployConfiguration())
bsl = pro->activeTarget()->activeDeployConfiguration()->stepList();
else if (pro->activeTarget()->activeBuildConfiguration())
@@ -1870,13 +1872,13 @@ int ProjectExplorerPlugin::queue(QList<Project *> projects, QStringList stepIds)
void ProjectExplorerPlugin::buildProjectOnly()
{
- queue(QList<Project *>() << session()->startupProject(), QStringList(QLatin1String(Constants::BUILDSTEPS_BUILD)));
+ queue(QList<Project *>() << session()->startupProject(), QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_BUILD));
}
void ProjectExplorerPlugin::buildProject(ProjectExplorer::Project *p)
{
queue(d->m_session->projectOrder(p),
- QStringList(QLatin1String(Constants::BUILDSTEPS_BUILD)));
+ QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_BUILD));
}
void ProjectExplorerPlugin::requestProjectModeUpdate(Project *p)
@@ -1887,43 +1889,43 @@ void ProjectExplorerPlugin::requestProjectModeUpdate(Project *p)
void ProjectExplorerPlugin::buildProject()
{
queue(d->m_session->projectOrder(session()->startupProject()),
- QStringList(QLatin1String(Constants::BUILDSTEPS_BUILD)));
+ QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_BUILD));
}
void ProjectExplorerPlugin::buildProjectContextMenu()
{
queue(QList<Project *>() << d->m_currentProject,
- QStringList(QLatin1String(Constants::BUILDSTEPS_BUILD)));
+ QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_BUILD));
}
void ProjectExplorerPlugin::buildSession()
{
queue(d->m_session->projectOrder(),
- QStringList(QLatin1String(Constants::BUILDSTEPS_BUILD)));
+ QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_BUILD));
}
void ProjectExplorerPlugin::rebuildProjectOnly()
{
queue(QList<Project *>() << session()->startupProject(),
- QStringList() << QLatin1String(Constants::BUILDSTEPS_CLEAN) << QLatin1String(Constants::BUILDSTEPS_BUILD));
+ QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_CLEAN) << Core::Id(Constants::BUILDSTEPS_BUILD));
}
void ProjectExplorerPlugin::rebuildProject()
{
queue(d->m_session->projectOrder(session()->startupProject()),
- QStringList() << QLatin1String(Constants::BUILDSTEPS_CLEAN) << QLatin1String(Constants::BUILDSTEPS_BUILD));
+ QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_CLEAN) << Core::Id(Constants::BUILDSTEPS_BUILD));
}
void ProjectExplorerPlugin::rebuildProjectContextMenu()
{
queue(QList<Project *>() << d->m_currentProject,
- QStringList() << QLatin1String(Constants::BUILDSTEPS_CLEAN) << QLatin1String(Constants::BUILDSTEPS_BUILD));
+ QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_CLEAN) << Core::Id(Constants::BUILDSTEPS_BUILD));
}
void ProjectExplorerPlugin::rebuildSession()
{
queue(d->m_session->projectOrder(),
- QStringList() << QLatin1String(Constants::BUILDSTEPS_CLEAN) << QLatin1String(Constants::BUILDSTEPS_BUILD));
+ QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_CLEAN) << Core::Id(Constants::BUILDSTEPS_BUILD));
}
void ProjectExplorerPlugin::deployProjectOnly()
@@ -1949,25 +1951,25 @@ void ProjectExplorerPlugin::deploySession()
void ProjectExplorerPlugin::cleanProjectOnly()
{
queue(QList<Project *>() << session()->startupProject(),
- QStringList(QLatin1String(Constants::BUILDSTEPS_CLEAN)));
+ QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_CLEAN));
}
void ProjectExplorerPlugin::cleanProject()
{
queue(d->m_session->projectOrder(session()->startupProject()),
- QStringList(QLatin1String(Constants::BUILDSTEPS_CLEAN)));
+ QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_CLEAN));
}
void ProjectExplorerPlugin::cleanProjectContextMenu()
{
queue(QList<Project *>() << d->m_currentProject,
- QStringList(QLatin1String(Constants::BUILDSTEPS_CLEAN)));
+ QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_CLEAN));
}
void ProjectExplorerPlugin::cleanSession()
{
queue(d->m_session->projectOrder(),
- QStringList(QLatin1String(Constants::BUILDSTEPS_CLEAN)));
+ QList<Core::Id>() << Core::Id(Constants::BUILDSTEPS_CLEAN));
}
void ProjectExplorerPlugin::runProject()
@@ -2117,11 +2119,11 @@ void ProjectExplorerPlugin::runRunConfiguration(ProjectExplorer::RunConfiguratio
if (!rc->isEnabled())
return;
- QStringList stepIds;
+ QList<Core::Id> stepIds;
if (!forceSkipDeploy && d->m_projectExplorerSettings.deployBeforeRun) {
if (d->m_projectExplorerSettings.buildBeforeDeploy)
- stepIds << QLatin1String(Constants::BUILDSTEPS_BUILD);
- stepIds << QLatin1String(Constants::BUILDSTEPS_DEPLOY);
+ stepIds << Core::Id(Constants::BUILDSTEPS_BUILD);
+ stepIds << Core::Id(Constants::BUILDSTEPS_DEPLOY);
}
Project *pro = rc->target()->project();
diff --git a/src/plugins/projectexplorer/projectexplorer.h b/src/plugins/projectexplorer/projectexplorer.h
index 8fc5509cb6..2037050f8d 100644
--- a/src/plugins/projectexplorer/projectexplorer.h
+++ b/src/plugins/projectexplorer/projectexplorer.h
@@ -36,6 +36,7 @@
#include "projectexplorer_export.h"
#include "projectexplorerconstants.h"
+#include <coreplugin/id.h>
#include <extensionsystem/iplugin.h>
#include <QPair>
@@ -133,7 +134,7 @@ public:
QList<RunControl *> runControls() const;
- static QString displayNameForStepId(const QString &stepId);
+ static QString displayNameForStepId(Core::Id stepId);
signals:
void runControlStarted(ProjectExplorer::RunControl *rc);
@@ -267,7 +268,7 @@ private:
QString directoryFor(Node *node);
QString pathFor(Node *node);
void deploy(QList<Project *>);
- int queue(QList<Project *>, QStringList stepIds);
+ int queue(QList<Project *>, QList<Core::Id> stepIds);
void updateContextMenuActions();
bool parseArguments(const QStringList &arguments, QString *error);
void executeRunConfiguration(RunConfiguration *, RunMode mode);
diff --git a/src/plugins/projectexplorer/projectwindow.cpp b/src/plugins/projectexplorer/projectwindow.cpp
index 7cc11f8b42..78ed7c237d 100644
--- a/src/plugins/projectexplorer/projectwindow.cpp
+++ b/src/plugins/projectexplorer/projectwindow.cpp
@@ -313,7 +313,7 @@ bool ProjectWindow::useTargetPage(ProjectExplorer::Project *project)
return true;
int count = 0;
foreach (ITargetFactory *fac, ExtensionSystem::PluginManager::instance()->getObjects<ITargetFactory>()) {
- foreach (const QString &targetId, fac->supportedTargetIds()) {
+ foreach (Core::Id targetId, fac->supportedTargetIds()) {
if (fac->canCreate(project, targetId))
++count;
if (count > 1)
diff --git a/src/plugins/projectexplorer/runconfiguration.cpp b/src/plugins/projectexplorer/runconfiguration.cpp
index a7649cf5b0..5d4038d70a 100644
--- a/src/plugins/projectexplorer/runconfiguration.cpp
+++ b/src/plugins/projectexplorer/runconfiguration.cpp
@@ -90,7 +90,7 @@ private:
class CreateMatcher : public RunConfigurationFactoryMatcher
{
public:
- CreateMatcher(Target *target, const QString &id) :
+ CreateMatcher(Target *target, Core::Id id) :
RunConfigurationFactoryMatcher(target),
m_id(id)
{ }
@@ -101,7 +101,7 @@ public:
}
private:
- QString m_id;
+ Core::Id m_id;
};
class CloneMatcher : public RunConfigurationFactoryMatcher
@@ -362,7 +362,7 @@ void DebuggerRunConfigurationAspect::fromMap(const QVariantMap &map)
for a target, but still be runnable via the output tab.
*/
-RunConfiguration::RunConfiguration(Target *target, const QString &id) :
+RunConfiguration::RunConfiguration(Target *target, const Core::Id id) :
ProjectConfiguration(target, id),
m_debuggerAspect(new DebuggerRunConfigurationAspect(this))
{
@@ -518,7 +518,7 @@ IRunConfigurationFactory::~IRunConfigurationFactory()
{
}
-IRunConfigurationFactory *IRunConfigurationFactory::createFactory(Target *parent, const QString &id)
+IRunConfigurationFactory *IRunConfigurationFactory::createFactory(Target *parent, const Core::Id id)
{
CreateMatcher matcher(parent, id);
return findRunConfigurationFactory(matcher);
diff --git a/src/plugins/projectexplorer/runconfiguration.h b/src/plugins/projectexplorer/runconfiguration.h
index 978f01b99a..19667451c2 100644
--- a/src/plugins/projectexplorer/runconfiguration.h
+++ b/src/plugins/projectexplorer/runconfiguration.h
@@ -181,7 +181,7 @@ signals:
void enabledChanged();
protected:
- RunConfiguration(Target *parent, const QString &id);
+ RunConfiguration(Target *parent, const Core::Id id);
RunConfiguration(Target *parent, RunConfiguration *source);
/// convenience method to get current build configuration.
@@ -202,17 +202,17 @@ public:
explicit IRunConfigurationFactory(QObject *parent = 0);
virtual ~IRunConfigurationFactory();
- virtual QStringList availableCreationIds(Target *parent) const = 0;
- virtual QString displayNameForId(const QString &id) const = 0;
+ virtual QList<Core::Id> availableCreationIds(Target *parent) const = 0;
+ virtual QString displayNameForId(const Core::Id id) const = 0;
- virtual bool canCreate(Target *parent, const QString &id) const = 0;
- virtual RunConfiguration *create(Target *parent, const QString &id) = 0;
+ virtual bool canCreate(Target *parent, const Core::Id id) const = 0;
+ virtual RunConfiguration *create(Target *parent, const Core::Id id) = 0;
virtual bool canRestore(Target *parent, const QVariantMap &map) const = 0;
virtual RunConfiguration *restore(Target *parent, const QVariantMap &map) = 0;
virtual bool canClone(Target *parent, RunConfiguration *product) const = 0;
virtual RunConfiguration *clone(Target *parent, RunConfiguration *product) = 0;
- static IRunConfigurationFactory *createFactory(Target *parent, const QString &id);
+ static IRunConfigurationFactory *createFactory(Target *parent, const Core::Id id);
static IRunConfigurationFactory *cloneFactory(Target *parent, RunConfiguration *source);
static IRunConfigurationFactory *restoreFactory(Target *parent, const QVariantMap &map);
diff --git a/src/plugins/projectexplorer/runsettingspropertiespage.cpp b/src/plugins/projectexplorer/runsettingspropertiespage.cpp
index e550c68a33..c771b8fe7b 100644
--- a/src/plugins/projectexplorer/runsettingspropertiespage.cpp
+++ b/src/plugins/projectexplorer/runsettingspropertiespage.cpp
@@ -67,7 +67,7 @@ namespace Internal {
struct FactoryAndId
{
ProjectExplorer::IRunConfigurationFactory *factory;
- QString id;
+ Core::Id id;
};
@@ -268,8 +268,8 @@ void RunSettingsWidget::aboutToShowAddMenu()
QList<IRunConfigurationFactory *> factories =
ExtensionSystem::PluginManager::instance()->getObjects<IRunConfigurationFactory>();
foreach (IRunConfigurationFactory *factory, factories) {
- QStringList ids = factory->availableCreationIds(m_target);
- foreach (const QString &id, ids) {
+ QList<Core::Id> ids = factory->availableCreationIds(m_target);
+ foreach (Core::Id id, ids) {
QAction *action = m_addRunMenu->addAction(factory->displayNameForId(id));;
FactoryAndId fai;
fai.factory = factory;
@@ -370,10 +370,10 @@ void RunSettingsWidget::currentDeployConfigurationChanged(int index)
void RunSettingsWidget::aboutToShowDeployMenu()
{
m_addDeployMenu->clear();
- QStringList ids = m_target->availableDeployConfigurationIds();
- foreach (const QString &id, ids) {
+ QList<Core::Id> ids = m_target->availableDeployConfigurationIds();
+ foreach (Core::Id id, ids) {
QAction *action = m_addDeployMenu->addAction(m_target->displayNameForDeployConfigurationId(id));
- action->setData(QVariant(id));
+ action->setData(QVariant::fromValue(id));
connect(action, SIGNAL(triggered()),
this, SLOT(addDeployConfiguration()));
}
@@ -384,7 +384,7 @@ void RunSettingsWidget::addDeployConfiguration()
QAction *act = qobject_cast<QAction *>(sender());
if (!act)
return;
- QString id = act->data().toString();
+ Core::Id id = act->data().value<Core::Id>();
DeployConfiguration *newDc = m_target->createDeployConfiguration(id);
if (!newDc)
return;
diff --git a/src/plugins/projectexplorer/settingsaccessor.cpp b/src/plugins/projectexplorer/settingsaccessor.cpp
index 970a7c8c33..d19eadf5f8 100644
--- a/src/plugins/projectexplorer/settingsaccessor.cpp
+++ b/src/plugins/projectexplorer/settingsaccessor.cpp
@@ -907,11 +907,11 @@ QVariantMap Version0Handler::convertBuildConfigurations(Project *project, const
// Find a valid Id to use:
QString id;
- if (project->id() == QLatin1String("GenericProjectManager.GenericProject")) {
+ if (project->id() == Core::Id("GenericProjectManager.GenericProject")) {
id = QLatin1String("GenericProjectManager.GenericBuildConfiguration");
- } else if (project->id() == QLatin1String("CMakeProjectManager.CMakeProject")) {
+ } else if (project->id() == Core::Id("CMakeProjectManager.CMakeProject")) {
id = QLatin1String("CMakeProjectManager.CMakeBuildConfiguration");
- } else if (project->id() == QLatin1String("Qt4ProjectManager.Qt4Project")) {
+ } else if (project->id() == Core::Id("Qt4ProjectManager.Qt4Project")) {
result.insert(QLatin1String("Qt4ProjectManager.Qt4BuildConfiguration.NeedsV0Update"), QVariant());
id = QLatin1String("Qt4ProjectManager.Qt4BuildConfiguration");
} else {
@@ -1355,17 +1355,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() == QLatin1String("GenericProjectManager.GenericProject"))
+ if (project->id() == Core::Id("GenericProjectManager.GenericProject"))
targets << TargetDescription(QString::fromLatin1("GenericProjectManager.GenericTarget"),
QCoreApplication::translate("GenericProjectManager::GenericTarget",
"Desktop",
"Generic desktop target display name"));
- else if (project->id() == QLatin1String("CMakeProjectManager.CMakeProject"))
+ else if (project->id() == Core::Id("CMakeProjectManager.CMakeProject"))
targets << TargetDescription(QString::fromLatin1("CMakeProjectManager.DefaultCMakeTarget"),
QCoreApplication::translate("CMakeProjectManager::Internal::CMakeTarget",
"Desktop",
"CMake Default target display name"));
- else if (project->id() == QLatin1String("Qt4ProjectManager.Qt4Project"))
+ else if (project->id() == Core::Id("Qt4ProjectManager.Qt4Project"))
targets << TargetDescription(QString::fromLatin1("Qt4ProjectManager.Target.DesktopTarget"),
QCoreApplication::translate("Qt4ProjectManager::Internal::Qt4Target",
"Desktop",
@@ -1386,7 +1386,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() == QLatin1String("QmlProjectManager.QmlProject"))
+ else if (project->id() == Core::Id("QmlProjectManager.QmlProject"))
targets << TargetDescription(QString::fromLatin1("QmlProjectManager.QmlTarget"),
QCoreApplication::translate("QmlProjectManager::QmlTarget",
"QML Viewer",
diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp
index 2bd8e9e36b..b7c3c84239 100644
--- a/src/plugins/projectexplorer/target.cpp
+++ b/src/plugins/projectexplorer/target.cpp
@@ -112,8 +112,9 @@ QList<DeployConfigurationFactory *> TargetPrivate::deployFactories() const
}
-Target::Target(Project *project, const QString &id) :
- ProjectConfiguration(project, id), d(new TargetPrivate)
+Target::Target(Project *project, const Core::Id id) :
+ ProjectConfiguration(project, id),
+ d(new TargetPrivate)
{
connect(DeviceManager::instance(), SIGNAL(deviceUpdated(Core::Id)),
this, SLOT(updateDeviceState(Core::Id)));
@@ -328,15 +329,15 @@ void Target::setActiveDeployConfiguration(DeployConfiguration *dc)
updateDeviceState();
}
-QStringList Target::availableDeployConfigurationIds()
+QList<Core::Id> Target::availableDeployConfigurationIds()
{
- QStringList ids;
+ QList<Core::Id> ids;
foreach (const DeployConfigurationFactory * const factory, d->deployFactories())
ids << factory->availableCreationIds(this);
return ids;
}
-QString Target::displayNameForDeployConfigurationId(const QString &id)
+QString Target::displayNameForDeployConfigurationId(Core::Id &id)
{
foreach (const DeployConfigurationFactory * const factory, d->deployFactories()) {
if (factory->availableCreationIds(this).contains(id))
@@ -345,7 +346,7 @@ QString Target::displayNameForDeployConfigurationId(const QString &id)
return QString();
}
-DeployConfiguration *Target::createDeployConfiguration(const QString &id)
+DeployConfiguration *Target::createDeployConfiguration(Core::Id id)
{
foreach (DeployConfigurationFactory * const factory, d->deployFactories()) {
if (factory->canCreate(this, id))
@@ -459,7 +460,7 @@ QList<ToolChain *> Target::possibleToolChains(BuildConfiguration *) const
QList<ToolChain *> tcList = ToolChainManager::instance()->toolChains();
QList<ToolChain *> result;
foreach (ToolChain *tc, tcList) {
- QStringList restricted = tc->restrictedToTargets();
+ QList<Core::Id> restricted = tc->restrictedToTargets();
if (restricted.isEmpty() || restricted.contains(id()))
result.append(tc);
}
diff --git a/src/plugins/projectexplorer/target.h b/src/plugins/projectexplorer/target.h
index 743025ce62..f8e1b584d0 100644
--- a/src/plugins/projectexplorer/target.h
+++ b/src/plugins/projectexplorer/target.h
@@ -82,9 +82,9 @@ public:
DeployConfiguration *activeDeployConfiguration() const;
void setActiveDeployConfiguration(DeployConfiguration *configuration);
- QStringList availableDeployConfigurationIds();
- QString displayNameForDeployConfigurationId(const QString &id);
- DeployConfiguration *createDeployConfiguration(const QString &id);
+ QList<Core::Id> availableDeployConfigurationIds();
+ QString displayNameForDeployConfigurationId(Core::Id &id);
+ DeployConfiguration *createDeployConfiguration(Core::Id id);
// Running
QList<RunConfiguration *> runConfigurations() const;
@@ -144,7 +144,7 @@ signals:
void runConfigurationEnabledChanged();
protected:
- Target(Project *parent, const QString &id);
+ Target(Project *parent, const Core::Id id);
virtual ProjectExplorer::IDevice::ConstPtr currentDevice() const;
@@ -172,14 +172,14 @@ class PROJECTEXPLORER_EXPORT ITargetFactory :
public:
explicit ITargetFactory(QObject *parent = 0);
- virtual QStringList supportedTargetIds() const = 0;
- virtual bool supportsTargetId(const QString &id) const = 0;
+ virtual QList<Core::Id> supportedTargetIds() const = 0;
+ virtual bool supportsTargetId(const Core::Id id) const = 0;
// used to translate the types to names to display to the user
- virtual QString displayNameForId(const QString &id) const = 0;
+ virtual QString displayNameForId(const Core::Id id) const = 0;
- virtual bool canCreate(Project *parent, const QString &id) const = 0;
- virtual Target *create(Project *parent, const QString &id) = 0;
+ virtual bool canCreate(Project *parent, const Core::Id id) const = 0;
+ virtual Target *create(Project *parent, const Core::Id id) = 0;
virtual bool canRestore(Project *parent, const QVariantMap &map) const = 0;
virtual Target *restore(Project *parent, const QVariantMap &map) = 0;
diff --git a/src/plugins/projectexplorer/targetsettingspanel.cpp b/src/plugins/projectexplorer/targetsettingspanel.cpp
index 40d9f21176..202489e776 100644
--- a/src/plugins/projectexplorer/targetsettingspanel.cpp
+++ b/src/plugins/projectexplorer/targetsettingspanel.cpp
@@ -213,7 +213,7 @@ void TargetSettingsPanelWidget::currentTargetChanged(int targetIndex, int subInd
void TargetSettingsPanelWidget::addTarget(QAction *action)
{
- QString id = action->data().toString();
+ Core::Id id = action->data().value<Core::Id>();
Q_ASSERT(!m_project->target(id));
QList<ITargetFactory *> factories =
ExtensionSystem::PluginManager::instance()->getObjects<ITargetFactory>();
@@ -316,14 +316,14 @@ void TargetSettingsPanelWidget::updateTargetAddAndRemoveButtons()
ExtensionSystem::PluginManager::instance()->getObjects<ITargetFactory>();
foreach (ITargetFactory *fac, factories) {
- foreach (const QString &id, fac->supportedTargetIds()) {
+ foreach (Core::Id id, fac->supportedTargetIds()) {
if (m_project->target(id))
continue;
if (!fac->canCreate(m_project, id))
continue;
QString displayName = fac->displayNameForId(id);
QAction *action = new QAction(displayName, m_addMenu);
- action->setData(QVariant(id));
+ action->setData(QVariant::fromValue(id));
bool added = false;
foreach (QAction *existing, m_addMenu->actions()) {
if (existing->text() > action->text()) {
diff --git a/src/plugins/projectexplorer/toolchain.cpp b/src/plugins/projectexplorer/toolchain.cpp
index d47455869c..75eeb0baea 100644
--- a/src/plugins/projectexplorer/toolchain.cpp
+++ b/src/plugins/projectexplorer/toolchain.cpp
@@ -156,9 +156,9 @@ QString ToolChain::id() const
An empty list is shows that the toolchain is compatible with all targets.
*/
-QStringList ToolChain::restrictedToTargets() const
+QList<Core::Id> ToolChain::restrictedToTargets() const
{
- return QStringList();
+ return QList<Core::Id>();
}
QList<Utils::FileName> ToolChain::mkspecList() const
diff --git a/src/plugins/projectexplorer/toolchain.h b/src/plugins/projectexplorer/toolchain.h
index e78ee04896..31211acc7d 100644
--- a/src/plugins/projectexplorer/toolchain.h
+++ b/src/plugins/projectexplorer/toolchain.h
@@ -36,6 +36,7 @@
#include "projectexplorer_export.h"
#include "headerpath.h"
+#include <coreplugin/id.h>
#include <utils/fileutils.h>
#include <QObject>
@@ -81,7 +82,7 @@ public:
virtual bool isValid() const = 0;
- virtual QStringList restrictedToTargets() const;
+ virtual QList<Core::Id> restrictedToTargets() const;
virtual QByteArray predefinedMacros(const QStringList &cxxflags) const = 0;
diff --git a/src/plugins/qmlprojectmanager/qmlproject.cpp b/src/plugins/qmlprojectmanager/qmlproject.cpp
index 69cfa24d39..0e91df1d7e 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.cpp
+++ b/src/plugins/qmlprojectmanager/qmlproject.cpp
@@ -258,9 +258,9 @@ QString QmlProject::displayName() const
return m_projectName;
}
-QString QmlProject::id() const
+Core::Id QmlProject::id() const
{
- return QLatin1String("QmlProjectManager.QmlProject");
+ return Core::Id("QmlProjectManager.QmlProject");
}
Core::IDocument *QmlProject::document() const
@@ -301,7 +301,7 @@ bool QmlProject::fromMap(const QVariantMap &map)
if (targets().isEmpty()) {
Internal::QmlProjectTargetFactory *factory
= ExtensionSystem::PluginManager::instance()->getObject<Internal::QmlProjectTargetFactory>();
- Internal::QmlProjectTarget *target = factory->create(this, QLatin1String(Constants::QML_VIEWER_TARGET_ID));
+ Internal::QmlProjectTarget *target = factory->create(this, Core::Id(Constants::QML_VIEWER_TARGET_ID));
addTarget(target);
}
diff --git a/src/plugins/qmlprojectmanager/qmlproject.h b/src/plugins/qmlprojectmanager/qmlproject.h
index 2c35a7b835..94af81d2ce 100644
--- a/src/plugins/qmlprojectmanager/qmlproject.h
+++ b/src/plugins/qmlprojectmanager/qmlproject.h
@@ -69,7 +69,7 @@ public:
QString filesFileName() const;
QString displayName() const;
- QString id() const;
+ Core::Id id() const;
Core::IDocument *document() const;
ProjectExplorer::IProjectManager *projectManager() const;
Internal::QmlProjectTarget *activeTarget() const;
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
index 8f18d89e9c..2cc2b17743 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfiguration.cpp
@@ -61,7 +61,7 @@ namespace QmlProjectManager {
const char * const M_CURRENT_FILE = "CurrentFile";
QmlProjectRunConfiguration::QmlProjectRunConfiguration(QmlProjectTarget *parent) :
- ProjectExplorer::RunConfiguration(parent, QLatin1String(Constants::QML_RC_ID)),
+ ProjectExplorer::RunConfiguration(parent, Core::Id(Constants::QML_RC_ID)),
m_qtVersionId(-1),
m_scriptFile(M_CURRENT_FILE),
m_projectTarget(parent),
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp b/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp
index 1de0d9fbcd..877cacf0ed 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.cpp
@@ -50,28 +50,28 @@ QmlProjectRunConfigurationFactory::~QmlProjectRunConfigurationFactory()
{
}
-QStringList QmlProjectRunConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
+QList<Core::Id> QmlProjectRunConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
{
if (!qobject_cast<QmlProjectTarget *>(parent))
- return QStringList();
- return QStringList() << QLatin1String(Constants::QML_RC_ID);
+ return QList<Core::Id>();
+ return QList<Core::Id>() << Core::Id(Constants::QML_RC_ID);
}
-QString QmlProjectRunConfigurationFactory::displayNameForId(const QString &id) const
+QString QmlProjectRunConfigurationFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(Constants::QML_RC_ID))
+ if (id == Core::Id(Constants::QML_RC_ID))
return tr("Run QML Script");
return QString();
}
-bool QmlProjectRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const QString &id) const
+bool QmlProjectRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const
{
if (!qobject_cast<QmlProjectTarget *>(parent))
return false;
- return id == QLatin1String(Constants::QML_RC_ID);
+ return id == Core::Id(Constants::QML_RC_ID);
}
-ProjectExplorer::RunConfiguration *QmlProjectRunConfigurationFactory::create(ProjectExplorer::Target *parent, const QString &id)
+ProjectExplorer::RunConfiguration *QmlProjectRunConfigurationFactory::create(ProjectExplorer::Target *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -81,8 +81,7 @@ ProjectExplorer::RunConfiguration *QmlProjectRunConfigurationFactory::create(Pro
bool QmlProjectRunConfigurationFactory::canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const
{
- QString id = ProjectExplorer::idFromMap(map);
- return canCreate(parent, id);
+ return canCreate(parent, ProjectExplorer::idFromMap(map));
}
ProjectExplorer::RunConfiguration *QmlProjectRunConfigurationFactory::restore(ProjectExplorer::Target *parent, const QVariantMap &map)
diff --git a/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.h b/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.h
index 420706be42..ee2e615dea 100644
--- a/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.h
+++ b/src/plugins/qmlprojectmanager/qmlprojectrunconfigurationfactory.h
@@ -46,11 +46,11 @@ public:
explicit QmlProjectRunConfigurationFactory(QObject *parent = 0);
~QmlProjectRunConfigurationFactory();
- QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
+ ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
ProjectExplorer::RunConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source) const;
diff --git a/src/plugins/qmlprojectmanager/qmlprojecttarget.cpp b/src/plugins/qmlprojectmanager/qmlprojecttarget.cpp
index 68b874ba71..c520131433 100644
--- a/src/plugins/qmlprojectmanager/qmlprojecttarget.cpp
+++ b/src/plugins/qmlprojectmanager/qmlprojecttarget.cpp
@@ -44,7 +44,7 @@ namespace QmlProjectManager {
namespace Internal {
QmlProjectTarget::QmlProjectTarget(QmlProject *parent) :
- ProjectExplorer::Target(parent, QLatin1String(Constants::QML_VIEWER_TARGET_ID))
+ ProjectExplorer::Target(parent, Core::Id(Constants::QML_VIEWER_TARGET_ID))
{
setDisplayName(QApplication::translate("QmlProjectManager::QmlTarget",
Constants::QML_VIEWER_TARGET_DISPLAY_NAME,
@@ -97,33 +97,33 @@ QmlProjectTargetFactory::~QmlProjectTargetFactory()
{
}
-bool QmlProjectTargetFactory::supportsTargetId(const QString &id) const
+bool QmlProjectTargetFactory::supportsTargetId(const Core::Id id) const
{
- return id == QLatin1String(Constants::QML_VIEWER_TARGET_ID);
+ return id == Core::Id(Constants::QML_VIEWER_TARGET_ID);
}
-QStringList QmlProjectTargetFactory::supportedTargetIds() const
+QList<Core::Id> QmlProjectTargetFactory::supportedTargetIds() const
{
- return QStringList() << QLatin1String(Constants::QML_VIEWER_TARGET_ID);
+ return QList<Core::Id>() << Core::Id(Constants::QML_VIEWER_TARGET_ID);
}
-QString QmlProjectTargetFactory::displayNameForId(const QString &id) const
+QString QmlProjectTargetFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(Constants::QML_VIEWER_TARGET_ID))
+ if (id == Core::Id(Constants::QML_VIEWER_TARGET_ID))
return QCoreApplication::translate("QmlProjectManager::QmlTarget",
Constants::QML_VIEWER_TARGET_DISPLAY_NAME,
"QML Viewer target display name");
return QString();
}
-bool QmlProjectTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
+bool QmlProjectTargetFactory::canCreate(ProjectExplorer::Project *parent, const Core::Id id) const
{
if (!qobject_cast<QmlProject *>(parent))
return false;
- return id == QLatin1String(Constants::QML_VIEWER_TARGET_ID);
+ return id == Core::Id(Constants::QML_VIEWER_TARGET_ID);
}
-QmlProjectTarget *QmlProjectTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
+QmlProjectTarget *QmlProjectTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
diff --git a/src/plugins/qmlprojectmanager/qmlprojecttarget.h b/src/plugins/qmlprojectmanager/qmlprojecttarget.h
index fed3f969cc..7359bb81fd 100644
--- a/src/plugins/qmlprojectmanager/qmlprojecttarget.h
+++ b/src/plugins/qmlprojectmanager/qmlprojecttarget.h
@@ -73,12 +73,12 @@ public:
explicit QmlProjectTargetFactory(QObject *parent = 0);
~QmlProjectTargetFactory();
- bool supportsTargetId(const QString &id) const;
- QStringList supportedTargetIds() const;
- QString displayNameForId(const QString &id) const;
+ bool supportsTargetId(const Core::Id id) const;
+ QList<Core::Id> supportedTargetIds() const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
- QmlProjectTarget *create(ProjectExplorer::Project *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Project *parent, const Core::Id id) const;
+ QmlProjectTarget *create(ProjectExplorer::Project *parent, const Core::Id id);
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
QmlProjectTarget *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
};
diff --git a/src/plugins/qt4projectmanager/buildconfigurationinfo.h b/src/plugins/qt4projectmanager/buildconfigurationinfo.h
index bc0f3a2859..3deb409c6e 100644
--- a/src/plugins/qt4projectmanager/buildconfigurationinfo.h
+++ b/src/plugins/qt4projectmanager/buildconfigurationinfo.h
@@ -81,7 +81,7 @@ struct QT4PROJECTMANAGER_EXPORT BuildConfigurationInfo {
static QList<BuildConfigurationInfo> importBuildConfigurations(const QString &proFilePath);
static QList<BuildConfigurationInfo> checkForBuild(const QString &directory, const QString &proFilePath);
- static QList<BuildConfigurationInfo> filterBuildConfigurationInfos(const QList<BuildConfigurationInfo> &infos, const QString &id);
+ static QList<BuildConfigurationInfo> filterBuildConfigurationInfos(const QList<BuildConfigurationInfo> &infos, Core::Id id);
static QList<BuildConfigurationInfo> filterBuildConfigurationInfos(const QList<BuildConfigurationInfo> &infos, Core::FeatureSet features);
static QList<BuildConfigurationInfo> filterBuildConfigurationInfosByPlatform(const QList<BuildConfigurationInfo> &infos, const QString &platform);
};
diff --git a/src/plugins/qt4projectmanager/makestep.cpp b/src/plugins/qt4projectmanager/makestep.cpp
index 4b5a05596c..692902c399 100644
--- a/src/plugins/qt4projectmanager/makestep.cpp
+++ b/src/plugins/qt4projectmanager/makestep.cpp
@@ -63,7 +63,7 @@ const char * const CLEAN_KEY("Qt4ProjectManager.MakeStep.Clean");
}
MakeStep::MakeStep(ProjectExplorer::BuildStepList *bsl) :
- AbstractProcessStep(bsl, QLatin1String(MAKESTEP_BS_ID)),
+ AbstractProcessStep(bsl, Core::Id(MAKESTEP_BS_ID)),
m_clean(false)
{
ctor();
@@ -78,7 +78,7 @@ MakeStep::MakeStep(ProjectExplorer::BuildStepList *bsl, MakeStep *bs) :
ctor();
}
-MakeStep::MakeStep(ProjectExplorer::BuildStepList *bsl, const QString &id) :
+MakeStep::MakeStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id) :
AbstractProcessStep(bsl, id),
m_clean(false)
{
@@ -497,19 +497,19 @@ MakeStepFactory::~MakeStepFactory()
{
}
-bool MakeStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const
+bool MakeStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
{
- if (parent->target()->project()->id() != QLatin1String(Constants::QT4PROJECT_ID))
+ if (parent->target()->project()->id() != Core::Id(Constants::QT4PROJECT_ID))
return false;
- return (id == QLatin1String(MAKESTEP_BS_ID));
+ return (id == Core::Id(MAKESTEP_BS_ID));
}
-ProjectExplorer::BuildStep *MakeStepFactory::create(ProjectExplorer::BuildStepList *parent, const QString &id)
+ProjectExplorer::BuildStep *MakeStepFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
MakeStep *step = new MakeStep(parent);
- if (parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)) {
+ if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN)) {
step->setClean(true);
step->setUserArguments(QLatin1String("clean"));
}
@@ -530,8 +530,7 @@ ProjectExplorer::BuildStep *MakeStepFactory::clone(ProjectExplorer::BuildStepLis
bool MakeStepFactory::canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const
{
- QString id(ProjectExplorer::idFromMap(map));
- return canCreate(parent, id);
+ return canCreate(parent, ProjectExplorer::idFromMap(map));
}
ProjectExplorer::BuildStep *MakeStepFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map)
@@ -545,16 +544,16 @@ ProjectExplorer::BuildStep *MakeStepFactory::restore(ProjectExplorer::BuildStepL
return 0;
}
-QStringList MakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
+QList<Core::Id> MakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
- if (parent->target()->project()->id() == QLatin1String(Constants::QT4PROJECT_ID))
- return QStringList() << QLatin1String(MAKESTEP_BS_ID);
- return QStringList();
+ if (parent->target()->project()->id() == Core::Id(Constants::QT4PROJECT_ID))
+ return QList<Core::Id>() << Core::Id(MAKESTEP_BS_ID);
+ return QList<Core::Id>();
}
-QString MakeStepFactory::displayNameForId(const QString &id) const
+QString MakeStepFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(MAKESTEP_BS_ID))
+ if (id == Core::Id(MAKESTEP_BS_ID))
return tr("Make");
return QString();
}
diff --git a/src/plugins/qt4projectmanager/makestep.h b/src/plugins/qt4projectmanager/makestep.h
index 6031ae1ac9..083b9579d7 100644
--- a/src/plugins/qt4projectmanager/makestep.h
+++ b/src/plugins/qt4projectmanager/makestep.h
@@ -62,15 +62,15 @@ public:
explicit MakeStepFactory(QObject *parent = 0);
virtual ~MakeStepFactory();
- bool canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source);
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
- QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
+ QString displayNameForId(const Core::Id id) const;
};
} //namespace Internal
@@ -107,7 +107,7 @@ signals:
protected:
MakeStep(ProjectExplorer::BuildStepList *bsl, MakeStep *bs);
- MakeStep(ProjectExplorer::BuildStepList *bsl, const QString &id);
+ MakeStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
virtual bool fromMap(const QVariantMap &map);
private:
diff --git a/src/plugins/qt4projectmanager/qmakestep.cpp b/src/plugins/qt4projectmanager/qmakestep.cpp
index 8c6c153857..9e8b3569aa 100644
--- a/src/plugins/qt4projectmanager/qmakestep.cpp
+++ b/src/plugins/qt4projectmanager/qmakestep.cpp
@@ -77,7 +77,7 @@ const char * const QMAKE_QMLDEBUGLIB_KEY("QtProjectManager.QMakeBuildStep.LinkQm
}
QMakeStep::QMakeStep(BuildStepList *bsl) :
- AbstractProcessStep(bsl, QLatin1String(QMAKE_BS_ID)),
+ AbstractProcessStep(bsl, Core::Id(QMAKE_BS_ID)),
m_forced(false),
m_needToRunQMake(false),
m_linkQmlDebuggingLibrary(DebugLink)
@@ -85,7 +85,7 @@ QMakeStep::QMakeStep(BuildStepList *bsl) :
ctor();
}
-QMakeStep::QMakeStep(BuildStepList *bsl, const QString &id) :
+QMakeStep::QMakeStep(BuildStepList *bsl, const Core::Id id) :
AbstractProcessStep(bsl, id),
m_forced(false),
m_linkQmlDebuggingLibrary(DebugLink)
@@ -741,8 +741,8 @@ void QMakeStepConfigWidget::recompileMessageBoxFinished(int button)
return;
QList<ProjectExplorer::BuildStepList *> stepLists;
- const QString clean = QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
- const QString build = QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
+ const Core::Id clean = Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
+ const Core::Id build = Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
stepLists << bc->stepList(clean) << bc->stepList(build);
ProjectExplorer::BuildManager *bm = ProjectExplorerPlugin::instance()->buildManager();
bm->buildLists(stepLists, QStringList() << ProjectExplorerPlugin::displayNameForStepId(clean)
@@ -779,16 +779,16 @@ QMakeStepFactory::~QMakeStepFactory()
{
}
-bool QMakeStepFactory::canCreate(BuildStepList *parent, const QString &id) const
+bool QMakeStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
- if (parent->id() != QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
+ if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
return false;
if (!qobject_cast<Qt4BuildConfiguration *>(parent->parent()))
return false;
- return (id == QLatin1String(QMAKE_BS_ID));
+ return (id == Core::Id(QMAKE_BS_ID));
}
-ProjectExplorer::BuildStep *QMakeStepFactory::create(BuildStepList *parent, const QString &id)
+ProjectExplorer::BuildStep *QMakeStepFactory::create(BuildStepList *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -809,8 +809,7 @@ ProjectExplorer::BuildStep *QMakeStepFactory::clone(BuildStepList *parent, Proje
bool QMakeStepFactory::canRestore(BuildStepList *parent, const QVariantMap &map) const
{
- QString id(ProjectExplorer::idFromMap(map));
- return canCreate(parent, id);
+ return canCreate(parent, ProjectExplorer::idFromMap(map));
}
ProjectExplorer::BuildStep *QMakeStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
@@ -824,18 +823,18 @@ ProjectExplorer::BuildStep *QMakeStepFactory::restore(BuildStepList *parent, con
return 0;
}
-QStringList QMakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
+QList<Core::Id> QMakeStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
- if (parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
+ if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD))
if (Qt4BuildConfiguration *bc = qobject_cast<Qt4BuildConfiguration *>(parent->parent()))
if (!bc->qmakeStep())
- return QStringList() << QLatin1String(QMAKE_BS_ID);
- return QStringList();
+ return QList<Core::Id>() << Core::Id(QMAKE_BS_ID);
+ return QList<Core::Id>();
}
-QString QMakeStepFactory::displayNameForId(const QString &id) const
+QString QMakeStepFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(QMAKE_BS_ID))
+ if (id == Core::Id(QMAKE_BS_ID))
return tr("qmake");
return QString();
}
diff --git a/src/plugins/qt4projectmanager/qmakestep.h b/src/plugins/qt4projectmanager/qmakestep.h
index 265147b728..f55f9797d4 100644
--- a/src/plugins/qt4projectmanager/qmakestep.h
+++ b/src/plugins/qt4projectmanager/qmakestep.h
@@ -60,14 +60,14 @@ class QMakeStepFactory : public ProjectExplorer::IBuildStepFactory
public:
explicit QMakeStepFactory(QObject *parent = 0);
virtual ~QMakeStepFactory();
- bool canCreate(ProjectExplorer::BuildStepList *parent, const QString & id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *bs) const;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *bs);
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
- QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
+ QString displayNameForId(const Core::Id id) const;
};
} // namespace Internal
@@ -116,7 +116,7 @@ signals:
protected:
QMakeStep(ProjectExplorer::BuildStepList *parent, QMakeStep *source);
- QMakeStep(ProjectExplorer::BuildStepList *parent, const QString &id);
+ QMakeStep(ProjectExplorer::BuildStepList *parent, const Core::Id id);
virtual bool fromMap(const QVariantMap &map);
virtual void processStartupFailed();
diff --git a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp
index c0146d2896..fb79ca1fb1 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp
+++ b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.cpp
@@ -84,12 +84,12 @@ QList<ProjectExplorer::Abi> DesktopQtVersion::detectQtAbis() const
return qtAbisFromLibrary(qtCorePath(versionInfo(), qtVersionString()));
}
-bool DesktopQtVersion::supportsTargetId(const QString &id) const
+bool DesktopQtVersion::supportsTargetId(Core::Id id) const
{
using namespace ProjectExplorer;
- if (id == QLatin1String(Constants::DESKTOP_TARGET_ID))
+ if (id == Core::Id(Constants::DESKTOP_TARGET_ID))
return true;
- if (id == QLatin1String("RemoteLinux.EmbeddedLinuxTarget")) {
+ if (id == Core::Id("RemoteLinux.EmbeddedLinuxTarget")) {
foreach (const Abi &abi, qtAbis()) {
switch (abi.os()) {
case Abi::BsdOS: case Abi::LinuxOS: case Abi::MacOS: case Abi::UnixOS:
@@ -102,9 +102,9 @@ bool DesktopQtVersion::supportsTargetId(const QString &id) const
return false;
}
-QSet<QString> DesktopQtVersion::supportedTargetIds() const
+QSet<Core::Id> DesktopQtVersion::supportedTargetIds() const
{
- return QSet<QString>() << QLatin1String(Constants::DESKTOP_TARGET_ID);
+ return QSet<Core::Id>() << Core::Id(Constants::DESKTOP_TARGET_ID);
}
QString DesktopQtVersion::description() const
diff --git a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.h b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.h
index 491ebcd717..638dd2dac0 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.h
+++ b/src/plugins/qt4projectmanager/qt-desktop/desktopqtversion.h
@@ -53,8 +53,8 @@ public:
QList<ProjectExplorer::Abi> detectQtAbis() const;
- bool supportsTargetId(const QString &id) const;
- QSet<QString> supportedTargetIds() const;
+ bool supportsTargetId(Core::Id id) const;
+ QSet<Core::Id> supportedTargetIds() const;
QString description() const;
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptarget.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptarget.cpp
index e79bc1c93b..55137a4243 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptarget.cpp
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptarget.cpp
@@ -43,7 +43,7 @@
using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal;
-Qt4DesktopTarget::Qt4DesktopTarget(Qt4Project *parent, const QString &id) :
+Qt4DesktopTarget::Qt4DesktopTarget(Qt4Project *parent, const Core::Id id) :
Qt4BaseTarget(parent, id),
m_buildConfigurationFactory(new Qt4BuildConfigurationFactory(this))
{
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptarget.h b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptarget.h
index 3033472958..e572c979df 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptarget.h
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptarget.h
@@ -47,16 +47,15 @@ class Qt4DesktopTarget : public Qt4BaseTarget
friend class Qt4DesktopTargetFactory;
Q_OBJECT
public:
- explicit Qt4DesktopTarget(Qt4Project *parent, const QString &id);
- virtual ~Qt4DesktopTarget();
+ Qt4DesktopTarget(Qt4Project *parent, const Core::Id id);
+ ~Qt4DesktopTarget();
+ static QString defaultDisplayName();
ProjectExplorer::IBuildConfigurationFactory *buildConfigurationFactory() const;
void createApplicationProFiles(bool reparse);
QList<ProjectExplorer::RunConfiguration *> runConfigurationsForNode(ProjectExplorer::Node *n);
- static QString defaultDisplayName();
-
private:
Qt4BuildConfigurationFactory *m_buildConfigurationFactory;
};
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp
index 7e49cce939..a4e095e408 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.cpp
@@ -64,38 +64,38 @@ Qt4DesktopTargetFactory::~Qt4DesktopTargetFactory()
{
}
-bool Qt4DesktopTargetFactory::supportsTargetId(const QString &id) const
+bool Qt4DesktopTargetFactory::supportsTargetId(const Core::Id id) const
{
- return id == QLatin1String(Constants::DESKTOP_TARGET_ID);
+ return id == Core::Id(Constants::DESKTOP_TARGET_ID);
}
-QStringList Qt4DesktopTargetFactory::supportedTargetIds() const
+QList<Core::Id> Qt4DesktopTargetFactory::supportedTargetIds() const
{
- return QStringList(QLatin1String(Constants::DESKTOP_TARGET_ID));
+ return QList<Core::Id>() << Core::Id(Constants::DESKTOP_TARGET_ID);
}
-QString Qt4DesktopTargetFactory::displayNameForId(const QString &id) const
+QString Qt4DesktopTargetFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(Constants::DESKTOP_TARGET_ID))
+ if (id == Core::Id(Constants::DESKTOP_TARGET_ID))
return Qt4DesktopTarget::defaultDisplayName();
return QString();
}
-QString Qt4DesktopTargetFactory::buildNameForId(const QString &id) const
+QString Qt4DesktopTargetFactory::buildNameForId(const Core::Id id) const
{
- if (id == QLatin1String(Constants::DESKTOP_TARGET_ID))
+ if (id == Core::Id(Constants::DESKTOP_TARGET_ID))
return QLatin1String("desktop");
return QString();
}
-QIcon Qt4DesktopTargetFactory::iconForId(const QString &id) const
+QIcon Qt4DesktopTargetFactory::iconForId(const Core::Id id) const
{
- if (id == QLatin1String(Constants::DESKTOP_TARGET_ID))
+ if (id == Core::Id(Constants::DESKTOP_TARGET_ID))
return qApp->style()->standardIcon(QStyle::SP_ComputerIcon);
return QIcon();
}
-bool Qt4DesktopTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
+bool Qt4DesktopTargetFactory::canCreate(ProjectExplorer::Project *parent, const Core::Id id) const
{
if (!qobject_cast<Qt4Project *>(parent))
return false;
@@ -115,7 +115,7 @@ ProjectExplorer::Target *Qt4DesktopTargetFactory::restore(ProjectExplorer::Proj
return 0;
Qt4Project *qt4project = static_cast<Qt4Project *>(parent);
- Qt4DesktopTarget *target = new Qt4DesktopTarget(qt4project, QLatin1String("transient ID"));
+ Qt4DesktopTarget *target = new Qt4DesktopTarget(qt4project, idFromMap(map));
if (target->fromMap(map))
return target;
@@ -123,7 +123,7 @@ ProjectExplorer::Target *Qt4DesktopTargetFactory::restore(ProjectExplorer::Proj
return 0;
}
-Qt4TargetSetupWidget *Qt4DesktopTargetFactory::createTargetSetupWidget(const QString &id, const QString &proFilePath,
+Qt4TargetSetupWidget *Qt4DesktopTargetFactory::createTargetSetupWidget(const Core::Id id, const QString &proFilePath,
const QtSupport::QtVersionNumber &minimumQtVersion,
const QtSupport::QtVersionNumber &maximumQtVersion,
const Core::FeatureSet &requiredFeatures,
@@ -145,7 +145,7 @@ Qt4TargetSetupWidget *Qt4DesktopTargetFactory::createTargetSetupWidget(const QSt
return widget;
}
-ProjectExplorer::Target *Qt4DesktopTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
+ProjectExplorer::Target *Qt4DesktopTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -164,8 +164,9 @@ ProjectExplorer::Target *Qt4DesktopTargetFactory::create(ProjectExplorer::Projec
return create(parent, id, infos);
}
-QSet<QString> Qt4DesktopTargetFactory::targetFeatures(const QString & /*id*/) const
+QSet<QString> Qt4DesktopTargetFactory::targetFeatures(const Core::Id id) const
{
+ Q_UNUSED(id);
QSet<QString> features;
features << QLatin1String(Constants::DESKTOP_TARGETFEATURE_ID);
features << QLatin1String(Constants::SHADOWBUILD_TARGETFEATURE_ID);
@@ -173,7 +174,7 @@ QSet<QString> Qt4DesktopTargetFactory::targetFeatures(const QString & /*id*/) co
return features;
}
-ProjectExplorer::Target *Qt4DesktopTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos)
+ProjectExplorer::Target *Qt4DesktopTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id, const QList<BuildConfigurationInfo> &infos)
{
if (!canCreate(parent, id))
return 0;
@@ -186,7 +187,7 @@ ProjectExplorer::Target *Qt4DesktopTargetFactory::create(ProjectExplorer::Projec
info.version(), info.buildConfig,
info.additionalArguments, info.directory, info.importing);
- t->addDeployConfiguration(t->createDeployConfiguration(QLatin1String(ProjectExplorer::Constants::DEFAULT_DEPLOYCONFIGURATION_ID)));
+ t->addDeployConfiguration(t->createDeployConfiguration(Core::Id(ProjectExplorer::Constants::DEFAULT_DEPLOYCONFIGURATION_ID)));
t->createApplicationProFiles(false);
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h
index 4ad88fa13f..be5ced77fa 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4desktoptargetfactory.h
@@ -44,26 +44,27 @@ public:
Qt4DesktopTargetFactory(QObject *parent = 0);
~Qt4DesktopTargetFactory();
- QStringList supportedTargetIds() const;
- QString displayNameForId(const QString &id) const;
- QIcon iconForId(const QString &id) const;
+ QList<Core::Id> supportedTargetIds() const;
+ QString displayNameForId(const Core::Id id) const;
+ QIcon iconForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
+ bool canCreate(ProjectExplorer::Project *parent, const Core::Id id) const;
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
ProjectExplorer::Target *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
- virtual bool supportsTargetId(const QString &id) const;
+ virtual bool supportsTargetId(const Core::Id id) const;
- Qt4TargetSetupWidget *createTargetSetupWidget(const QString &id, const QString &proFilePath,
+ Qt4TargetSetupWidget *createTargetSetupWidget(const Core::Id id, const QString &proFilePath,
const QtSupport::QtVersionNumber &minimumQtVersion,
const QtSupport::QtVersionNumber &maximumQtVersion,
const Core::FeatureSet &requiredFeatures,
bool importEnabled, QList<BuildConfigurationInfo> importInfos);
- QString buildNameForId(const QString &id) const;
- QSet<QString> targetFeatures(const QString &id) const;
+ QString buildNameForId(const Core::Id id) const;
+ QSet<QString> targetFeatures(const Core::Id id) const;
- ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id);
- ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos);
+ ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id);
+ ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id,
+ const QList<BuildConfigurationInfo> &infos);
};
}
}
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
index cc61c89869..d706a46efc 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.cpp
@@ -87,11 +87,13 @@ const char * const USER_ENVIRONMENT_CHANGES_KEY("Qt4ProjectManager.Qt4RunConfigu
const char * const BASE_ENVIRONMENT_BASE_KEY("Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase");
const char * const USER_WORKING_DIRECTORY_KEY("Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory");
-QString pathFromId(const QString &id)
+QString pathFromId(Core::Id id)
{
- if (!id.startsWith(QLatin1String(QT4_RC_PREFIX)))
+ QString idstr = QString::fromUtf8(id.name());
+ const QString prefix = QLatin1String(QT4_RC_PREFIX);
+ if (!idstr.startsWith(prefix))
return QString();
- return id.mid(QString::fromLatin1(QT4_RC_PREFIX).size());
+ return idstr.mid(prefix.size());
}
} // namespace
@@ -101,7 +103,7 @@ QString pathFromId(const QString &id)
//
Qt4RunConfiguration::Qt4RunConfiguration(Qt4BaseTarget *parent, const QString &proFilePath) :
- LocalApplicationRunConfiguration(parent, QLatin1String(QT4_RC_ID)),
+ LocalApplicationRunConfiguration(parent, Core::Id(QT4_RC_ID)),
m_proFilePath(proFilePath),
m_runMode(Gui),
m_isUsingDyldImageSuffix(false),
@@ -246,7 +248,7 @@ Qt4RunConfigurationWidget::Qt4RunConfigurationWidget(Qt4RunConfiguration *qt4Run
m_useTerminalCheck = new QCheckBox(tr("Run in terminal"), this);
m_useTerminalCheck->setChecked(m_qt4RunConfiguration->runMode() == ProjectExplorer::LocalApplicationRunConfiguration::Console);
toplayout->addRow(QString(), m_useTerminalCheck);
- m_useTerminalCheck->setVisible(qt4RunConfiguration->target()->id() != QLatin1String(Constants::QT_SIMULATOR_TARGET_ID));
+ m_useTerminalCheck->setVisible(qt4RunConfiguration->target()->id() != Core::Id(Constants::QT_SIMULATOR_TARGET_ID));
#ifdef Q_OS_MAC
m_usingDyldImageSuffix = new QCheckBox(tr("Use debug version of frameworks (DYLD_IMAGE_SUFFIX=_debug)"), this);
@@ -708,18 +710,18 @@ Qt4RunConfigurationFactory::~Qt4RunConfigurationFactory()
{
}
-bool Qt4RunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const QString &id) const
+bool Qt4RunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const
{
Qt4BaseTarget *t = qobject_cast<Qt4BaseTarget *>(parent);
if (!t)
return false;
- if (t->id() != QLatin1String(Constants::DESKTOP_TARGET_ID)
- && t->id() != QLatin1String(Constants::QT_SIMULATOR_TARGET_ID))
+ if (t->id() != Core::Id(Constants::DESKTOP_TARGET_ID)
+ && t->id() != Core::Id(Constants::QT_SIMULATOR_TARGET_ID))
return false;
return t->qt4Project()->hasApplicationProFile(pathFromId(id));
}
-ProjectExplorer::RunConfiguration *Qt4RunConfigurationFactory::create(ProjectExplorer::Target *parent, const QString &id)
+ProjectExplorer::RunConfiguration *Qt4RunConfigurationFactory::create(ProjectExplorer::Target *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -731,10 +733,10 @@ bool Qt4RunConfigurationFactory::canRestore(ProjectExplorer::Target *parent, con
{
if (!qobject_cast<Qt4BaseTarget *>(parent))
return false;
- if (parent->id() != QLatin1String(Constants::DESKTOP_TARGET_ID)
- && parent->id() != QLatin1String(Constants::QT_SIMULATOR_TARGET_ID))
+ if (parent->id() != Core::Id(Constants::DESKTOP_TARGET_ID)
+ && parent->id() != Core::Id(Constants::QT_SIMULATOR_TARGET_ID))
return false;
- QString id(ProjectExplorer::idFromMap(map));
+ QString id = QString::fromLatin1(ProjectExplorer::idFromMap(map).name());
return id.startsWith(QLatin1String(QT4_RC_ID));
}
@@ -765,18 +767,22 @@ ProjectExplorer::RunConfiguration *Qt4RunConfigurationFactory::clone(ProjectExpl
return new Qt4RunConfiguration(t, old);
}
-QStringList Qt4RunConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
+QList<Core::Id> Qt4RunConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
{
+ QList<Core::Id> result;
Qt4BaseTarget *t = qobject_cast<Qt4BaseTarget *>(parent);
if (!t)
- return QStringList();
- if (t->id() != QLatin1String(Constants::DESKTOP_TARGET_ID)
- && t->id() != QLatin1String(Constants::QT_SIMULATOR_TARGET_ID))
- return QStringList();
- return t->qt4Project()->applicationProFilePathes(QLatin1String(QT4_RC_PREFIX));
+ return result;
+ if (t->id() != Core::Id(Constants::DESKTOP_TARGET_ID)
+ && t->id() != Core::Id(Constants::QT_SIMULATOR_TARGET_ID))
+ return result;
+ QStringList proFiles = t->qt4Project()->applicationProFilePathes(QLatin1String(QT4_RC_PREFIX));
+ foreach (const QString &pf, proFiles)
+ result << Core::Id(pf.toUtf8().constData());
+ return result;
}
-QString Qt4RunConfigurationFactory::displayNameForId(const QString &id) const
+QString Qt4RunConfigurationFactory::displayNameForId(const Core::Id id) const
{
return QFileInfo(pathFromId(id)).completeBaseName();
}
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h
index 062b013d4f..bc8dd4c332 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4runconfiguration.h
@@ -213,15 +213,15 @@ public:
explicit Qt4RunConfigurationFactory(QObject *parent = 0);
virtual ~Qt4RunConfigurationFactory();
- virtual bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- virtual ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ virtual bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
+ virtual ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
virtual bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
virtual ProjectExplorer::RunConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
virtual bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source) const;
virtual ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source);
- QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
+ QString displayNameForId(const Core::Id id) const;
};
} // namespace Internal
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortarget.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortarget.cpp
index dbf820d06c..0c695af87c 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortarget.cpp
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortarget.cpp
@@ -48,7 +48,7 @@ using namespace Qt4ProjectManager::Internal;
// Qt4Target
// -------------------------------------------------------------------------
-Qt4SimulatorTarget::Qt4SimulatorTarget(Qt4Project *parent, const QString &id) :
+Qt4SimulatorTarget::Qt4SimulatorTarget(Qt4Project *parent, const Core::Id id) :
Qt4BaseTarget(parent, id),
m_buildConfigurationFactory(new Qt4BuildConfigurationFactory(this))
{
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortarget.h b/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortarget.h
index e3a43b56df..0815c724fc 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortarget.h
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortarget.h
@@ -47,8 +47,8 @@ class Qt4SimulatorTarget : public Qt4BaseTarget
friend class Qt4SimulatorTargetFactory;
Q_OBJECT
public:
- explicit Qt4SimulatorTarget(Qt4Project *parent, const QString &id);
- virtual ~Qt4SimulatorTarget();
+ Qt4SimulatorTarget(Qt4Project *parent, const Core::Id id);
+ ~Qt4SimulatorTarget();
ProjectExplorer::IBuildConfigurationFactory *buildConfigurationFactory() const;
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp b/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp
index 0f70c0aa38..3daacc4e57 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.cpp
@@ -64,38 +64,38 @@ Qt4SimulatorTargetFactory::~Qt4SimulatorTargetFactory()
{
}
-bool Qt4SimulatorTargetFactory::supportsTargetId(const QString &id) const
+bool Qt4SimulatorTargetFactory::supportsTargetId(const Core::Id id) const
{
- return id == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID);
+ return id == Core::Id(Constants::QT_SIMULATOR_TARGET_ID);
}
-QStringList Qt4SimulatorTargetFactory::supportedTargetIds() const
+QList<Core::Id> Qt4SimulatorTargetFactory::supportedTargetIds() const
{
- return QStringList() << QLatin1String(Constants::QT_SIMULATOR_TARGET_ID);
+ return QList<Core::Id>() << Core::Id(Constants::QT_SIMULATOR_TARGET_ID);
}
-QString Qt4SimulatorTargetFactory::displayNameForId(const QString &id) const
+QString Qt4SimulatorTargetFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID))
+ if (id == Core::Id(Constants::QT_SIMULATOR_TARGET_ID))
return Qt4SimulatorTarget::defaultDisplayName();
return QString();
}
-QIcon Qt4SimulatorTargetFactory::iconForId(const QString &id) const
+QIcon Qt4SimulatorTargetFactory::iconForId(const Core::Id id) const
{
- if (id == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID))
+ if (id == Core::Id(Constants::QT_SIMULATOR_TARGET_ID))
return QIcon(QLatin1String(":/projectexplorer/images/SymbianEmulator.png"));
return QIcon();
}
-QString Qt4SimulatorTargetFactory::buildNameForId(const QString &id) const
+QString Qt4SimulatorTargetFactory::buildNameForId(const Core::Id id) const
{
- if (id == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID))
+ if (id == Core::Id(Constants::QT_SIMULATOR_TARGET_ID))
return QLatin1String("simulator");
return QString();
}
-bool Qt4SimulatorTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
+bool Qt4SimulatorTargetFactory::canCreate(ProjectExplorer::Project *parent, const Core::Id id) const
{
if (!qobject_cast<Qt4Project *>(parent))
return false;
@@ -115,14 +115,14 @@ ProjectExplorer::Target *Qt4SimulatorTargetFactory::restore(ProjectExplorer::Pro
return 0;
Qt4Project *qt4project = static_cast<Qt4Project *>(parent);
- Qt4SimulatorTarget *target = new Qt4SimulatorTarget(qt4project, QLatin1String("transient ID"));
+ Qt4SimulatorTarget *target = new Qt4SimulatorTarget(qt4project, idFromMap(map));
if (target->fromMap(map))
return target;
delete target;
return 0;
}
-QSet<QString> Qt4SimulatorTargetFactory::targetFeatures(const QString & /*id*/) const
+QSet<QString> Qt4SimulatorTargetFactory::targetFeatures(const Core::Id /*id*/) const
{
QSet<QString> features;
@@ -132,7 +132,7 @@ QSet<QString> Qt4SimulatorTargetFactory::targetFeatures(const QString & /*id*/)
return features;
}
-ProjectExplorer::Target *Qt4SimulatorTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
+ProjectExplorer::Target *Qt4SimulatorTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -150,7 +150,8 @@ ProjectExplorer::Target *Qt4SimulatorTargetFactory::create(ProjectExplorer::Proj
return create(parent, id, infos);
}
-ProjectExplorer::Target *Qt4SimulatorTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos)
+ProjectExplorer::Target *Qt4SimulatorTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id,
+ const QList<BuildConfigurationInfo> &infos)
{
if (!canCreate(parent, id))
return 0;
@@ -162,7 +163,7 @@ ProjectExplorer::Target *Qt4SimulatorTargetFactory::create(ProjectExplorer::Proj
t->addQt4BuildConfiguration(msgBuildConfigurationName(info), QString(), info.version(), info.buildConfig,
info.additionalArguments, info.directory, info.importing);
- t->addDeployConfiguration(t->createDeployConfiguration(QLatin1String(ProjectExplorer::Constants::DEFAULT_DEPLOYCONFIGURATION_ID)));
+ t->addDeployConfiguration(t->createDeployConfiguration(Core::Id(ProjectExplorer::Constants::DEFAULT_DEPLOYCONFIGURATION_ID)));
t->createApplicationProFiles(false);
diff --git a/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.h b/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.h
index 200ea73c2a..8c0f96f9e2 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.h
+++ b/src/plugins/qt4projectmanager/qt-desktop/qt4simulatortargetfactory.h
@@ -45,22 +45,22 @@ public:
Qt4SimulatorTargetFactory(QObject *parent = 0);
~Qt4SimulatorTargetFactory();
- bool supportsTargetId(const QString &id);
+ bool supportsTargetId(const Core::Id id) const;
- QStringList supportedTargetIds() const;
- QString displayNameForId(const QString &id) const;
- QIcon iconForId(const QString &id) const;
+ QList<Core::Id> supportedTargetIds() const;
+ QString displayNameForId(const Core::Id id) const;
+ QIcon iconForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
+ bool canCreate(ProjectExplorer::Project *parent, const Core::Id id) const;
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
ProjectExplorer::Target *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
- bool supportsTargetId(const QString &id) const;
- QSet<QString> targetFeatures(const QString &id) const;
+ QSet<QString> targetFeatures(const Core::Id id) const;
- QString buildNameForId(const QString &id) const;
- ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id);
- ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos);
+ QString buildNameForId(const Core::Id id) const;
+ ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id);
+ ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id,
+ const QList<BuildConfigurationInfo> &infos);
};
}
diff --git a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp
index ed8eaf2dc6..0223785ff6 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp
+++ b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.cpp
@@ -85,14 +85,14 @@ QList<ProjectExplorer::Abi> SimulatorQtVersion::detectQtAbis() const
return qtAbisFromLibrary(qtCorePath(versionInfo(), qtVersionString()));
}
-bool SimulatorQtVersion::supportsTargetId(const QString &id) const
+bool SimulatorQtVersion::supportsTargetId(Core::Id id) const
{
- return id == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID);
+ return id == Core::Id(Constants::QT_SIMULATOR_TARGET_ID);
}
-QSet<QString> SimulatorQtVersion::supportedTargetIds() const
+QSet<Core::Id> SimulatorQtVersion::supportedTargetIds() const
{
- return QSet<QString>() << QLatin1String(Constants::QT_SIMULATOR_TARGET_ID);
+ return QSet<Core::Id>() << Core::Id(Constants::QT_SIMULATOR_TARGET_ID);
}
QString SimulatorQtVersion::description() const
diff --git a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.h b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.h
index 06c9d3a166..eea7ea91a1 100644
--- a/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.h
+++ b/src/plugins/qt4projectmanager/qt-desktop/simulatorqtversion.h
@@ -53,8 +53,8 @@ public:
QList<ProjectExplorer::Abi> detectQtAbis() const;
- bool supportsTargetId(const QString &id) const;
- QSet<QString> supportedTargetIds() const;
+ bool supportsTargetId(Core::Id id) const;
+ QSet<Core::Id> supportedTargetIds() const;
QString description() const;
diff --git a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantarget.cpp b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantarget.cpp
index d4c826b625..762a59198e 100644
--- a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantarget.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantarget.cpp
@@ -50,7 +50,7 @@
using namespace Qt4ProjectManager;
using namespace Qt4ProjectManager::Internal;
-Qt4SymbianTarget::Qt4SymbianTarget(Qt4Project *parent, const QString &id) :
+Qt4SymbianTarget::Qt4SymbianTarget(Qt4Project *parent, const Core::Id id) :
Qt4BaseTarget(parent, id),
m_buildConfigurationFactory(new Qt4BuildConfigurationFactory(this))
{
@@ -61,16 +61,16 @@ Qt4SymbianTarget::Qt4SymbianTarget(Qt4Project *parent, const QString &id) :
Qt4SymbianTarget::~Qt4SymbianTarget()
{ }
-QString Qt4SymbianTarget::defaultDisplayName(const QString &id)
+QString Qt4SymbianTarget::defaultDisplayName(const Core::Id id)
{
- if (id == QLatin1String(Constants::S60_DEVICE_TARGET_ID))
+ if (id == Core::Id(Constants::S60_DEVICE_TARGET_ID))
return QApplication::translate("Qt4ProjectManager::Qt4Target", "Symbian Device", "Qt4 Symbian Device target display name");
return QString();
}
-QIcon Qt4SymbianTarget::iconForId(const QString &id)
+QIcon Qt4SymbianTarget::iconForId(Core::Id id)
{
- if (id == QLatin1String(Constants::S60_DEVICE_TARGET_ID))
+ if (id == Core::Id(Constants::S60_DEVICE_TARGET_ID))
return QIcon(QLatin1String(":/projectexplorer/images/SymbianDevice.png"));
return QIcon();
}
@@ -91,7 +91,7 @@ void Qt4SymbianTarget::createApplicationProFiles(bool reparse)
foreach (Qt4ProFileNode *pro, profiles)
paths << pro->path();
- if (id() == QLatin1String(Constants::S60_DEVICE_TARGET_ID)) {
+ if (id() == Core::Id(Constants::S60_DEVICE_TARGET_ID)) {
foreach (ProjectExplorer::RunConfiguration *rc, runConfigurations())
if (S60DeviceRunConfiguration *qt4rc = qobject_cast<S60DeviceRunConfiguration *>(rc))
paths.remove(qt4rc->proFilePath());
@@ -111,7 +111,7 @@ QList<ProjectExplorer::RunConfiguration *> Qt4SymbianTarget::runConfigurationsFo
{
QList<ProjectExplorer::RunConfiguration *> result;
foreach (ProjectExplorer::RunConfiguration *rc, runConfigurations()) {
- if (id() == QLatin1String(Constants::S60_DEVICE_TARGET_ID)) {
+ if (id() == Core::Id(Constants::S60_DEVICE_TARGET_ID)) {
if (S60DeviceRunConfiguration *s60rc = qobject_cast<S60DeviceRunConfiguration *>(rc))
if (s60rc->proFilePath() == n->path())
result << rc;
diff --git a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantarget.h b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantarget.h
index 6412e93e91..1b356a5dde 100644
--- a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantarget.h
+++ b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantarget.h
@@ -48,16 +48,16 @@ class Qt4SymbianTarget : public Qt4BaseTarget
friend class Qt4SymbianTargetFactory; // for from Map
Q_OBJECT
public:
- explicit Qt4SymbianTarget(Qt4Project *parent, const QString &id);
- virtual ~Qt4SymbianTarget();
+ Qt4SymbianTarget(Qt4Project *parent, const Core::Id id);
+ ~Qt4SymbianTarget();
ProjectExplorer::IBuildConfigurationFactory *buildConfigurationFactory() const;
void createApplicationProFiles(bool reparse);
virtual QList<ProjectExplorer::RunConfiguration *> runConfigurationsForNode(ProjectExplorer::Node *n);
- static QString defaultDisplayName(const QString &id);
- static QIcon iconForId(const QString &id);
+ static QString defaultDisplayName(const Core::Id id);
+ static QIcon iconForId(Core::Id id);
protected:
ProjectExplorer::IDevice::ConstPtr currentDevice() const;
diff --git a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
index eb88d73036..9415b13ca2 100644
--- a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.cpp
@@ -67,31 +67,31 @@ Qt4SymbianTargetFactory::~Qt4SymbianTargetFactory()
{
}
-bool Qt4SymbianTargetFactory::supportsTargetId(const QString &id) const
+bool Qt4SymbianTargetFactory::supportsTargetId(const Core::Id id) const
{
- return id == QLatin1String(Constants::S60_DEVICE_TARGET_ID);
+ return id == Core::Id(Constants::S60_DEVICE_TARGET_ID);
}
-QStringList Qt4SymbianTargetFactory::supportedTargetIds() const
+QList<Core::Id> Qt4SymbianTargetFactory::supportedTargetIds() const
{
- QStringList ids;
- ids << QLatin1String(Constants::S60_DEVICE_TARGET_ID);
+ QList<Core::Id> ids;
+ ids << Core::Id(Constants::S60_DEVICE_TARGET_ID);
return ids;
}
-QString Qt4SymbianTargetFactory::displayNameForId(const QString &id) const
+QString Qt4SymbianTargetFactory::displayNameForId(const Core::Id id) const
{
return Qt4SymbianTarget::defaultDisplayName(id);
}
-QIcon Qt4SymbianTargetFactory::iconForId(const QString &id) const
+QIcon Qt4SymbianTargetFactory::iconForId(const Core::Id id) const
{
- if (id == QLatin1String(Constants::S60_DEVICE_TARGET_ID))
+ if (id == Core::Id(Constants::S60_DEVICE_TARGET_ID))
return QIcon(QLatin1String(":/projectexplorer/images/SymbianDevice.png"));
return QIcon();
}
-bool Qt4SymbianTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
+bool Qt4SymbianTargetFactory::canCreate(ProjectExplorer::Project *parent, const Core::Id id) const
{
if (!qobject_cast<Qt4Project *>(parent))
return false;
@@ -119,7 +119,7 @@ ProjectExplorer::Target *Qt4SymbianTargetFactory::restore(ProjectExplorer::Proje
return 0;
}
-QString Qt4SymbianTargetFactory::shadowBuildDirectory(const QString &profilePath, const QString &id, const QString &suffix)
+QString Qt4SymbianTargetFactory::shadowBuildDirectory(const QString &profilePath, const Core::Id id, const QString &suffix)
{
Q_UNUSED(id);
Q_UNUSED(suffix);
@@ -154,7 +154,7 @@ QList<ProjectExplorer::Task> Qt4SymbianTargetFactory::reportIssues(const QString
return results;
}
-QList<BuildConfigurationInfo> Qt4SymbianTargetFactory::availableBuildConfigurations(const QString &id, const QString &proFilePath,
+QList<BuildConfigurationInfo> Qt4SymbianTargetFactory::availableBuildConfigurations(const Core::Id id, const QString &proFilePath,
const QtSupport::QtVersionNumber &minimumQtVersion,
const QtSupport::QtVersionNumber &maximumQtVersion,
const Core::FeatureSet &requiredFeatures)
@@ -162,13 +162,13 @@ QList<BuildConfigurationInfo> Qt4SymbianTargetFactory::availableBuildConfigurati
return Qt4BaseTargetFactory::availableBuildConfigurations(id, proFilePath, minimumQtVersion, maximumQtVersion, requiredFeatures);
}
-bool Qt4SymbianTargetFactory::selectByDefault(const QString &id) const
+bool Qt4SymbianTargetFactory::selectByDefault(const Core::Id id) const
{
Q_UNUSED(id);
return true;
}
-QSet<QString> Qt4SymbianTargetFactory::targetFeatures(const QString & /*id*/) const
+QSet<QString> Qt4SymbianTargetFactory::targetFeatures(const Core::Id /*id*/) const
{
QSet<QString> features;
features << QLatin1String(Constants::MOBILE_TARGETFEATURE_ID);
@@ -176,7 +176,7 @@ QSet<QString> Qt4SymbianTargetFactory::targetFeatures(const QString & /*id*/) co
return features;
}
-ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent, const QString &id)
+ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -195,7 +195,7 @@ ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Projec
return create(parent, id, infos);
}
-ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos)
+ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id, const QList<BuildConfigurationInfo> &infos)
{
if (!canCreate(parent, id))
return 0;
@@ -205,7 +205,7 @@ ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Projec
info.version(), info.buildConfig,
info.additionalArguments, info.directory, info.importing);
- t->addDeployConfiguration(t->createDeployConfiguration(QLatin1String(S60_DEPLOYCONFIGURATION_ID)));
+ t->addDeployConfiguration(t->createDeployConfiguration(Core::Id(S60_DEPLOYCONFIGURATION_ID)));
t->createApplicationProFiles(false);
@@ -214,7 +214,7 @@ ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Projec
return t;
}
-ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, Qt4TargetSetupWidget *widget)
+ProjectExplorer::Target *Qt4SymbianTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id, Qt4TargetSetupWidget *widget)
{
if (!widget->isTargetSelected())
return 0;
diff --git a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.h b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.h
index b33b5b1611..c802a50607 100644
--- a/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.h
+++ b/src/plugins/qt4projectmanager/qt-s60/qt4symbiantargetfactory.h
@@ -44,28 +44,30 @@ public:
Qt4SymbianTargetFactory(QObject *parent = 0);
~Qt4SymbianTargetFactory();
- QStringList supportedTargetIds() const;
- bool supportsTargetId(const QString &id) const;
- QString displayNameForId(const QString &id) const;
- QIcon iconForId(const QString &id) const;
+ QList<Core::Id> supportedTargetIds() const;
+ bool supportsTargetId(const Core::Id id) const;
+ QString displayNameForId(const Core::Id id) const;
+ QIcon iconForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
+ bool canCreate(ProjectExplorer::Project *parent, const Core::Id id) const;
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
virtual ProjectExplorer::Target *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
- virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id);
- virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos);
- virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, Qt4TargetSetupWidget *widget);
+ virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id);
+ virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id,
+ const QList<BuildConfigurationInfo> &infos);
+ virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id,
+ Qt4TargetSetupWidget *widget);
- QString shadowBuildDirectory(const QString &profilePath, const QString &id, const QString &suffix);
+ QString shadowBuildDirectory(const QString &profilePath, const Core::Id id, const QString &suffix);
QList<ProjectExplorer::Task> reportIssues(const QString &proFile);
- QList<BuildConfigurationInfo> availableBuildConfigurations(const QString &id, const QString &proFilePath,
+ QList<BuildConfigurationInfo> availableBuildConfigurations(const Core::Id id, const QString &proFilePath,
const QtSupport::QtVersionNumber &minimumQtVersion,
const QtSupport::QtVersionNumber &maximumQtVersion,
const Core::FeatureSet &requiredFeatures);
- bool selectByDefault(const QString &id) const;
- QSet<QString> targetFeatures(const QString &id) const;
+ bool selectByDefault(const Core::Id id) const;
+ QSet<QString> targetFeatures(const Core::Id id) const;
};
} // namespace Internal
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp
index 2f5f464225..493c9bd65f 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.cpp
@@ -82,7 +82,7 @@ namespace {
}
S60CreatePackageStep::S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl) :
- BuildStep(bsl, QLatin1String(SIGN_BS_ID)),
+ BuildStep(bsl, Core::Id(SIGN_BS_ID)),
m_signingMode(SignSelf),
m_createSmartInstaller(false),
m_outputParserChain(0),
@@ -117,7 +117,7 @@ S60CreatePackageStep::S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl,
ctor_package();
}
-S60CreatePackageStep::S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl, const QString &id) :
+S60CreatePackageStep::S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id) :
BuildStep(bsl, id),
m_signingMode(SignSelf),
m_createSmartInstaller(false),
@@ -737,16 +737,16 @@ S60CreatePackageStepFactory::~S60CreatePackageStepFactory()
{
}
-bool S60CreatePackageStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const
+bool S60CreatePackageStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
{
- if (parent->id() != QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY))
+ if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY))
return false;
- if (parent->target()->id() != QLatin1String(Constants::S60_DEVICE_TARGET_ID))
+ if (parent->target()->id() != Core::Id(Constants::S60_DEVICE_TARGET_ID))
return false;
- return (id == QLatin1String(SIGN_BS_ID));
+ return (id == Core::Id(SIGN_BS_ID));
}
-ProjectExplorer::BuildStep *S60CreatePackageStepFactory::create(ProjectExplorer::BuildStepList *parent, const QString &id)
+ProjectExplorer::BuildStep *S60CreatePackageStepFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -767,8 +767,7 @@ ProjectExplorer::BuildStep *S60CreatePackageStepFactory::clone(ProjectExplorer::
bool S60CreatePackageStepFactory::canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const
{
- QString id(ProjectExplorer::idFromMap(map));
- return canCreate(parent, id);
+ return canCreate(parent, ProjectExplorer::idFromMap(map));
}
ProjectExplorer::BuildStep *S60CreatePackageStepFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map)
@@ -782,18 +781,18 @@ ProjectExplorer::BuildStep *S60CreatePackageStepFactory::restore(ProjectExplorer
return 0;
}
-QStringList S60CreatePackageStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
+QList<Core::Id> S60CreatePackageStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
- if (parent->id() != QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY))
- return QStringList();
- if (parent->target()->id() == QLatin1String(Constants::S60_DEVICE_TARGET_ID))
- return QStringList() << QLatin1String(SIGN_BS_ID);
- return QStringList();
+ if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY))
+ return QList<Core::Id>();
+ if (parent->target()->id() == Core::Id(Constants::S60_DEVICE_TARGET_ID))
+ return QList<Core::Id>() << Core::Id(SIGN_BS_ID);
+ return QList<Core::Id>();
}
-QString S60CreatePackageStepFactory::displayNameForId(const QString &id) const
+QString S60CreatePackageStepFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(SIGN_BS_ID))
+ if (id == Core::Id(SIGN_BS_ID))
return tr("Create SIS Package");
return QString();
}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h
index 1b943d2dcc..8cbdb8aa1c 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h
+++ b/src/plugins/qt4projectmanager/qt-s60/s60createpackagestep.h
@@ -62,12 +62,12 @@ public:
~S60CreatePackageStepFactory();
// used to show the list of possible additons to a target, returns a list of types
- QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
// used to translate the types to names to display to the user
- QString displayNameForId(const QString &id) const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
// used to recreate the runConfigurations when restoring settings
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
@@ -119,7 +119,7 @@ signals:
protected:
S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl, S60CreatePackageStep *bs);
- S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl, const QString &id);
+ S60CreatePackageStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
bool fromMap(const QVariantMap &map);
Qt4BuildConfiguration *qt4BuildConfiguration() const;
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp
index 6b97dcf988..f7cf9d121e 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.cpp
@@ -66,19 +66,21 @@ const char S60_DC_PREFIX[] = "Qt4ProjectManager.S60DeployConfiguration.";
const char INSTALLATION_DRIVE_LETTER_KEY[] = "Qt4ProjectManager.S60DeployConfiguration.InstallationDriveLetter";
const char SILENT_INSTALL_KEY[] = "Qt4ProjectManager.S60DeployConfiguration.SilentInstall";
-QString pathFromId(const QString &id)
+QString pathFromId(Core::Id id)
{
- if (!id.startsWith(QLatin1String(S60_DC_PREFIX)))
+ QString idstr = QString::fromUtf8(id.name());
+ const QString prefix = QLatin1String(S60_DC_PREFIX);
+ if (!idstr.startsWith(prefix))
return QString();
- return id.mid(QString::fromLatin1(S60_DC_PREFIX).size());
+ return idstr.mid(prefix.size());
}
-}
+} // namespace
// ======== S60DeployConfiguration
S60DeployConfiguration::S60DeployConfiguration(Target *parent) :
- DeployConfiguration(parent, QLatin1String(S60_DEPLOYCONFIGURATION_ID)),
+ DeployConfiguration(parent, Core::Id(S60_DEPLOYCONFIGURATION_ID)),
m_activeBuildConfiguration(0),
m_installationDrive('C'),
m_silentInstall(true)
@@ -377,24 +379,27 @@ S60DeployConfigurationFactory::~S60DeployConfigurationFactory()
{
}
-QStringList S60DeployConfigurationFactory::availableCreationIds(Target *parent) const
+QList<Core::Id> S60DeployConfigurationFactory::availableCreationIds(Target *parent) const
{
+ QList<Core::Id> result;
Qt4SymbianTarget *target = qobject_cast<Qt4SymbianTarget *>(parent);
- if (!target ||
- target->id() != QLatin1String(Constants::S60_DEVICE_TARGET_ID))
- return QStringList();
+ if (!target || target->id() != Core::Id(Constants::S60_DEVICE_TARGET_ID))
+ return result;
- return target->qt4Project()->applicationProFilePathes(QLatin1String(S60_DC_PREFIX));
+ QStringList proFiles = target->qt4Project()->applicationProFilePathes(QLatin1String(S60_DC_PREFIX));
+ foreach (const QString &pf, proFiles)
+ result << Core::Id(pf.toUtf8().constData());
+ return result;
}
-QString S60DeployConfigurationFactory::displayNameForId(const QString &id) const
+QString S60DeployConfigurationFactory::displayNameForId(Core::Id id) const
{
if (!pathFromId(id).isEmpty())
return tr("%1 on Symbian Device").arg(QFileInfo(pathFromId(id)).completeBaseName());
return QString();
}
-DeployConfiguration *S60DeployConfigurationFactory::create(Target *parent, const QString &id)
+DeployConfiguration *S60DeployConfigurationFactory::create(Target *parent, Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -408,11 +413,11 @@ DeployConfiguration *S60DeployConfigurationFactory::create(Target *parent, const
return dc;
}
-bool S60DeployConfigurationFactory::canCreate(Target *parent, const QString& id) const
+bool S60DeployConfigurationFactory::canCreate(Target *parent, Core::Id id) const
{
Qt4SymbianTarget * t = qobject_cast<Qt4SymbianTarget *>(parent);
- if (!t || t->id() != QLatin1String(Constants::S60_DEVICE_TARGET_ID)
- || !id.startsWith(QLatin1String(S60_DEPLOYCONFIGURATION_ID)))
+ if (!t || t->id() != Core::Id(Constants::S60_DEVICE_TARGET_ID)
+ || !QString::fromUtf8(id.name()).startsWith(QLatin1String(S60_DEPLOYCONFIGURATION_ID)))
return false;
return true;
}
@@ -439,7 +444,7 @@ bool S60DeployConfigurationFactory::canClone(Target *parent, DeployConfiguration
{
if (!qobject_cast<Qt4SymbianTarget *>(parent))
return false;
- return source->id() == QLatin1String(S60_DEPLOYCONFIGURATION_ID);
+ return source->id() == Core::Id(S60_DEPLOYCONFIGURATION_ID);
}
DeployConfiguration *S60DeployConfigurationFactory::clone(Target *parent, DeployConfiguration *source)
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h
index 68e4218531..b53241ca8f 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt-s60/s60deployconfiguration.h
@@ -138,16 +138,16 @@ public:
explicit S60DeployConfigurationFactory(QObject *parent = 0);
~S60DeployConfigurationFactory();
- bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Target *parent, Core::Id id) const;
+ ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, Core::Id id);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
ProjectExplorer::DeployConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::DeployConfiguration *source) const;
ProjectExplorer::DeployConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::DeployConfiguration *source);
- QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
// used to translate the ids to names to display to the user
- QString displayNameForId(const QString &id) const;
+ QString displayNameForId(Core::Id id) const;
};
} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
index 0cac072fb6..134015647b 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.cpp
@@ -117,7 +117,7 @@ S60DeployStep::S60DeployStep(ProjectExplorer::BuildStepList *bc,
}
S60DeployStep::S60DeployStep(ProjectExplorer::BuildStepList *bc):
- BuildStep(bc, QLatin1String(S60_DEPLOY_STEP_ID)), m_timer(0),
+ BuildStep(bc, Core::Id(S60_DEPLOY_STEP_ID)), m_timer(0),
m_timeoutTimer(new QTimer(this)),
m_eventLoop(0),
m_state(StateUninit),
@@ -674,16 +674,16 @@ S60DeployStepFactory::~S60DeployStepFactory()
{
}
-bool S60DeployStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const
+bool S60DeployStepFactory::canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const
{
- if (parent->id() != QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY))
+ if (parent->id() != Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY))
return false;
- if (parent->target()->id() != QLatin1String(Constants::S60_DEVICE_TARGET_ID))
+ if (parent->target()->id() != Core::Id(Constants::S60_DEVICE_TARGET_ID))
return false;
- return (id == QLatin1String(S60_DEPLOY_STEP_ID));
+ return (id == Core::Id(S60_DEPLOY_STEP_ID));
}
-ProjectExplorer::BuildStep *S60DeployStepFactory::create(ProjectExplorer::BuildStepList *parent, const QString &id)
+ProjectExplorer::BuildStep *S60DeployStepFactory::create(ProjectExplorer::BuildStepList *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -708,8 +708,7 @@ ProjectExplorer::BuildStep *S60DeployStepFactory::clone(ProjectExplorer::BuildSt
bool S60DeployStepFactory::canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const
{
- QString id(ProjectExplorer::idFromMap(map));
- return canCreate(parent, id);
+ return canCreate(parent, ProjectExplorer::idFromMap(map));
}
ProjectExplorer::BuildStep *S60DeployStepFactory::restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map)
@@ -723,17 +722,17 @@ ProjectExplorer::BuildStep *S60DeployStepFactory::restore(ProjectExplorer::Build
return 0;
}
-QStringList S60DeployStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
+QList<Core::Id> S60DeployStepFactory::availableCreationIds(ProjectExplorer::BuildStepList *parent) const
{
- if (parent->id() == QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
- && parent->target()->id() == QLatin1String(Constants::S60_DEVICE_TARGET_ID))
- return QStringList() << QLatin1String(S60_DEPLOY_STEP_ID);
- return QStringList();
+ if (parent->id() == Core::Id(ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
+ && parent->target()->id() == Core::Id(Constants::S60_DEVICE_TARGET_ID))
+ return QList<Core::Id>() << Core::Id(S60_DEPLOY_STEP_ID);
+ return QList<Core::Id>();
}
-QString S60DeployStepFactory::displayNameForId(const QString &id) const
+QString S60DeployStepFactory::displayNameForId(const Core::Id id) const
{
- if (id == QLatin1String(S60_DEPLOY_STEP_ID))
+ if (id == Core::Id(S60_DEPLOY_STEP_ID))
return tr("Deploy SIS Package");
return QString();
}
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h
index 33e379bc69..bbe172f4bd 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h
+++ b/src/plugins/qt4projectmanager/qt-s60/s60deploystep.h
@@ -71,12 +71,12 @@ public:
virtual ~S60DeployStepFactory();
// used to show the list of possible additons to a target, returns a list of types
- QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
// used to translate the types to names to display to the user
- QString displayNameForId(const QString &id) const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
// used to recreate the runConfigurations when restoring settings
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
index 278a658602..8880371911 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.cpp
@@ -62,11 +62,13 @@ const char * const COMMAND_LINE_ARGUMENTS_KEY("Qt4ProjectManager.S60DeviceRunCon
enum { debug = 0 };
-QString pathFromId(const QString &id)
+QString pathFromId(Core::Id id)
{
- if (!id.startsWith(QLatin1String(S60_DEVICE_RC_PREFIX)))
+ QString idstr = QString::fromUtf8(id.name());
+ const QString prefix = QLatin1String(S60_DEVICE_RC_PREFIX);
+ if (!idstr.startsWith(prefix))
return QString();
- return id.mid(QString::fromLatin1(S60_DEVICE_RC_PREFIX).size());
+ return idstr.mid(prefix.size());
}
} // anonymous namespace
@@ -74,7 +76,7 @@ QString pathFromId(const QString &id)
// ======== S60DeviceRunConfiguration
S60DeviceRunConfiguration::S60DeviceRunConfiguration(Qt4BaseTarget *parent, const QString &proFilePath) :
- RunConfiguration(parent, QLatin1String(S60_DEVICE_RC_ID)),
+ RunConfiguration(parent, Core::Id(S60_DEVICE_RC_ID)),
m_proFilePath(proFilePath),
m_validParse(parent->qt4Project()->validParse(proFilePath)),
m_parseInProgress(parent->qt4Project()->parseInProgress(proFilePath))
@@ -316,31 +318,35 @@ S60DeviceRunConfigurationFactory::~S60DeviceRunConfigurationFactory()
{
}
-QStringList S60DeviceRunConfigurationFactory::availableCreationIds(Target *parent) const
+QList<Core::Id> S60DeviceRunConfigurationFactory::availableCreationIds(Target *parent) const
{
+ QList<Core::Id> result;
Qt4SymbianTarget *target = qobject_cast<Qt4SymbianTarget *>(parent);
- if (!target || target->id() != QLatin1String(Constants::S60_DEVICE_TARGET_ID))
- return QStringList();
+ if (!target || target->id() != Core::Id(Constants::S60_DEVICE_TARGET_ID))
+ return result;
- return target->qt4Project()->applicationProFilePathes(QLatin1String(S60_DEVICE_RC_PREFIX));
+ QStringList proFiles = target->qt4Project()->applicationProFilePathes(QLatin1String(S60_DEVICE_RC_PREFIX));
+ foreach (const QString &pf, proFiles)
+ result << Core::Id(pf.toUtf8().constData());
+ return result;
}
-QString S60DeviceRunConfigurationFactory::displayNameForId(const QString &id) const
+QString S60DeviceRunConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (!pathFromId(id).isEmpty())
return tr("%1 on Symbian Device").arg(QFileInfo(pathFromId(id)).completeBaseName());
return QString();
}
-bool S60DeviceRunConfigurationFactory::canCreate(Target *parent, const QString &id) const
+bool S60DeviceRunConfigurationFactory::canCreate(Target *parent, const Core::Id id) const
{
Qt4SymbianTarget *t = qobject_cast<Qt4SymbianTarget *>(parent);
- if (!t || t->id() != QLatin1String(Constants::S60_DEVICE_TARGET_ID))
+ if (!t || t->id() != Core::Id(Constants::S60_DEVICE_TARGET_ID))
return false;
return t->qt4Project()->hasApplicationProFile(pathFromId(id));
}
-RunConfiguration *S60DeviceRunConfigurationFactory::create(Target *parent, const QString &id)
+RunConfiguration *S60DeviceRunConfigurationFactory::create(Target *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -352,9 +358,9 @@ RunConfiguration *S60DeviceRunConfigurationFactory::create(Target *parent, const
bool S60DeviceRunConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const
{
Qt4SymbianTarget *t = qobject_cast<Qt4SymbianTarget *>(parent);
- if (!t || t->id() != QLatin1String(Constants::S60_DEVICE_TARGET_ID))
+ if (!t || t->id() != Core::Id(Constants::S60_DEVICE_TARGET_ID))
return false;
- QString id = ProjectExplorer::idFromMap(map);
+ QString id = QString::fromUtf8(ProjectExplorer::idFromMap(map).name());
return id == QLatin1String(S60_DEVICE_RC_ID);
}
@@ -375,7 +381,7 @@ bool S60DeviceRunConfigurationFactory::canClone(Target *parent, RunConfiguration
{
if (!qobject_cast<Qt4SymbianTarget *>(parent))
return false;
- return source->id() == QLatin1String(S60_DEVICE_RC_ID);
+ return source->id() == Core::Id(S60_DEVICE_RC_ID);
}
RunConfiguration *S60DeviceRunConfigurationFactory::clone(Target *parent, RunConfiguration *source)
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
index 49a688ad7b..1480e04ff7 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt-s60/s60devicerunconfiguration.h
@@ -115,16 +115,16 @@ public:
explicit S60DeviceRunConfigurationFactory(QObject *parent = 0);
~S60DeviceRunConfigurationFactory();
- bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
+ ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
ProjectExplorer::RunConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source) const;
ProjectExplorer::RunConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::RunConfiguration *source);
- QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
// used to translate the ids to names to display to the user
- QString displayNameForId(const QString &id) const;
+ QString displayNameForId(const Core::Id id) const;
};
} // namespace Qt4ProjectManager
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp b/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp
index fbda8a5d12..158c9f98ae 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60publishingbuildsettingspageovi.cpp
@@ -56,7 +56,7 @@ S60PublishingBuildSettingsPageOvi::S60PublishingBuildSettingsPageOvi(S60Publishe
QList<Qt4BuildConfiguration *> list;
foreach (const ProjectExplorer::Target *const target, project->targets()) {
- if (target->id() != QLatin1String(Qt4ProjectManager::Constants::S60_DEVICE_TARGET_ID))
+ if (target->id() != Core::Id(Qt4ProjectManager::Constants::S60_DEVICE_TARGET_ID))
continue;
foreach (ProjectExplorer::BuildConfiguration * const bc, target->buildConfigurations()) {
Qt4BuildConfiguration * const qt4bc
diff --git a/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.cpp b/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.cpp
index 1600f95139..9ab0e9b60c 100644
--- a/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/s60publishingwizardfactories.cpp
@@ -71,7 +71,7 @@ bool S60PublishingWizardFactoryOvi::canCreateWizard(const Project *project) cons
if (!qobject_cast<const Qt4Project *>(project))
return false;
foreach (const Target *const target, project->targets()) {
- if (target->id() == QLatin1String(Constants::S60_DEVICE_TARGET_ID))
+ if (target->id() == Core::Id(Constants::S60_DEVICE_TARGET_ID))
return true;
}
return false;
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp b/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp
index d5bfcaae44..91320ebdfb 100644
--- a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp
+++ b/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.cpp
@@ -155,14 +155,14 @@ QList<ProjectExplorer::Abi> SymbianQtVersion::detectQtAbis() const
32);
}
-bool SymbianQtVersion::supportsTargetId(const QString &id) const
+bool SymbianQtVersion::supportsTargetId(Core::Id id) const
{
return supportedTargetIds().contains(id);
}
-QSet<QString> SymbianQtVersion::supportedTargetIds() const
+QSet<Core::Id> SymbianQtVersion::supportedTargetIds() const
{
- return QSet<QString>() << QLatin1String(Constants::S60_DEVICE_TARGET_ID);
+ return QSet<Core::Id>() << Core::Id(Constants::S60_DEVICE_TARGET_ID);
}
QString SymbianQtVersion::description() const
diff --git a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h b/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h
index f9eb410040..c072423b8c 100644
--- a/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h
+++ b/src/plugins/qt4projectmanager/qt-s60/symbianqtversion.h
@@ -61,8 +61,8 @@ public:
QList<ProjectExplorer::Abi> detectQtAbis() const;
- bool supportsTargetId(const QString &id) const;
- QSet<QString> supportedTargetIds() const;
+ bool supportsTargetId(Core::Id id) const;
+ QSet<Core::Id> supportedTargetIds() const;
QString description() const;
diff --git a/src/plugins/qt4projectmanager/qt4basetargetfactory.h b/src/plugins/qt4projectmanager/qt4basetargetfactory.h
index a93b2836aa..0177fb7e26 100644
--- a/src/plugins/qt4projectmanager/qt4basetargetfactory.h
+++ b/src/plugins/qt4projectmanager/qt4basetargetfactory.h
@@ -59,7 +59,7 @@ public:
explicit Qt4BaseTargetFactory(QObject *parent);
virtual ~Qt4BaseTargetFactory();
- virtual Qt4TargetSetupWidget *createTargetSetupWidget(const QString &id,
+ virtual Qt4TargetSetupWidget *createTargetSetupWidget(const Core::Id id,
const QString &proFilePath,
const QtSupport::QtVersionNumber &minimumQtVersion,
const QtSupport::QtVersionNumber &maximumQtVersion,
@@ -68,32 +68,34 @@ public:
QList<BuildConfigurationInfo> importInfos);
/// suffix should be unique
- virtual QString shadowBuildDirectory(const QString &profilePath, const QString &id, const QString &suffix);
+ virtual QString shadowBuildDirectory(const QString &profilePath, const Core::Id id, const QString &suffix);
/// used by the default implementation of shadowBuildDirectory
- virtual QString buildNameForId(const QString &id) const;
+ virtual QString buildNameForId(Core::Id id) const;
/// used by the default implementation of createTargetSetupWidget
/// not needed otherwise
/// by default creates one debug + one release buildconfiguration per qtversion
- virtual QList<BuildConfigurationInfo> availableBuildConfigurations(const QString &id, const QString &proFilePath,
+ virtual QList<BuildConfigurationInfo> availableBuildConfigurations(const Core::Id id, const QString &proFilePath,
const QtSupport::QtVersionNumber &minimumQtVersion,
const QtSupport::QtVersionNumber &maximumQtVersion,
const Core::FeatureSet &requiredFeatures);
virtual QList<ProjectExplorer::Task> reportIssues(const QString &proFile);
/// only used in the TargetSetupPage
- virtual QIcon iconForId(const QString &id) const = 0;
+ virtual QIcon iconForId(const Core::Id id) const = 0;
- virtual QSet<QString> targetFeatures(const QString &id) const = 0;
- virtual bool selectByDefault(const QString &id) const;
+ virtual QSet<QString> targetFeatures(const Core::Id id) const = 0;
+ virtual bool selectByDefault(const Core::Id id) const;
- virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id) = 0;
- virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, const QList<BuildConfigurationInfo> &infos) = 0;
- virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id, Qt4TargetSetupWidget *widget);
+ virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id) = 0;
+ virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id,
+ const QList<BuildConfigurationInfo> &infos) = 0;
+ virtual ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id,
+ Qt4TargetSetupWidget *widget);
- static Qt4BaseTargetFactory *qt4BaseTargetFactoryForId(const QString &id);
+ static Qt4BaseTargetFactory *qt4BaseTargetFactoryForId(const Core::Id id);
- static QList<Qt4BaseTargetFactory *> qt4BaseTargetFactoriesForIds(const QStringList &ids);
+ static QList<Qt4BaseTargetFactory *> qt4BaseTargetFactoriesForIds(const QList<Core::Id> &ids);
protected:
static QString msgBuildConfigurationName(const BuildConfigurationInfo &info);
diff --git a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
index 5c9b0302eb..f0a23778c3 100644
--- a/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
+++ b/src/plugins/qt4projectmanager/qt4buildconfiguration.cpp
@@ -71,7 +71,7 @@ enum { debug = 0 };
}
Qt4BuildConfiguration::Qt4BuildConfiguration(Qt4BaseTarget *target) :
- BuildConfiguration(target, QLatin1String(QT4_BC_ID)),
+ BuildConfiguration(target, Core::Id(QT4_BC_ID)),
m_shadowBuild(true),
m_isEnabled(false),
m_qtVersionId(-1),
@@ -81,7 +81,7 @@ Qt4BuildConfiguration::Qt4BuildConfiguration(Qt4BaseTarget *target) :
ctor();
}
-Qt4BuildConfiguration::Qt4BuildConfiguration(Qt4BaseTarget *target, const QString &id) :
+Qt4BuildConfiguration::Qt4BuildConfiguration(Qt4BaseTarget *target, const Core::Id id) :
BuildConfiguration(target, id),
m_shadowBuild(true),
m_isEnabled(false),
@@ -165,10 +165,10 @@ bool Qt4BuildConfiguration::fromMap(const QVariantMap &map)
if (version && version->isValid()) {
qWarning("Warning: No tool chain available for '%s' from %s used in '%s'.",
qPrintable(version->displayName()), qPrintable(version->qmakeCommand().toUserOutput()),
- qPrintable(target()->id()));
+ qPrintable(target()->id().name()));
} else {
qWarning("Warning: No tool chain available for invalid Qt version used in '%s'.",
- qPrintable(target()->id()));
+ qPrintable(target()->id().name()));
}
}
@@ -323,7 +323,7 @@ static inline QString symbianMakeTarget(QtSupport::BaseQtVersion::QmakeBuildConf
QString Qt4BuildConfiguration::defaultMakeTarget() const
{
ToolChain *tc = toolChain();
- if (!tc || target()->id() != QLatin1String(Constants::S60_DEVICE_TARGET_ID))
+ if (!tc || target()->id() != Core::Id(Constants::S60_DEVICE_TARGET_ID))
return QString();
const QtSupport::BaseQtVersion::QmakeBuildConfigs buildConfig = qmakeBuildConfiguration();
@@ -439,7 +439,7 @@ QStringList Qt4BuildConfiguration::configCommandLineArguments() const
QMakeStep *Qt4BuildConfiguration::qmakeStep() const
{
QMakeStep *qs = 0;
- BuildStepList *bsl = stepList(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD));
+ BuildStepList *bsl = stepList(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD));
Q_ASSERT(bsl);
for (int i = 0; i < bsl->count(); ++i)
if ((qs = qobject_cast<QMakeStep *>(bsl->at(i))) != 0)
@@ -450,7 +450,7 @@ QMakeStep *Qt4BuildConfiguration::qmakeStep() const
MakeStep *Qt4BuildConfiguration::makeStep() const
{
MakeStep *ms = 0;
- BuildStepList *bsl = stepList(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD));
+ BuildStepList *bsl = stepList(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD));
Q_ASSERT(bsl);
for (int i = 0; i < bsl->count(); ++i)
if ((ms = qobject_cast<MakeStep *>(bsl->at(i))) != 0)
@@ -677,26 +677,26 @@ void Qt4BuildConfigurationFactory::update()
emit availableCreationIdsChanged();
}
-QStringList Qt4BuildConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
+QList<Core::Id> Qt4BuildConfigurationFactory::availableCreationIds(ProjectExplorer::Target *parent) const
{
+ QList<Core::Id> results;
if (!qobject_cast<Qt4BaseTarget *>(parent))
- return QStringList();
+ return results;
- QStringList results;
QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance();
QList<QtSupport::BaseQtVersion *> versions = vm->versionsForTargetId(parent->id());
foreach (QtSupport::BaseQtVersion *v, versions) {
if (v->toolChainAvailable(parent->id()))
- results << QLatin1String(QT4_BC_ID_PREFIX) + QString::number(v->uniqueId());
+ results << Core::Id(QLatin1String(QT4_BC_ID_PREFIX) + QString::number(v->uniqueId()));
}
return results;
}
-int idToUniqueId(const QString &id)
+int idToUniqueId(const Core::Id id)
{
- QString rest = id.mid(QString(QT4_BC_ID_PREFIX).length());
+ QString rest = id.name().mid(QString(QT4_BC_ID_PREFIX).length());
bool ok;
int unqieuid = rest.toInt(&ok);
if (!ok)
@@ -704,9 +704,9 @@ int idToUniqueId(const QString &id)
return unqieuid;
}
-QString Qt4BuildConfigurationFactory::displayNameForId(const QString &id) const
+QString Qt4BuildConfigurationFactory::displayNameForId(const Core::Id id) const
{
- if (!id.startsWith(QT4_BC_ID_PREFIX))
+ if (!id.name().startsWith(QT4_BC_ID_PREFIX))
return QString();
QtSupport::QtVersionManager *vm = QtSupport::QtVersionManager::instance();
@@ -716,11 +716,12 @@ QString Qt4BuildConfigurationFactory::displayNameForId(const QString &id) const
return tr("Using Qt Version \"%1\"").arg(v->displayName());
}
-bool Qt4BuildConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const QString &id) const
+bool Qt4BuildConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const
{
+ const QString idStr = QString::fromLatin1(id.name());
if (!qobject_cast<Qt4BaseTarget *>(parent))
return false;
- if (!id.startsWith(QT4_BC_ID_PREFIX))
+ if (!id.name().startsWith(QT4_BC_ID_PREFIX))
return false;
QtSupport::BaseQtVersion *version = QtSupport::QtVersionManager::instance()->version(idToUniqueId(id));
@@ -730,7 +731,7 @@ bool Qt4BuildConfigurationFactory::canCreate(ProjectExplorer::Target *parent, co
return true;
}
-BuildConfiguration *Qt4BuildConfigurationFactory::create(ProjectExplorer::Target *parent, const QString &id)
+BuildConfiguration *Qt4BuildConfigurationFactory::create(ProjectExplorer::Target *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -806,7 +807,7 @@ BuildConfiguration *Qt4BuildConfigurationFactory::clone(Target *parent, BuildCon
bool Qt4BuildConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const
{
- QString id = ProjectExplorer::idFromMap(map);
+ QString id = QString::fromLatin1(ProjectExplorer::idFromMap(map).name()); // unicode save
if (!qobject_cast<Qt4BaseTarget *>(parent))
return false;
return id.startsWith(QLatin1String(QT4_BC_ID_PREFIX)) ||
diff --git a/src/plugins/qt4projectmanager/qt4buildconfiguration.h b/src/plugins/qt4projectmanager/qt4buildconfiguration.h
index 8fb8a9deb7..1f007daac2 100644
--- a/src/plugins/qt4projectmanager/qt4buildconfiguration.h
+++ b/src/plugins/qt4projectmanager/qt4buildconfiguration.h
@@ -150,7 +150,7 @@ private slots:
protected:
Qt4BuildConfiguration(Qt4BaseTarget *target, Qt4BuildConfiguration *source);
- Qt4BuildConfiguration(Qt4BaseTarget *target, const QString &id);
+ Qt4BuildConfiguration(Qt4BaseTarget *target, const Core::Id id);
virtual bool fromMap(const QVariantMap &map);
private:
@@ -176,11 +176,11 @@ public:
explicit Qt4BuildConfigurationFactory(QObject *parent = 0);
~Qt4BuildConfigurationFactory();
- QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
- QString displayNameForId(const QString &id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
+ QString displayNameForId(const Core::Id id) const;
- bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- ProjectExplorer::BuildConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
+ ProjectExplorer::BuildConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source) const;
ProjectExplorer::BuildConfiguration *clone(ProjectExplorer::Target *parent, ProjectExplorer::BuildConfiguration *source);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp
index d5b595e3de..930e53021e 100644
--- a/src/plugins/qt4projectmanager/qt4nodes.cpp
+++ b/src/plugins/qt4projectmanager/qt4nodes.cpp
@@ -750,7 +750,7 @@ void Qt4PriFileNode::folderChanged(const QString &folder)
// Other platforms do not have a explicit list of files to package, but package
// directories
foreach (ProjectExplorer::Target *target, m_project->targets()) {
- if (target->id() == QLatin1String(Constants::S60_DEVICE_TARGET_ID)) {
+ if (target->id() == Core::Id(Constants::S60_DEVICE_TARGET_ID)) {
foreach (ProjectExplorer::BuildConfiguration *bc, target->buildConfigurations()) {
Qt4BuildConfiguration *qt4bc = qobject_cast<Qt4BuildConfiguration *>(bc);
if (qt4bc) {
diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp
index 21503c5dd4..4309dedac5 100644
--- a/src/plugins/qt4projectmanager/qt4project.cpp
+++ b/src/plugins/qt4projectmanager/qt4project.cpp
@@ -369,7 +369,7 @@ bool Qt4Project::fromMap(const QVariantMap &map)
QList<Target *>ts = targets();
foreach (Target *t, ts) {
if (t->buildConfigurations().isEmpty()) {
- qWarning() << "Removing" << t->id() << "since it has no buildconfigurations!";
+ qWarning() << "Removing" << t->id().name() << "since it has no buildconfigurations!";
removeTarget(t);
delete t;
}
@@ -860,9 +860,9 @@ QString Qt4Project::displayName() const
return QFileInfo(document()->fileName()).completeBaseName();
}
-QString Qt4Project::id() const
+Core::Id Qt4Project::id() const
{
- return QLatin1String(Constants::QT4PROJECT_ID);
+ return Core::Id(Constants::QT4PROJECT_ID);
}
Core::IDocument *Qt4Project::document() const
@@ -1336,7 +1336,7 @@ void Qt4Project::configureAsExampleProject(const QStringList &platforms)
{
QList<Qt4BaseTargetFactory *> factories = ExtensionSystem::PluginManager::instance()->getObjects<Qt4BaseTargetFactory>();
foreach (Qt4BaseTargetFactory *factory, factories) {
- foreach (const QString &id, factory->supportedTargetIds()) {
+ foreach (const Core::Id id, factory->supportedTargetIds()) {
QList<BuildConfigurationInfo> infos
= factory->availableBuildConfigurations(id, rootProjectNode()->path(),
QtSupport::QtVersionNumber(),
diff --git a/src/plugins/qt4projectmanager/qt4project.h b/src/plugins/qt4projectmanager/qt4project.h
index a22ab931a2..b54518a5d1 100644
--- a/src/plugins/qt4projectmanager/qt4project.h
+++ b/src/plugins/qt4projectmanager/qt4project.h
@@ -88,7 +88,7 @@ public:
virtual ~Qt4Project();
QString displayName() const;
- QString id() const;
+ Core::Id id() const;
Core::IDocument *document() const;
ProjectExplorer::IProjectManager *projectManager() const;
Qt4Manager *qt4ProjectManager() const;
diff --git a/src/plugins/qt4projectmanager/qt4projectmanager.cpp b/src/plugins/qt4projectmanager/qt4projectmanager.cpp
index c81e57ddb4..7525379736 100644
--- a/src/plugins/qt4projectmanager/qt4projectmanager.cpp
+++ b/src/plugins/qt4projectmanager/qt4projectmanager.cpp
@@ -417,8 +417,8 @@ void Qt4Manager::handleSubDirContexMenu(Qt4Manager::Action action)
bc->setSubNodeBuild(profile);
if (projectExplorer()->saveModifiedFiles()) {
- const QString buildStep = QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
- const QString cleanStep = QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
+ const Core::Id buildStep = Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
+ const Core::Id cleanStep = Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN);
if (action == BUILD) {
const QString name = ProjectExplorer::ProjectExplorerPlugin::displayNameForStepId(buildStep);
projectExplorer()->buildManager()->buildList(bc->stepList(buildStep), name);
diff --git a/src/plugins/qt4projectmanager/qt4target.cpp b/src/plugins/qt4projectmanager/qt4target.cpp
index 99f309b884..adfe39b697 100644
--- a/src/plugins/qt4projectmanager/qt4target.cpp
+++ b/src/plugins/qt4projectmanager/qt4target.cpp
@@ -90,7 +90,7 @@ Qt4BaseTargetFactory::~Qt4BaseTargetFactory()
}
-Qt4TargetSetupWidget *Qt4BaseTargetFactory::createTargetSetupWidget(const QString &id,
+Qt4TargetSetupWidget *Qt4BaseTargetFactory::createTargetSetupWidget(const Core::Id id,
const QString &proFilePath,
const QtSupport::QtVersionNumber &minimumQtVersion,
const QtSupport::QtVersionNumber &maximumQtVersion,
@@ -117,7 +117,7 @@ Qt4TargetSetupWidget *Qt4BaseTargetFactory::createTargetSetupWidget(const QStrin
return widget;
}
-ProjectExplorer::Target *Qt4BaseTargetFactory::create(ProjectExplorer::Project *parent, const QString &id, Qt4TargetSetupWidget *widget)
+ProjectExplorer::Target *Qt4BaseTargetFactory::create(ProjectExplorer::Project *parent, const Core::Id id, Qt4TargetSetupWidget *widget)
{
if (!widget->isTargetSelected())
return 0;
@@ -127,7 +127,7 @@ ProjectExplorer::Target *Qt4BaseTargetFactory::create(ProjectExplorer::Project *
return create(parent, id, w->buildConfigurationInfos());
}
-QList<BuildConfigurationInfo> Qt4BaseTargetFactory::availableBuildConfigurations(const QString &id, const QString &proFilePath,
+QList<BuildConfigurationInfo> Qt4BaseTargetFactory::availableBuildConfigurations(const Core::Id id, const QString &proFilePath,
const QtSupport::QtVersionNumber &minimumQtVersion,
const QtSupport::QtVersionNumber &maximumQtVersion,
const Core::FeatureSet &requiredFeatures)
@@ -180,7 +180,7 @@ QString projectDirectory(const QString &proFile)
return info.absoluteDir().path();
}
-QString Qt4BaseTargetFactory::shadowBuildDirectory(const QString &profilePath, const QString &id, const QString &suffix)
+QString Qt4BaseTargetFactory::shadowBuildDirectory(const QString &profilePath, const Core::Id id, const QString &suffix)
{
if (profilePath.isEmpty())
return QString();
@@ -190,13 +190,13 @@ QString Qt4BaseTargetFactory::shadowBuildDirectory(const QString &profilePath, c
return base + buildNameForId(id) + QLatin1String("-") + sanitize(suffix);
}
-QString Qt4BaseTargetFactory::buildNameForId(const QString &id) const
+QString Qt4BaseTargetFactory::buildNameForId(Core::Id id) const
{
Q_UNUSED(id);
return QString();
}
-Qt4BaseTargetFactory *Qt4BaseTargetFactory::qt4BaseTargetFactoryForId(const QString &id)
+Qt4BaseTargetFactory *Qt4BaseTargetFactory::qt4BaseTargetFactoryForId(const Core::Id id)
{
QList<Qt4BaseTargetFactory *> factories = ExtensionSystem::PluginManager::instance()->getObjects<Qt4BaseTargetFactory>();
foreach (Qt4BaseTargetFactory *fac, factories) {
@@ -206,10 +206,10 @@ Qt4BaseTargetFactory *Qt4BaseTargetFactory::qt4BaseTargetFactoryForId(const QStr
return 0;
}
-QList<Qt4BaseTargetFactory *> Qt4BaseTargetFactory::qt4BaseTargetFactoriesForIds(const QStringList &ids)
+QList<Qt4BaseTargetFactory *> Qt4BaseTargetFactory::qt4BaseTargetFactoriesForIds(const QList<Core::Id> &ids)
{
QList<Qt4BaseTargetFactory *> factories;
- foreach (const QString &id, ids)
+ foreach (Core::Id id, ids)
if (Qt4BaseTargetFactory *factory = qt4BaseTargetFactoryForId(id))
factories << factory;
@@ -235,7 +235,7 @@ QList<ProjectExplorer::Task> Qt4BaseTargetFactory::reportIssues(const QString &p
return QList<ProjectExplorer::Task>();
}
-bool Qt4BaseTargetFactory::selectByDefault(const QString &id) const
+bool Qt4BaseTargetFactory::selectByDefault(const Core::Id id) const
{
Q_UNUSED(id);
return true;
@@ -245,7 +245,7 @@ bool Qt4BaseTargetFactory::selectByDefault(const QString &id) const
// Qt4BaseTarget
// -------------------------------------------------------------------------
-Qt4BaseTarget::Qt4BaseTarget(Qt4Project *parent, const QString &id) :
+Qt4BaseTarget::Qt4BaseTarget(Qt4Project *parent, const Core::Id id) :
ProjectExplorer::Target(parent, id)
{
connect(this, SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
@@ -373,9 +373,9 @@ Qt4BuildConfiguration *Qt4BaseTarget::addQt4BuildConfiguration(QString defaultDi
bc->setDisplayName(displayName);
ProjectExplorer::BuildStepList *buildSteps =
- bc->stepList(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_BUILD));
+ bc->stepList(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD));
ProjectExplorer::BuildStepList *cleanSteps =
- bc->stepList(QLatin1String(ProjectExplorer::Constants::BUILDSTEPS_CLEAN));
+ bc->stepList(Core::Id(ProjectExplorer::Constants::BUILDSTEPS_CLEAN));
Q_ASSERT(buildSteps);
Q_ASSERT(cleanSteps);
@@ -487,7 +487,7 @@ QString issuesListToString(const QList<ProjectExplorer::Task> &issues)
}
Qt4DefaultTargetSetupWidget::Qt4DefaultTargetSetupWidget(Qt4BaseTargetFactory *factory,
- const QString &id,
+ Core::Id id,
const QString &proFilePath,
const QList<BuildConfigurationInfo> &infos,
const QtSupport::QtVersionNumber &minimumQtVersion,
@@ -1371,7 +1371,7 @@ QPair<ProjectExplorer::Task::TaskType, QString> Qt4DefaultTargetSetupWidget::fin
// BuildConfigurationInfo
// -----------------------
-QList<BuildConfigurationInfo> BuildConfigurationInfo::filterBuildConfigurationInfos(const QList<BuildConfigurationInfo> &infos, const QString &id)
+QList<BuildConfigurationInfo> BuildConfigurationInfo::filterBuildConfigurationInfos(const QList<BuildConfigurationInfo> &infos, Core::Id id)
{
QList<BuildConfigurationInfo> result;
foreach (const BuildConfigurationInfo &info, infos)
@@ -1427,7 +1427,7 @@ QList<BuildConfigurationInfo> BuildConfigurationInfo::importBuildConfigurations(
QList<Qt4BaseTargetFactory *> factories =
ExtensionSystem::PluginManager::instance()->getObjects<Qt4BaseTargetFactory>();
foreach (Qt4BaseTargetFactory *factory, factories) {
- foreach (const QString &id, factory->supportedTargetIds()) {
+ foreach (const Core::Id id, factory->supportedTargetIds()) {
QString expectedBuildprefix = factory->shadowBuildDirectory(proFilePath, id, QString());
QString baseDir = QFileInfo(expectedBuildprefix).absolutePath();
foreach (const QString &dir, QDir(baseDir).entryList()) {
diff --git a/src/plugins/qt4projectmanager/qt4target.h b/src/plugins/qt4projectmanager/qt4target.h
index 1c3af0e94c..d45e05ee4a 100644
--- a/src/plugins/qt4projectmanager/qt4target.h
+++ b/src/plugins/qt4projectmanager/qt4target.h
@@ -69,7 +69,7 @@ class QT4PROJECTMANAGER_EXPORT Qt4BaseTarget : public ProjectExplorer::Target
{
Q_OBJECT
public:
- Qt4BaseTarget(Qt4Project *parent, const QString &id);
+ Qt4BaseTarget(Qt4Project *parent, const Core::Id id);
virtual ~Qt4BaseTarget();
ProjectExplorer::BuildConfigWidget *createConfigWidget();
@@ -125,7 +125,7 @@ class Qt4DefaultTargetSetupWidget : public Qt4TargetSetupWidget
public:
enum ShadowBuildOption { DISABLE, ENABLE, USER };
Qt4DefaultTargetSetupWidget(Qt4BaseTargetFactory *factory,
- const QString &id,
+ Core::Id id,
const QString &proFilePath,
const QList<BuildConfigurationInfo> &info,
const QtSupport::QtVersionNumber &minimumQtVersion,
@@ -176,7 +176,7 @@ private:
QPair<ProjectExplorer::Task::TaskType, QString> findIssues(const BuildConfigurationInfo &info);
void createImportWidget(const BuildConfigurationInfo &info, int pos);
- QString m_id;
+ Core::Id m_id;
Qt4BaseTargetFactory *m_factory;
QString m_proFilePath;
QtSupport::QtVersionNumber m_minimumQtVersion;
diff --git a/src/plugins/qt4projectmanager/winceqtversion.cpp b/src/plugins/qt4projectmanager/winceqtversion.cpp
index 372e20dd19..6c432cd8e7 100644
--- a/src/plugins/qt4projectmanager/winceqtversion.cpp
+++ b/src/plugins/qt4projectmanager/winceqtversion.cpp
@@ -79,14 +79,14 @@ QList<ProjectExplorer::Abi> WinCeQtVersion::detectQtAbis() const
false);
}
-bool WinCeQtVersion::supportsTargetId(const QString &id) const
+bool WinCeQtVersion::supportsTargetId(Core::Id id) const
{
- return id == QLatin1String(Constants::DESKTOP_TARGET_ID);
+ return id == Core::Id(Constants::DESKTOP_TARGET_ID);
}
-QSet<QString> WinCeQtVersion::supportedTargetIds() const
+QSet<Core::Id> WinCeQtVersion::supportedTargetIds() const
{
- return QSet<QString>() << QLatin1String(Constants::DESKTOP_TARGET_ID);
+ return QSet<Core::Id>() << Core::Id(Constants::DESKTOP_TARGET_ID);
}
QString WinCeQtVersion::description() const
diff --git a/src/plugins/qt4projectmanager/winceqtversion.h b/src/plugins/qt4projectmanager/winceqtversion.h
index 265e15055e..be0125aadc 100644
--- a/src/plugins/qt4projectmanager/winceqtversion.h
+++ b/src/plugins/qt4projectmanager/winceqtversion.h
@@ -51,8 +51,8 @@ public:
QList<ProjectExplorer::Abi> detectQtAbis() const;
- bool supportsTargetId(const QString &id) const;
- QSet<QString> supportedTargetIds() const;
+ bool supportsTargetId(Core::Id id) const;
+ QSet<Core::Id> supportedTargetIds() const;
QString description() const;
diff --git a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
index ed5a18905a..a0c4884b40 100644
--- a/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/abstractmobileappwizard.cpp
@@ -204,22 +204,22 @@ Utils::WizardProgressItem *AbstractMobileAppWizardDialog::itemOfNextGenericPage(
bool AbstractMobileAppWizardDialog::isSymbianTargetSelected() const
{
- return m_targetsPage->isTargetSelected(QLatin1String(Constants::S60_DEVICE_TARGET_ID));
+ return m_targetsPage->isTargetSelected(Core::Id(Constants::S60_DEVICE_TARGET_ID));
}
bool AbstractMobileAppWizardDialog::isFremantleTargetSelected() const
{
- return m_targetsPage->isTargetSelected(QLatin1String(Constants::MAEMO5_DEVICE_TARGET_ID));
+ return m_targetsPage->isTargetSelected(Core::Id(Constants::MAEMO5_DEVICE_TARGET_ID));
}
bool AbstractMobileAppWizardDialog::isHarmattanTargetSelected() const
{
- return m_targetsPage->isTargetSelected(QLatin1String(Constants::HARMATTAN_DEVICE_TARGET_ID));
+ return m_targetsPage->isTargetSelected(Core::Id(Constants::HARMATTAN_DEVICE_TARGET_ID));
}
bool AbstractMobileAppWizardDialog::isMeegoTargetSelected() const
{
- return m_targetsPage->isTargetSelected(QLatin1String(Constants::MEEGO_DEVICE_TARGET_ID));
+ return m_targetsPage->isTargetSelected(Core::Id(Constants::MEEGO_DEVICE_TARGET_ID));
}
diff --git a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
index 8554c91d8d..5eac1936c3 100644
--- a/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/guiappwizarddialog.cpp
@@ -115,13 +115,13 @@ GuiAppParameters GuiAppWizardDialog::parameters() const
rc.formFileName = m_filesPage->formFileName();
rc.designerForm = m_filesPage->formInputChecked();
rc.isMobileApplication = true;
- if (isTargetSelected(QLatin1String(Constants::MAEMO5_DEVICE_TARGET_ID))
- || isTargetSelected(QLatin1String(Constants::HARMATTAN_DEVICE_TARGET_ID))
- || isTargetSelected(QLatin1String(Constants::MEEGO_DEVICE_TARGET_ID))
- || isTargetSelected(QLatin1String(Constants::ANDROID_DEVICE_TARGET_ID))) {
+ if (isTargetSelected(Core::Id(Constants::MAEMO5_DEVICE_TARGET_ID))
+ || isTargetSelected(Core::Id(Constants::HARMATTAN_DEVICE_TARGET_ID))
+ || isTargetSelected(Core::Id(Constants::MEEGO_DEVICE_TARGET_ID))
+ || isTargetSelected(Core::Id(Constants::ANDROID_DEVICE_TARGET_ID))) {
rc.widgetWidth = 800;
rc.widgetHeight = 480;
- } else if (isTargetSelected(QLatin1String(Constants::S60_DEVICE_TARGET_ID))) {
+ } else if (isTargetSelected(Core::Id(Constants::S60_DEVICE_TARGET_ID))) {
rc.widgetWidth = 360;
rc.widgetHeight = 640;
} else {
diff --git a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
index b973bfb8a3..02927a41fd 100644
--- a/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
+++ b/src/plugins/qt4projectmanager/wizards/librarywizarddialog.cpp
@@ -235,7 +235,7 @@ int LibraryWizardDialog::nextId() const
int next = m_modulesPageId;
- const bool symbianTargetEnabled = isTargetSelected(QLatin1String(Constants::S60_DEVICE_TARGET_ID));
+ const bool symbianTargetEnabled = isTargetSelected(Core::Id(Constants::S60_DEVICE_TARGET_ID));
// If there was no Symbian target defined we omit "Symbian specific" step
// We also omit this step if the library type is not dll
diff --git a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp b/src/plugins/qt4projectmanager/wizards/qtwizard.cpp
index bfe642b2f6..c6393c11bf 100644
--- a/src/plugins/qt4projectmanager/wizards/qtwizard.cpp
+++ b/src/plugins/qt4projectmanager/wizards/qtwizard.cpp
@@ -315,7 +315,7 @@ bool BaseQt4ProjectWizardDialog::setupProject(Qt4Project *project) const
return m_targetSetupPage->setupProject(project);
}
-bool BaseQt4ProjectWizardDialog::isTargetSelected(const QString &targetid) const
+bool BaseQt4ProjectWizardDialog::isTargetSelected(Core::Id targetid) const
{
return m_targetSetupPage->isTargetSelected(targetid);
}
diff --git a/src/plugins/qt4projectmanager/wizards/qtwizard.h b/src/plugins/qt4projectmanager/wizards/qtwizard.h
index ababad4175..e1f5aac2e3 100644
--- a/src/plugins/qt4projectmanager/wizards/qtwizard.h
+++ b/src/plugins/qt4projectmanager/wizards/qtwizard.h
@@ -142,7 +142,7 @@ public:
bool writeUserFile(const QString &proFileName) const;
bool setupProject(Qt4Project *project) const;
- bool isTargetSelected(const QString &targetid) const;
+ bool isTargetSelected(Core::Id targetid) const;
void addExtensionPages(const QList<QWizardPage *> &wizardPageList);
diff --git a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
index 865ef95473..52e65ac773 100644
--- a/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
+++ b/src/plugins/qt4projectmanager/wizards/targetsetuppage.cpp
@@ -95,7 +95,7 @@ TargetSetupPage::~TargetSetupPage()
cleanupImportInfos();
}
-bool TargetSetupPage::isTargetSelected(const QString &id) const
+bool TargetSetupPage::isTargetSelected(Core::Id id) const
{
Qt4TargetSetupWidget *widget = m_widgets.value(id);
return widget && widget->isTargetSelected();
@@ -156,8 +156,8 @@ void TargetSetupPage::setupWidgets()
QList<Qt4BaseTargetFactory *> factories = ExtensionSystem::PluginManager::instance()->getObjects<Qt4BaseTargetFactory>();
bool atLeastOneTargetSelected = false;
foreach (Qt4BaseTargetFactory *factory, factories) {
- QStringList ids = factory->supportedTargetIds();
- foreach (const QString &id, ids) {
+ QList<Core::Id> ids = factory->supportedTargetIds();
+ foreach (Core::Id id, ids) {
if (!factory->targetFeatures(id).contains(m_requiredTargetFeatures))
continue;
@@ -203,7 +203,7 @@ void TargetSetupPage::setupWidgets()
}
}
if (!atLeastOneTargetSelected) {
- Qt4TargetSetupWidget *widget = m_widgets.value(QLatin1String(Constants::DESKTOP_TARGET_ID));
+ Qt4TargetSetupWidget *widget = m_widgets.value(Core::Id(Constants::DESKTOP_TARGET_ID));
if (widget)
widget->setTargetSelected(true);
}
@@ -290,7 +290,7 @@ void TargetSetupPage::qtVersionsChanged(const QList<int> &added, const QList<int
Q_UNUSED(added)
if (m_ignoreQtVersionChange)
return;
- QMap<QString, Qt4TargetSetupWidget *>::iterator it, end;
+ QMap<Core::Id, Qt4TargetSetupWidget *>::iterator it, end;
end = m_widgets.end();
it = m_widgets.begin();
for ( ; it != end; ++it) {
@@ -335,7 +335,7 @@ void TargetSetupPage::replaceQtVersionWithQtVersion(int oldId, int newId)
m_importInfos[i].qtVersionId = newId;
}
}
- QMap<QString, Qt4TargetSetupWidget *>::const_iterator it, end;
+ QMap<Core::Id, Qt4TargetSetupWidget *>::const_iterator it, end;
it = m_widgets.constBegin();
end = m_widgets.constEnd();
for ( ; it != end; ++it)
@@ -350,7 +350,7 @@ void TargetSetupPage::replaceQtVersionWithTemporaryQtVersion(int id, QtSupport::
m_importInfos[i].qtVersionId = -1;
}
}
- QMap<QString, Qt4TargetSetupWidget *>::const_iterator it, end;
+ QMap<Core::Id, Qt4TargetSetupWidget *>::const_iterator it, end;
it = m_widgets.constBegin();
end = m_widgets.constEnd();
for ( ; it != end; ++it)
@@ -365,7 +365,7 @@ void TargetSetupPage::replaceTemporaryQtVersion(QtSupport::BaseQtVersion *versio
m_importInfos[i].qtVersionId = id;
}
}
- QMap<QString, Qt4TargetSetupWidget *>::const_iterator it, end;
+ QMap<Core::Id, Qt4TargetSetupWidget *>::const_iterator it, end;
it = m_widgets.constBegin();
end = m_widgets.constEnd();
for ( ; it != end; ++it)
@@ -376,7 +376,7 @@ bool TargetSetupPage::setupProject(Qt4ProjectManager::Qt4Project *project)
{
m_ignoreQtVersionChange = true;
QtSupport::QtVersionManager *mgr = QtSupport::QtVersionManager::instance();
- QMap<QString, Qt4TargetSetupWidget *>::const_iterator it, end;
+ QMap<Core::Id, Qt4TargetSetupWidget *>::const_iterator it, end;
end = m_widgets.constEnd();
it = m_widgets.constBegin();
@@ -412,9 +412,9 @@ bool TargetSetupPage::setupProject(Qt4ProjectManager::Qt4Project *project)
ProjectExplorer::Target *activeTarget = 0;
QList<ProjectExplorer::Target *> targets = project->targets();
foreach (ProjectExplorer::Target *t, targets) {
- if (t->id() == QLatin1String(Constants::QT_SIMULATOR_TARGET_ID))
+ if (t->id() == Core::Id(Constants::QT_SIMULATOR_TARGET_ID))
activeTarget = t;
- else if (!activeTarget && t->id() == QLatin1String(Constants::DESKTOP_TARGET_ID))
+ else if (!activeTarget && t->id() == Core::Id(Constants::DESKTOP_TARGET_ID))
activeTarget = t;
}
if (!activeTarget && !targets.isEmpty())
diff --git a/src/plugins/qt4projectmanager/wizards/targetsetuppage.h b/src/plugins/qt4projectmanager/wizards/targetsetuppage.h
index a37735bdf5..1ff858eb79 100644
--- a/src/plugins/qt4projectmanager/wizards/targetsetuppage.h
+++ b/src/plugins/qt4projectmanager/wizards/targetsetuppage.h
@@ -101,7 +101,7 @@ public:
bool isComplete() const;
bool setupProject(Qt4ProjectManager::Qt4Project *project);
- bool isTargetSelected(const QString &id) const;
+ bool isTargetSelected(Core::Id id) const;
void setProFilePath(const QString &dir);
/// Overrides the summary text of the targetsetuppage
@@ -132,7 +132,7 @@ private:
QtSupport::QtVersionNumber m_maximumQtVersionNumber;
QString m_proFilePath;
QString m_defaultShadowBuildLocation;
- QMap<QString, Qt4TargetSetupWidget *> m_widgets;
+ QMap<Core::Id, Qt4TargetSetupWidget *> m_widgets;
QHash<Qt4TargetSetupWidget *, Qt4BaseTargetFactory *> m_factories;
QSpacerItem *m_spacer;
diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp
index f228b96252..e60c465614 100644
--- a/src/plugins/qtsupport/baseqtversion.cpp
+++ b/src/plugins/qtsupport/baseqtversion.cpp
@@ -370,7 +370,7 @@ Utils::FileName BaseQtVersion::qmakeCommand() const
return m_qmakeCommand;
}
-bool BaseQtVersion::toolChainAvailable(const QString &id) const
+bool BaseQtVersion::toolChainAvailable(Core::Id id) const
{
Q_UNUSED(id)
if (!isValid())
diff --git a/src/plugins/qtsupport/baseqtversion.h b/src/plugins/qtsupport/baseqtversion.h
index 8d09721fc9..794a457eb0 100644
--- a/src/plugins/qtsupport/baseqtversion.h
+++ b/src/plugins/qtsupport/baseqtversion.h
@@ -121,13 +121,13 @@ public:
virtual QString invalidReason() const;
virtual QString warningReason() const;
- virtual bool toolChainAvailable(const QString &id) const;
+ virtual bool toolChainAvailable(Core::Id id) const;
virtual QString description() const = 0;
virtual QString toHtml(bool verbose) const;
- virtual bool supportsTargetId(const QString &id) const = 0;
- virtual QSet<QString> supportedTargetIds() const = 0;
+ virtual bool supportsTargetId(Core::Id id) const = 0;
+ virtual QSet<Core::Id> supportedTargetIds() const = 0;
QList<ProjectExplorer::Abi> qtAbis() const;
virtual QList<ProjectExplorer::Abi> detectQtAbis() const = 0;
diff --git a/src/plugins/qtsupport/qtversionmanager.cpp b/src/plugins/qtsupport/qtversionmanager.cpp
index d5c086350b..5d0e01dd21 100644
--- a/src/plugins/qtsupport/qtversionmanager.cpp
+++ b/src/plugins/qtsupport/qtversionmanager.cpp
@@ -487,7 +487,7 @@ void QtVersionManager::removeVersion(BaseQtVersion *version)
delete version;
}
-bool QtVersionManager::supportsTargetId(const QString &id) const
+bool QtVersionManager::supportsTargetId(Core::Id id) const
{
QList<BaseQtVersion *> versions = QtVersionManager::instance()->versionsForTargetId(id);
foreach (BaseQtVersion *v, versions)
@@ -496,7 +496,7 @@ bool QtVersionManager::supportsTargetId(const QString &id) const
return false;
}
-QList<BaseQtVersion *> QtVersionManager::versionsForTargetId(const QString &id,
+QList<BaseQtVersion *> QtVersionManager::versionsForTargetId(Core::Id id,
const QtVersionNumber &minimumQtVersion,
const QtVersionNumber &maximumQtVersion) const
{
@@ -510,9 +510,9 @@ QList<BaseQtVersion *> QtVersionManager::versionsForTargetId(const QString &id,
return targetVersions;
}
-QSet<QString> QtVersionManager::supportedTargetIds() const
+QSet<Core::Id> QtVersionManager::supportedTargetIds() const
{
- QSet<QString> results;
+ QSet<Core::Id> results;
foreach (BaseQtVersion *version, m_versions)
results.unite(version->supportedTargetIds());
return results;
diff --git a/src/plugins/qtsupport/qtversionmanager.h b/src/plugins/qtsupport/qtversionmanager.h
index 1db9a36ca6..180a860d11 100644
--- a/src/plugins/qtsupport/qtversionmanager.h
+++ b/src/plugins/qtsupport/qtversionmanager.h
@@ -82,14 +82,14 @@ public:
void removeVersion(BaseQtVersion *version);
// Target Support:
- bool supportsTargetId(const QString &id) const;
+ bool supportsTargetId(Core::Id id) const;
// This returns a list of versions that support the target with the given id.
// @return A list of QtVersions that supports a target. This list may be empty!
- QList<BaseQtVersion *> versionsForTargetId(const QString &id,
+ QList<BaseQtVersion *> versionsForTargetId(Core::Id id,
const QtVersionNumber &minimumQtVersion = QtVersionNumber(),
const QtVersionNumber &maximumQtVersion = QtVersionNumber(INT_MAX, INT_MAX, INT_MAX)) const;
- QSet<QString> supportedTargetIds() const;
+ QSet<Core::Id> supportedTargetIds() const;
// Static Methods
enum MakefileCompatible { CouldNotParse, DifferentProject, SameProject };
diff --git a/src/plugins/remotelinux/abstractembeddedlinuxtarget.cpp b/src/plugins/remotelinux/abstractembeddedlinuxtarget.cpp
index 78f7eb775b..dd3f4c1fbb 100644
--- a/src/plugins/remotelinux/abstractembeddedlinuxtarget.cpp
+++ b/src/plugins/remotelinux/abstractembeddedlinuxtarget.cpp
@@ -41,7 +41,7 @@ using namespace Qt4ProjectManager;
namespace RemoteLinux {
-AbstractEmbeddedLinuxTarget::AbstractEmbeddedLinuxTarget(Qt4Project *parent, const QString &id) :
+AbstractEmbeddedLinuxTarget::AbstractEmbeddedLinuxTarget(Qt4Project *parent, const Core::Id id) :
Qt4BaseTarget(parent, id),
m_buildConfigurationFactory(new Qt4BuildConfigurationFactory(this)),
m_deploymentInfo(new DeploymentInfo(this)),
diff --git a/src/plugins/remotelinux/abstractembeddedlinuxtarget.h b/src/plugins/remotelinux/abstractembeddedlinuxtarget.h
index f6ff1fe8d7..4f60678d9a 100644
--- a/src/plugins/remotelinux/abstractembeddedlinuxtarget.h
+++ b/src/plugins/remotelinux/abstractembeddedlinuxtarget.h
@@ -53,7 +53,7 @@ class REMOTELINUX_EXPORT AbstractEmbeddedLinuxTarget : public Qt4ProjectManager:
{
Q_OBJECT
public:
- AbstractEmbeddedLinuxTarget(Qt4ProjectManager::Qt4Project *parent, const QString &id);
+ AbstractEmbeddedLinuxTarget(Qt4ProjectManager::Qt4Project *parent, const Core::Id id);
ProjectExplorer::IBuildConfigurationFactory *buildConfigurationFactory() const;
diff --git a/src/plugins/remotelinux/abstractpackagingstep.cpp b/src/plugins/remotelinux/abstractpackagingstep.cpp
index b71c675578..bd6284c440 100644
--- a/src/plugins/remotelinux/abstractpackagingstep.cpp
+++ b/src/plugins/remotelinux/abstractpackagingstep.cpp
@@ -60,7 +60,7 @@ public:
} // namespace Internal
-AbstractPackagingStep::AbstractPackagingStep(BuildStepList *bsl, const QString &id)
+AbstractPackagingStep::AbstractPackagingStep(BuildStepList *bsl, const Core::Id id)
: BuildStep(bsl, id)
{
ctor();
diff --git a/src/plugins/remotelinux/abstractpackagingstep.h b/src/plugins/remotelinux/abstractpackagingstep.h
index 3056aea488..50189bbae0 100644
--- a/src/plugins/remotelinux/abstractpackagingstep.h
+++ b/src/plugins/remotelinux/abstractpackagingstep.h
@@ -48,7 +48,7 @@ class REMOTELINUX_EXPORT AbstractPackagingStep : public ProjectExplorer::BuildSt
Q_OBJECT
public:
- AbstractPackagingStep(ProjectExplorer::BuildStepList *bsl, const QString &id);
+ AbstractPackagingStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
AbstractPackagingStep(ProjectExplorer::BuildStepList *bsl, AbstractPackagingStep *other);
~AbstractPackagingStep();
diff --git a/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp b/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp
index 380ab1092e..68a8f9fc92 100644
--- a/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp
+++ b/src/plugins/remotelinux/abstractremotelinuxdeploystep.cpp
@@ -52,7 +52,7 @@ public:
} // namespace Internal
-AbstractRemoteLinuxDeployStep::AbstractRemoteLinuxDeployStep(BuildStepList *bsl, const QString &id)
+AbstractRemoteLinuxDeployStep::AbstractRemoteLinuxDeployStep(BuildStepList *bsl, const Core::Id id)
: BuildStep(bsl, id), d(new Internal::AbstractRemoteLinuxDeployStepPrivate)
{
}
diff --git a/src/plugins/remotelinux/abstractremotelinuxdeploystep.h b/src/plugins/remotelinux/abstractremotelinuxdeploystep.h
index 0c68d56546..5339c6a834 100644
--- a/src/plugins/remotelinux/abstractremotelinuxdeploystep.h
+++ b/src/plugins/remotelinux/abstractremotelinuxdeploystep.h
@@ -63,7 +63,7 @@ public:
virtual AbstractRemoteLinuxDeployService *deployService() const = 0;
protected:
- AbstractRemoteLinuxDeployStep(ProjectExplorer::BuildStepList *bsl, const QString &id);
+ AbstractRemoteLinuxDeployStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
AbstractRemoteLinuxDeployStep(ProjectExplorer::BuildStepList *bsl,
AbstractRemoteLinuxDeployStep *other);
diff --git a/src/plugins/remotelinux/embeddedlinuxqtversion.cpp b/src/plugins/remotelinux/embeddedlinuxqtversion.cpp
index 024938c441..164aea8836 100644
--- a/src/plugins/remotelinux/embeddedlinuxqtversion.cpp
+++ b/src/plugins/remotelinux/embeddedlinuxqtversion.cpp
@@ -74,14 +74,14 @@ QList<ProjectExplorer::Abi> EmbeddedLinuxQtVersion::detectQtAbis() const
return qtAbisFromLibrary(qtCorePath(versionInfo(), qtVersionString()));
}
-bool EmbeddedLinuxQtVersion::supportsTargetId(const QString &id) const
+bool EmbeddedLinuxQtVersion::supportsTargetId(Core::Id id) const
{
- return id == QLatin1String(Constants::EMBEDDED_LINUX_TARGET_ID);
+ return id == Core::Id(Constants::EMBEDDED_LINUX_TARGET_ID);
}
-QSet<QString> EmbeddedLinuxQtVersion::supportedTargetIds() const
+QSet<Core::Id> EmbeddedLinuxQtVersion::supportedTargetIds() const
{
- return QSet<QString>() << QLatin1String(Constants::EMBEDDED_LINUX_TARGET_ID);
+ return QSet<Core::Id>() << Core::Id(Constants::EMBEDDED_LINUX_TARGET_ID);
}
QString EmbeddedLinuxQtVersion::description() const
diff --git a/src/plugins/remotelinux/embeddedlinuxqtversion.h b/src/plugins/remotelinux/embeddedlinuxqtversion.h
index 2820b48447..1e2aadf4be 100644
--- a/src/plugins/remotelinux/embeddedlinuxqtversion.h
+++ b/src/plugins/remotelinux/embeddedlinuxqtversion.h
@@ -52,8 +52,8 @@ public:
QList<ProjectExplorer::Abi> detectQtAbis() const;
- bool supportsTargetId(const QString &id) const;
- QSet<QString> supportedTargetIds() const;
+ bool supportsTargetId(Core::Id id) const;
+ QSet<Core::Id> supportedTargetIds() const;
QString description() const;
diff --git a/src/plugins/remotelinux/embeddedlinuxtargetfactory.cpp b/src/plugins/remotelinux/embeddedlinuxtargetfactory.cpp
index 7a9b05c92f..ce4474918e 100644
--- a/src/plugins/remotelinux/embeddedlinuxtargetfactory.cpp
+++ b/src/plugins/remotelinux/embeddedlinuxtargetfactory.cpp
@@ -57,22 +57,23 @@ EmbeddedLinuxTargetFactory::EmbeddedLinuxTargetFactory(QObject *parent) :
EmbeddedLinuxTargetFactory::~EmbeddedLinuxTargetFactory()
{ }
-QIcon EmbeddedLinuxTargetFactory::iconForId(const QString &id) const
+QIcon EmbeddedLinuxTargetFactory::iconForId(const Core::Id id) const
{
- if (id == QLatin1String(Constants::EMBEDDED_LINUX_TARGET_ID))
+ if (id == Core::Id(Constants::EMBEDDED_LINUX_TARGET_ID))
return QIcon(":/remotelinux/images/embeddedtarget.png");
return QIcon();
}
-QString EmbeddedLinuxTargetFactory::buildNameForId(const QString &id) const
+QString EmbeddedLinuxTargetFactory::buildNameForId(const Core::Id id) const
{
if (supportsTargetId(id))
return tr("embedded");
return QString();
}
-QSet<QString> EmbeddedLinuxTargetFactory::targetFeatures(const QString & /*id*/) const
+QSet<QString> EmbeddedLinuxTargetFactory::targetFeatures(const Core::Id id) const
{
+ Q_UNUSED(id);
QSet<QString> features;
features << Qt4ProjectManager::Constants::MOBILE_TARGETFEATURE_ID;
features << Qt4ProjectManager::Constants::SHADOWBUILD_TARGETFEATURE_ID;
@@ -80,19 +81,19 @@ QSet<QString> EmbeddedLinuxTargetFactory::targetFeatures(const QString & /*id*/)
return features;
}
-QStringList EmbeddedLinuxTargetFactory::supportedTargetIds() const
+QList<Core::Id> EmbeddedLinuxTargetFactory::supportedTargetIds() const
{
- return QStringList() << QLatin1String(RemoteLinux::Constants::EMBEDDED_LINUX_TARGET_ID);
+ return QList<Core::Id>() << Core::Id(RemoteLinux::Constants::EMBEDDED_LINUX_TARGET_ID);
}
-bool EmbeddedLinuxTargetFactory::supportsTargetId(const QString &id) const
+bool EmbeddedLinuxTargetFactory::supportsTargetId(const Core::Id id) const
{
- return id == RemoteLinux::Constants::EMBEDDED_LINUX_TARGET_ID;
+ return id == Core::Id(RemoteLinux::Constants::EMBEDDED_LINUX_TARGET_ID);
}
-QString EmbeddedLinuxTargetFactory::displayNameForId(const QString &id) const
+QString EmbeddedLinuxTargetFactory::displayNameForId(const Core::Id id) const
{
- if (id == RemoteLinux::Constants::EMBEDDED_LINUX_TARGET_ID)
+ if (id == Core::Id(RemoteLinux::Constants::EMBEDDED_LINUX_TARGET_ID))
return tr("Embedded Linux");
return QString();
}
@@ -106,8 +107,8 @@ ProjectExplorer::Target *EmbeddedLinuxTargetFactory::restore(ProjectExplorer::Pr
{
Q_ASSERT(canRestore(parent, map));
- GenericEmbeddedLinuxTarget *t = new GenericEmbeddedLinuxTarget(static_cast<Qt4ProjectManager::Qt4Project *>(parent),
- Constants::EMBEDDED_LINUX_TARGET_ID);
+ GenericEmbeddedLinuxTarget *t =
+ new GenericEmbeddedLinuxTarget(static_cast<Qt4ProjectManager::Qt4Project *>(parent), Core::Id());
if (t->fromMap(map))
return t;
@@ -115,7 +116,7 @@ ProjectExplorer::Target *EmbeddedLinuxTargetFactory::restore(ProjectExplorer::Pr
return 0;
}
-bool EmbeddedLinuxTargetFactory::canCreate(ProjectExplorer::Project *parent, const QString &id) const
+bool EmbeddedLinuxTargetFactory::canCreate(ProjectExplorer::Project *parent, const Core::Id id) const
{
Qt4ProjectManager::Qt4Project *project = qobject_cast<Qt4ProjectManager::Qt4Project *>(parent);
if (!project)
@@ -128,7 +129,7 @@ bool EmbeddedLinuxTargetFactory::canCreate(ProjectExplorer::Project *parent, con
}
ProjectExplorer::Target *EmbeddedLinuxTargetFactory::create(ProjectExplorer::Project *parent,
- const QString &id)
+ const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
@@ -148,7 +149,7 @@ ProjectExplorer::Target *EmbeddedLinuxTargetFactory::create(ProjectExplorer::Pro
}
ProjectExplorer::Target *EmbeddedLinuxTargetFactory::create(ProjectExplorer::Project *parent,
- const QString &id,
+ const Core::Id id,
const QList<Qt4ProjectManager::BuildConfigurationInfo> &infos)
{
if (!canCreate(parent, id) || infos.isEmpty())
diff --git a/src/plugins/remotelinux/embeddedlinuxtargetfactory.h b/src/plugins/remotelinux/embeddedlinuxtargetfactory.h
index 1f6709ced6..77f4d80803 100644
--- a/src/plugins/remotelinux/embeddedlinuxtargetfactory.h
+++ b/src/plugins/remotelinux/embeddedlinuxtargetfactory.h
@@ -46,22 +46,22 @@ public:
explicit EmbeddedLinuxTargetFactory(QObject *parent = 0);
~EmbeddedLinuxTargetFactory();
- QIcon iconForId(const QString &id) const;
- QString buildNameForId(const QString &id) const;
+ QIcon iconForId(const Core::Id id) const;
+ QString buildNameForId(const Core::Id id) const;
- QSet<QString> targetFeatures(const QString &id) const;
+ QSet<QString> targetFeatures(const Core::Id id) const;
- QStringList supportedTargetIds() const;
- bool supportsTargetId(const QString &id) const;
+ QList<Core::Id> supportedTargetIds() const;
+ bool supportsTargetId(const Core::Id id) const;
- QString displayNameForId(const QString &id) const;
+ QString displayNameForId(const Core::Id id) const;
bool canRestore(ProjectExplorer::Project *parent, const QVariantMap &map) const;
ProjectExplorer::Target *restore(ProjectExplorer::Project *parent, const QVariantMap &map);
- bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;
- ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id);
- ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const QString &id,
+ bool canCreate(ProjectExplorer::Project *parent, const Core::Id id) const;
+ ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id);
+ ProjectExplorer::Target *create(ProjectExplorer::Project *parent, const Core::Id id,
const QList<Qt4ProjectManager::BuildConfigurationInfo> &infos);
};
diff --git a/src/plugins/remotelinux/genericdirectuploadstep.cpp b/src/plugins/remotelinux/genericdirectuploadstep.cpp
index fe15607c92..58ba03ebf4 100644
--- a/src/plugins/remotelinux/genericdirectuploadstep.cpp
+++ b/src/plugins/remotelinux/genericdirectuploadstep.cpp
@@ -87,7 +87,7 @@ public:
} // namespace Internal
-GenericDirectUploadStep::GenericDirectUploadStep(ProjectExplorer::BuildStepList *bsl, const QString &id)
+GenericDirectUploadStep::GenericDirectUploadStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id)
: AbstractRemoteLinuxDeployStep(bsl, id)
{
ctor();
@@ -157,9 +157,9 @@ bool GenericDirectUploadStep::incrementalDeployment() const
return d->incremental;
}
-QString GenericDirectUploadStep::stepId()
+Core::Id GenericDirectUploadStep::stepId()
{
- return QLatin1String("RemoteLinux.DirectUploadStep");
+ return Core::Id("RemoteLinux.DirectUploadStep");
}
QString GenericDirectUploadStep::displayName()
diff --git a/src/plugins/remotelinux/genericdirectuploadstep.h b/src/plugins/remotelinux/genericdirectuploadstep.h
index 36c0ee3274..aca0960119 100644
--- a/src/plugins/remotelinux/genericdirectuploadstep.h
+++ b/src/plugins/remotelinux/genericdirectuploadstep.h
@@ -46,7 +46,7 @@ class REMOTELINUX_EXPORT GenericDirectUploadStep : public AbstractRemoteLinuxDep
Q_OBJECT
public:
- GenericDirectUploadStep(ProjectExplorer::BuildStepList *bsl, const QString &id);
+ GenericDirectUploadStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
GenericDirectUploadStep(ProjectExplorer::BuildStepList *bsl, GenericDirectUploadStep *other);
~GenericDirectUploadStep();
@@ -56,7 +56,7 @@ public:
void setIncrementalDeployment(bool incremental);
bool incrementalDeployment() const;
- static QString stepId();
+ static Core::Id stepId();
static QString displayName();
private:
diff --git a/src/plugins/remotelinux/genericembeddedlinuxtarget.cpp b/src/plugins/remotelinux/genericembeddedlinuxtarget.cpp
index db0371b7a2..39e600d164 100644
--- a/src/plugins/remotelinux/genericembeddedlinuxtarget.cpp
+++ b/src/plugins/remotelinux/genericembeddedlinuxtarget.cpp
@@ -48,7 +48,8 @@ namespace RemoteLinux {
namespace Internal {
GenericEmbeddedLinuxTarget::GenericEmbeddedLinuxTarget(Qt4ProjectManager::Qt4Project *parent,
- const QString &id) : AbstractEmbeddedLinuxTarget(parent, id)
+ const Core::Id id) :
+ AbstractEmbeddedLinuxTarget(parent, id)
{
setDisplayName(tr("Embedded Linux"));
}
@@ -95,7 +96,7 @@ void GenericEmbeddedLinuxTarget::createApplicationProFiles(bool reparse)
// Only add new runconfigurations if there are none.
foreach (const QString &path, pathes) {
RemoteLinuxRunConfiguration *qt4rc =
- new RemoteLinuxRunConfiguration(this, RemoteLinuxRunConfiguration::Id, path);
+ new RemoteLinuxRunConfiguration(this, Core::Id(RemoteLinuxRunConfiguration::Id), path);
addRunConfiguration(qt4rc);
}
diff --git a/src/plugins/remotelinux/genericembeddedlinuxtarget.h b/src/plugins/remotelinux/genericembeddedlinuxtarget.h
index cdb52f2034..fe84489b02 100644
--- a/src/plugins/remotelinux/genericembeddedlinuxtarget.h
+++ b/src/plugins/remotelinux/genericembeddedlinuxtarget.h
@@ -45,7 +45,7 @@ class GenericEmbeddedLinuxTarget : public AbstractEmbeddedLinuxTarget
Q_OBJECT
public:
- GenericEmbeddedLinuxTarget(Qt4ProjectManager::Qt4Project *parent, const QString &id);
+ GenericEmbeddedLinuxTarget(Qt4ProjectManager::Qt4Project *parent, const Core::Id id);
void createApplicationProFiles(bool reparse);
QList<ProjectExplorer::RunConfiguration *> runConfigurationsForNode(ProjectExplorer::Node *n);
diff --git a/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp b/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp
index 4840158396..961c7fc19b 100644
--- a/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp
+++ b/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.cpp
@@ -50,9 +50,9 @@ GenericRemoteLinuxDeployStepFactory::GenericRemoteLinuxDeployStepFactory(QObject
{
}
-QStringList GenericRemoteLinuxDeployStepFactory::availableCreationIds(BuildStepList *parent) const
+QList<Core::Id> GenericRemoteLinuxDeployStepFactory::availableCreationIds(BuildStepList *parent) const
{
- QStringList ids;
+ QList<Core::Id> ids;
const DeployConfiguration * const dc = qobject_cast<DeployConfiguration *>(parent->parent());
if (!dc || dc->id() != RemoteLinuxDeployConfigurationFactory::genericDeployConfigurationId())
return ids;
@@ -62,7 +62,7 @@ QStringList GenericRemoteLinuxDeployStepFactory::availableCreationIds(BuildStepL
return ids;
}
-QString GenericRemoteLinuxDeployStepFactory::displayNameForId(const QString &id) const
+QString GenericRemoteLinuxDeployStepFactory::displayNameForId(const Core::Id id) const
{
if (id == TarPackageCreationStep::stepId())
return TarPackageCreationStep::displayName();
@@ -75,12 +75,12 @@ QString GenericRemoteLinuxDeployStepFactory::displayNameForId(const QString &id)
return QString();
}
-bool GenericRemoteLinuxDeployStepFactory::canCreate(BuildStepList *parent, const QString &id) const
+bool GenericRemoteLinuxDeployStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
return availableCreationIds(parent).contains(id);
}
-BuildStep *GenericRemoteLinuxDeployStepFactory::create(BuildStepList *parent, const QString &id)
+BuildStep *GenericRemoteLinuxDeployStepFactory::create(BuildStepList *parent, const Core::Id id)
{
Q_ASSERT(canCreate(parent, id));
diff --git a/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.h b/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.h
index 7c4150e0f8..3498743757 100644
--- a/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.h
+++ b/src/plugins/remotelinux/genericremotelinuxdeploystepfactory.h
@@ -43,10 +43,10 @@ class GenericRemoteLinuxDeployStepFactory : public ProjectExplorer::IBuildStepFa
public:
GenericRemoteLinuxDeployStepFactory(QObject *parent = 0);
- QStringList availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
- QString displayNameForId(const QString &id) const;
- bool canCreate(ProjectExplorer::BuildStepList *parent, const QString &id) const;
- ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const QString &id);
+ QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
+ QString displayNameForId(const Core::Id id) const;
+ bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
+ ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent,
const QVariantMap &map);
diff --git a/src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.cpp b/src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.cpp
index 7fa49dbb9d..18f17e9b29 100644
--- a/src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.cpp
+++ b/src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.cpp
@@ -96,7 +96,7 @@ using namespace Internal;
AbstractRemoteLinuxCustomCommandDeploymentStep::AbstractRemoteLinuxCustomCommandDeploymentStep(BuildStepList *bsl,
- const QString &id)
+ const Core::Id id)
: AbstractRemoteLinuxDeployStep(bsl, id)
{
ctor();
@@ -185,9 +185,9 @@ RemoteLinuxCustomCommandDeployService *GenericRemoteLinuxCustomCommandDeployment
return &d->service;
}
-QString GenericRemoteLinuxCustomCommandDeploymentStep::stepId()
+Core::Id GenericRemoteLinuxCustomCommandDeploymentStep::stepId()
{
- return QLatin1String("RemoteLinux.GenericRemoteLinuxCustomCommandDeploymentStep");
+ return Core::Id("RemoteLinux.GenericRemoteLinuxCustomCommandDeploymentStep");
}
QString GenericRemoteLinuxCustomCommandDeploymentStep::stepDisplayName()
diff --git a/src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.h b/src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.h
index bf0591ad2f..57e9d00531 100644
--- a/src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.h
+++ b/src/plugins/remotelinux/remotelinuxcustomcommanddeploymentstep.h
@@ -56,8 +56,7 @@ public:
QString commandLine() const;
protected:
- AbstractRemoteLinuxCustomCommandDeploymentStep(ProjectExplorer::BuildStepList *bsl,
- const QString &id);
+ AbstractRemoteLinuxCustomCommandDeploymentStep(ProjectExplorer::BuildStepList *bsl, const Core::Id id);
AbstractRemoteLinuxCustomCommandDeploymentStep(ProjectExplorer::BuildStepList *bsl,
AbstractRemoteLinuxCustomCommandDeploymentStep *other);
@@ -83,7 +82,7 @@ public:
GenericRemoteLinuxCustomCommandDeploymentStep *other);
~GenericRemoteLinuxCustomCommandDeploymentStep();
- static QString stepId();
+ static Core::Id stepId();
static QString stepDisplayName();
private:
diff --git a/src/plugins/remotelinux/remotelinuxdeployconfiguration.cpp b/src/plugins/remotelinux/remotelinuxdeployconfiguration.cpp
index edf5ae3016..fdca61f8f0 100644
--- a/src/plugins/remotelinux/remotelinuxdeployconfiguration.cpp
+++ b/src/plugins/remotelinux/remotelinuxdeployconfiguration.cpp
@@ -60,7 +60,7 @@ public:
using namespace Internal;
RemoteLinuxDeployConfiguration::RemoteLinuxDeployConfiguration(ProjectExplorer::Target *target,
- const QString &id, const QString &defaultDisplayName)
+ const Core::Id id, const QString &defaultDisplayName)
: DeployConfiguration(target, id), d(new RemoteLinuxDeployConfigurationPrivate)
{
setDefaultDisplayName(defaultDisplayName);
diff --git a/src/plugins/remotelinux/remotelinuxdeployconfiguration.h b/src/plugins/remotelinux/remotelinuxdeployconfiguration.h
index a5f662a7e1..740a79b856 100644
--- a/src/plugins/remotelinux/remotelinuxdeployconfiguration.h
+++ b/src/plugins/remotelinux/remotelinuxdeployconfiguration.h
@@ -56,7 +56,7 @@ class REMOTELINUX_EXPORT RemoteLinuxDeployConfiguration
Q_OBJECT
Q_DISABLE_COPY(RemoteLinuxDeployConfiguration)
public:
- RemoteLinuxDeployConfiguration(ProjectExplorer::Target *target, const QString &id,
+ RemoteLinuxDeployConfiguration(ProjectExplorer::Target *target, const Core::Id id,
const QString &defaultDisplayName);
RemoteLinuxDeployConfiguration(ProjectExplorer::Target *target,
RemoteLinuxDeployConfiguration *source);
diff --git a/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp b/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp
index 7402794d6c..1e61adf65a 100644
--- a/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp
+++ b/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.cpp
@@ -51,28 +51,28 @@ RemoteLinuxDeployConfigurationFactory::RemoteLinuxDeployConfigurationFactory(QOb
: DeployConfigurationFactory(parent)
{ }
-QStringList RemoteLinuxDeployConfigurationFactory::availableCreationIds(Target *parent) const
+QList<Core::Id> RemoteLinuxDeployConfigurationFactory::availableCreationIds(Target *parent) const
{
- QStringList ids;
+ QList<Core::Id> ids;
if (qobject_cast<GenericEmbeddedLinuxTarget *>(parent))
ids << genericDeployConfigurationId();
return ids;
}
-QString RemoteLinuxDeployConfigurationFactory::displayNameForId(const QString &id) const
+QString RemoteLinuxDeployConfigurationFactory::displayNameForId(Core::Id id) const
{
if (id == genericDeployConfigurationId())
return genericLinuxDisplayName();
return QString();
}
-bool RemoteLinuxDeployConfigurationFactory::canCreate(Target *parent, const QString &id) const
+bool RemoteLinuxDeployConfigurationFactory::canCreate(Target *parent, Core::Id id) const
{
return availableCreationIds(parent).contains(id);
}
DeployConfiguration *RemoteLinuxDeployConfigurationFactory::create(Target *parent,
- const QString &id)
+ Core::Id id)
{
Q_ASSERT(canCreate(parent, id));
@@ -93,7 +93,7 @@ DeployConfiguration *RemoteLinuxDeployConfigurationFactory::restore(Target *pare
{
if (!canRestore(parent, map))
return 0;
- QString id = idFromMap(map);
+ Core::Id id = idFromMap(map);
RemoteLinuxDeployConfiguration * const dc = new RemoteLinuxDeployConfiguration(parent, id,
genericLinuxDisplayName());
if (!dc->fromMap(map)) {
@@ -112,9 +112,9 @@ DeployConfiguration *RemoteLinuxDeployConfigurationFactory::clone(Target *parent
qobject_cast<RemoteLinuxDeployConfiguration *>(product));
}
-QString RemoteLinuxDeployConfigurationFactory::genericDeployConfigurationId()
+Core::Id RemoteLinuxDeployConfigurationFactory::genericDeployConfigurationId()
{
- return QLatin1String("DeployToGenericLinux");
+ return Core::Id("DeployToGenericLinux");
}
} // namespace Internal
diff --git a/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.h b/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.h
index b2a4960b85..082aaacf8c 100644
--- a/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.h
+++ b/src/plugins/remotelinux/remotelinuxdeployconfigurationfactory.h
@@ -44,16 +44,16 @@ class RemoteLinuxDeployConfigurationFactory : public ProjectExplorer::DeployConf
public:
explicit RemoteLinuxDeployConfigurationFactory(QObject *parent = 0);
- QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
- QString displayNameForId(const QString &id) const;
- bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
+ QString displayNameForId(Core::Id id) const;
+ bool canCreate(ProjectExplorer::Target *parent, Core::Id id) const;
+ ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, Core::Id id);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
ProjectExplorer::DeployConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
ProjectExplorer::DeployConfiguration *clone(ProjectExplorer::Target *parent,
ProjectExplorer::DeployConfiguration *product);
- static QString genericDeployConfigurationId();
+ static Core::Id genericDeployConfigurationId();
};
} // namespace Internal
diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
index 67392b4cd6..cd624e2dc1 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
+++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.cpp
@@ -109,7 +109,7 @@ public:
using namespace Internal;
-RemoteLinuxRunConfiguration::RemoteLinuxRunConfiguration(Qt4BaseTarget *parent, const QString &id,
+RemoteLinuxRunConfiguration::RemoteLinuxRunConfiguration(Qt4BaseTarget *parent, const Core::Id id,
const QString &proFilePath)
: RunConfiguration(parent, id),
d(new RemoteLinuxRunConfigurationPrivate(proFilePath, parent))
diff --git a/src/plugins/remotelinux/remotelinuxrunconfiguration.h b/src/plugins/remotelinux/remotelinuxrunconfiguration.h
index 29b4656877..77ad9b16e3 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfiguration.h
+++ b/src/plugins/remotelinux/remotelinuxrunconfiguration.h
@@ -73,7 +73,7 @@ public:
enum DebuggingType { DebugCppOnly, DebugQmlOnly, DebugCppAndQml };
- RemoteLinuxRunConfiguration(Qt4ProjectManager::Qt4BaseTarget *parent, const QString &id,
+ RemoteLinuxRunConfiguration(Qt4ProjectManager::Qt4BaseTarget *parent, const Core::Id id,
const QString &proFilePath);
virtual ~RemoteLinuxRunConfiguration();
diff --git a/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp b/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp
index ebc07a51a3..921461bf23 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp
+++ b/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.cpp
@@ -50,11 +50,12 @@ namespace RemoteLinux {
namespace Internal {
namespace {
-QString pathFromId(const QString &id)
+QString pathFromId(Core::Id id)
{
- if (!id.startsWith(RemoteLinuxRunConfiguration::Id))
+ QString idStr = QString::fromUtf8(id.name());
+ if (!idStr.startsWith(RemoteLinuxRunConfiguration::Id))
return QString();
- return id.mid(RemoteLinuxRunConfiguration::Id.size());
+ return idStr.mid(RemoteLinuxRunConfiguration::Id.size());
}
} // namespace
@@ -69,9 +70,9 @@ RemoteLinuxRunConfigurationFactory::~RemoteLinuxRunConfigurationFactory()
}
bool RemoteLinuxRunConfigurationFactory::canCreate(Target *parent,
- const QString &id) const
+ const Core::Id id) const
{
- if (!id.startsWith(RemoteLinuxRunConfiguration::Id))
+ if (!QString::fromUtf8(id.name()).startsWith(RemoteLinuxRunConfiguration::Id))
return false;
return qobject_cast<Qt4BaseTarget *>(parent)->qt4Project()
->hasApplicationProFile(pathFromId(id));
@@ -80,39 +81,43 @@ bool RemoteLinuxRunConfigurationFactory::canCreate(Target *parent,
bool RemoteLinuxRunConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const
{
Q_UNUSED(parent);
- return ProjectExplorer::idFromMap(map).startsWith(RemoteLinuxRunConfiguration::Id);
+ return QString::fromLatin1(ProjectExplorer::idFromMap(map).name()).startsWith(RemoteLinuxRunConfiguration::Id);
}
bool RemoteLinuxRunConfigurationFactory::canClone(Target *parent, RunConfiguration *source) const
{
const RemoteLinuxRunConfiguration * const rlrc
= qobject_cast<RemoteLinuxRunConfiguration *>(source);
- return rlrc && canCreate(parent, source->id() + QLatin1Char('.') + rlrc->proFilePath());
+ const QString idStr = QString::fromLatin1(source->id().name()) + QLatin1Char('.') + rlrc->proFilePath();
+ return rlrc && canCreate(parent, Core::Id(idStr.toUtf8().constData()));
}
-QStringList RemoteLinuxRunConfigurationFactory::availableCreationIds(Target *parent) const
+QList<Core::Id> RemoteLinuxRunConfigurationFactory::availableCreationIds(Target *parent) const
{
+ QList<Core::Id> result;
const QList<DeployConfiguration *> &depConfs = parent->deployConfigurations();
foreach (const DeployConfiguration * const dc, depConfs) {
if (dc->id() == RemoteLinuxDeployConfigurationFactory::genericDeployConfigurationId()) {
- return qobject_cast<Qt4BaseTarget *>(parent)->qt4Project()
- ->applicationProFilePathes(RemoteLinuxRunConfiguration::Id);
+ QStringList proFiles = qobject_cast<Qt4BaseTarget *>(parent)->qt4Project()
+ ->applicationProFilePathes(RemoteLinuxRunConfiguration::Id);
+ foreach (const QString &pf, proFiles)
+ result << Core::Id(pf);
+ return result;
+ }
}
- }
- return QStringList();
+ return result;
}
-QString RemoteLinuxRunConfigurationFactory::displayNameForId(const QString &id) const
+QString RemoteLinuxRunConfigurationFactory::displayNameForId(const Core::Id id) const
{
return QFileInfo(pathFromId(id)).completeBaseName()
+ tr(" (on Remote Generic Linux Host)");
}
-RunConfiguration *RemoteLinuxRunConfigurationFactory::create(Target *parent, const QString &id)
+RunConfiguration *RemoteLinuxRunConfigurationFactory::create(Target *parent, const Core::Id id)
{
QTC_ASSERT(canCreate(parent, id), return 0);
- return new RemoteLinuxRunConfiguration(qobject_cast<Qt4BaseTarget *>(parent), id,
- pathFromId(id));
+ return new RemoteLinuxRunConfiguration(qobject_cast<Qt4BaseTarget *>(parent), id, pathFromId(id));
}
RunConfiguration *RemoteLinuxRunConfigurationFactory::restore(Target *parent,
@@ -120,7 +125,7 @@ RunConfiguration *RemoteLinuxRunConfigurationFactory::restore(Target *parent,
{
QTC_ASSERT(canRestore(parent, map), return 0);
RemoteLinuxRunConfiguration *rc = new RemoteLinuxRunConfiguration(qobject_cast<Qt4BaseTarget *>(parent),
- RemoteLinuxRunConfiguration::Id, QString());
+ Core::Id(RemoteLinuxRunConfiguration::Id), QString());
if (rc->fromMap(map))
return rc;
diff --git a/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.h b/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.h
index 01e94759d6..a2704a23a1 100644
--- a/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.h
+++ b/src/plugins/remotelinux/remotelinuxrunconfigurationfactory.h
@@ -45,11 +45,11 @@ public:
explicit RemoteLinuxRunConfigurationFactory(QObject *parent = 0);
~RemoteLinuxRunConfigurationFactory();
- QString displayNameForId(const QString &id) const;
- QStringList availableCreationIds(ProjectExplorer::Target *parent) const;
+ QString displayNameForId(const Core::Id id) const;
+ QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
- bool canCreate(ProjectExplorer::Target *parent, const QString &id) const;
- ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const QString &id);
+ bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
+ ProjectExplorer::RunConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
ProjectExplorer::RunConfiguration *restore(ProjectExplorer::Target *parent,
diff --git a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp
index 1e9ee52ae4..d33b259edf 100644
--- a/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp
+++ b/src/plugins/remotelinux/remotelinuxruncontrolfactory.cpp
@@ -62,8 +62,9 @@ bool RemoteLinuxRunControlFactory::canRun(RunConfiguration *runConfiguration, Ru
if (mode != NormalRunMode && mode != DebugRunMode)
return false;
+ const QString idStr = QString::fromLatin1(runConfiguration->id().name());
if (!runConfiguration->isEnabled()
- || !runConfiguration->id().startsWith(RemoteLinuxRunConfiguration::Id)) {
+ || !idStr.startsWith(RemoteLinuxRunConfiguration::Id)) {
return false;
}
diff --git a/src/plugins/remotelinux/tarpackagecreationstep.cpp b/src/plugins/remotelinux/tarpackagecreationstep.cpp
index c3f9b37fc2..3a2f2e10bf 100644
--- a/src/plugins/remotelinux/tarpackagecreationstep.cpp
+++ b/src/plugins/remotelinux/tarpackagecreationstep.cpp
@@ -304,9 +304,9 @@ BuildStepConfigWidget *TarPackageCreationStep::createConfigWidget()
return new CreateTarStepWidget(this);
}
-QString TarPackageCreationStep::stepId()
+Core::Id TarPackageCreationStep::stepId()
{
- return QLatin1String("MaemoTarPackageCreationStep");
+ return Core::Id("MaemoTarPackageCreationStep");
}
QString TarPackageCreationStep::displayName()
diff --git a/src/plugins/remotelinux/tarpackagecreationstep.h b/src/plugins/remotelinux/tarpackagecreationstep.h
index 02164493cf..6e4d99b619 100644
--- a/src/plugins/remotelinux/tarpackagecreationstep.h
+++ b/src/plugins/remotelinux/tarpackagecreationstep.h
@@ -49,7 +49,7 @@ public:
TarPackageCreationStep(ProjectExplorer::BuildStepList *bsl);
TarPackageCreationStep(ProjectExplorer::BuildStepList *bsl, TarPackageCreationStep *other);
- static QString stepId();
+ static Core::Id stepId();
static QString displayName();
bool init();
diff --git a/src/plugins/remotelinux/uploadandinstalltarpackagestep.cpp b/src/plugins/remotelinux/uploadandinstalltarpackagestep.cpp
index bbcdc6aedb..8024f12a9e 100644
--- a/src/plugins/remotelinux/uploadandinstalltarpackagestep.cpp
+++ b/src/plugins/remotelinux/uploadandinstalltarpackagestep.cpp
@@ -106,9 +106,9 @@ BuildStepConfigWidget *UploadAndInstallTarPackageStep::createConfigWidget()
return new SimpleBuildStepConfigWidget(this);
}
-QString UploadAndInstallTarPackageStep::stepId()
+Core::Id UploadAndInstallTarPackageStep::stepId()
{
- return QLatin1String("MaemoUploadAndInstallTarPackageStep");
+ return Core::Id("MaemoUploadAndInstallTarPackageStep");
}
QString UploadAndInstallTarPackageStep::displayName()
diff --git a/src/plugins/remotelinux/uploadandinstalltarpackagestep.h b/src/plugins/remotelinux/uploadandinstalltarpackagestep.h
index 29e7ff0416..213bca7e39 100644
--- a/src/plugins/remotelinux/uploadandinstalltarpackagestep.h
+++ b/src/plugins/remotelinux/uploadandinstalltarpackagestep.h
@@ -70,7 +70,7 @@ public:
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
- static QString stepId();
+ static Core::Id stepId();
static QString displayName();
private: