QmlProfiler: Use a Target for populateFileFinder()

The RunConfiguration we were using previously only served to retrieve a
target.

Change-Id: I30628197de3025511a03a53d3119083b980762c8
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Ulf Hermann
2017-09-27 14:56:00 +02:00
parent c0b2ba829f
commit 38d00cc8b6
6 changed files with 11 additions and 16 deletions

View File

@@ -206,13 +206,9 @@ void QmlProfilerDetailsRewriter::documentReady(QmlJS::Document::Ptr doc)
}
}
void QmlProfilerDetailsRewriter::populateFileFinder(
const ProjectExplorer::RunConfiguration *runConfiguration)
void QmlProfilerDetailsRewriter::populateFileFinder(const ProjectExplorer::Target *target)
{
// Prefer the given runConfiguration's target if available
const ProjectExplorer::Target *target = runConfiguration ? runConfiguration->target() : nullptr;
// If runConfiguration given, then use the project associated with that ...
// If target given, then use the project associated with that ...
const ProjectExplorer::Project *startupProject = target ? target->project() : nullptr;
// ... else try the session manager's global startup project ...
@@ -239,7 +235,7 @@ void QmlProfilerDetailsRewriter::populateFileFinder(
sourceFiles.append(project->files(ProjectExplorer::Project::SourceFiles));
}
// If no runConfiguration was given, but we've found a startupProject, then try to deduct a
// If no target was given, but we've found a startupProject, then try to deduct a
// target from that.
if (!target && startupProject)
target = startupProject->activeTarget();