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