summaryrefslogtreecommitdiff
path: root/src/plugins/qt4projectmanager
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@nokia.com>2012-03-15 17:17:40 +0100
committerTobias Hunger <tobias.hunger@nokia.com>2012-04-25 11:49:19 +0200
commitdf5dab63827dc01412e7ddbe44ef0bef83b695ca (patch)
tree92a5c25562a2148acdcd2e9318a1491dfd09b1ee /src/plugins/qt4projectmanager
parentcf26765c62f9964ae337f2d52ac261099403d35f (diff)
downloadqt-creator-df5dab63827dc01412e7ddbe44ef0bef83b695ca.tar.gz
Use Core::Id in project-related objects
Use Core::Id for all the project related objects in favor of plain QStrings. Change-Id: I790ab40cb29899efdb49c413a77609486f52e683 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Diffstat (limited to 'src/plugins/qt4projectmanager')
-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
53 files changed, 379 insertions, 359 deletions
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;