forked from qt-creator/qt-creator
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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user