RemoteLinux: Create run configs by target name, not by project file.

The current approach fails for all build systems where one project file
can define more than one executable.

Change-Id: Ieda413975709fbd6e7ea87b185aa962f63cb7c1f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
This commit is contained in:
Christian Kandeler
2014-08-07 15:53:54 +02:00
parent 758e189dca
commit 0c3eeab464
10 changed files with 67 additions and 49 deletions

View File

@@ -97,7 +97,17 @@ bool QnxRunConfigurationFactory::canCreate(ProjectExplorer::Target *parent, Core
ProjectExplorer::RunConfiguration *QnxRunConfigurationFactory::doCreate(ProjectExplorer::Target *parent, Core::Id id)
{
return new QnxRunConfiguration(parent, id, pathFromId(id));
const QString projectFilePath = pathFromId(id);
const QmakeProjectManager::QmakeProject * const qt4Project
= qobject_cast<QmakeProjectManager::QmakeProject *>(parent->project());
QTC_ASSERT(qt4Project, return 0);
foreach (const QmakeProjectManager::QmakeProFileNode * const node,
qt4Project->applicationProFiles()) {
if (node->path() == projectFilePath)
return new QnxRunConfiguration(parent, id, node->targetInformation().target);
}
QTC_CHECK(false);
return 0;
}
bool QnxRunConfigurationFactory::canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const