ITargetFactory: Make supportedTargetIds() and canCreate() orthogonal

ITargetFactory::supportedTargetIds should return all targets that this
factory can support, regardless of e.g. installed qt versions.

Whereas canCreate() should check the availability of e.g. a qt version.
This makes supportedTargetIds() have the same meaning as
ITargetFactory::supportsTargetId().

Change-Id: I744abb89e441026d6f3f8de21944d780e9b9fa32
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Daniel Teske
2012-02-17 11:55:11 +01:00
parent 6572cfa5bb
commit 72d466200a
23 changed files with 61 additions and 78 deletions

View File

@@ -179,10 +179,8 @@ CMakeTargetFactory::~CMakeTargetFactory()
{
}
QStringList CMakeTargetFactory::supportedTargetIds(ProjectExplorer::Project *parent) const
QStringList CMakeTargetFactory::supportedTargetIds() const
{
if (!qobject_cast<CMakeProject *>(parent))
return QStringList();
return QStringList() << QLatin1String(DEFAULT_CMAKE_TARGET_ID);
}
QString CMakeTargetFactory::displayNameForId(const QString &id) const

View File

@@ -85,7 +85,7 @@ public:
bool supportsTargetId(const QString &id) const;
QStringList supportedTargetIds(ProjectExplorer::Project *parent) const;
QStringList supportedTargetIds() const;
QString displayNameForId(const QString &id) const;
bool canCreate(ProjectExplorer::Project *parent, const QString &id) const;