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

@@ -102,10 +102,8 @@ bool QmlProjectTargetFactory::supportsTargetId(const QString &id) const
return id == QLatin1String(Constants::QML_VIEWER_TARGET_ID);
}
QStringList QmlProjectTargetFactory::supportedTargetIds(ProjectExplorer::Project *parent) const
QStringList QmlProjectTargetFactory::supportedTargetIds() const
{
if (!qobject_cast<QmlProject *>(parent))
return QStringList();
return QStringList() << QLatin1String(Constants::QML_VIEWER_TARGET_ID);
}