RunConfigurationAspect: Add RunConfiguration parameter to factory method

Change-Id: I7fbb82dc3ff83593473a57c69d0eb89bc33f50f5
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Tobias Hunger
2013-03-26 16:39:41 +01:00
parent 5d4c4a6968
commit 1650c22b7b
23 changed files with 75 additions and 58 deletions

View File

@@ -82,7 +82,7 @@ QString QnxRunConfigurationFactory::displayNameForId(const Core::Id id) const
bool QnxRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, const Core::Id id) const
{
if (!canHandle(parent))
if (!canHandle(parent) || id.name().startsWith(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX))
return false;
Qt4ProjectManager::Qt4Project *qt4Project = qobject_cast<Qt4ProjectManager::Qt4Project *>(parent->project());
@@ -92,15 +92,9 @@ bool QnxRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, cons
return qt4Project->hasApplicationProFile(pathFromId(id));
}
ProjectExplorer::RunConfiguration *QnxRunConfigurationFactory::create(ProjectExplorer::Target *parent, const Core::Id id)
ProjectExplorer::RunConfiguration *QnxRunConfigurationFactory::doCreate(ProjectExplorer::Target *parent, const Core::Id id)
{
if (!canCreate(parent, id))
return 0;
if (id.name().startsWith(Constants::QNX_QNX_RUNCONFIGURATION_PREFIX))
return new QnxRunConfiguration(parent, id, pathFromId(id));
return 0;
return new QnxRunConfiguration(parent, id, pathFromId(id));
}
bool QnxRunConfigurationFactory::canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const