Commit e453585d authored by Kai Koehne's avatar Kai Koehne

Debugger: Always prefer files in loaded projects even for "Attach to QML Port"

Change-Id: Ia26e3664878339f9f92681deb12d018e31e6c13a
Reviewed-by: default avatarAurindam Jana <aurindam.jana@nokia.com>
parent accf6d0e
......@@ -1689,6 +1689,23 @@ void DebuggerPluginPrivate::attachToQmlPort()
sp.sysroot = dlg.sysroot();
sp.startMode = AttachToQmlPort;
//
// get files from all the projects in the session
//
ProjectExplorer::SessionManager *sessionManager = ProjectExplorer::ProjectExplorerPlugin::instance()->session();
QList<Project *> projects = sessionManager->projects();
if (Project *startupProject = ProjectExplorer::ProjectExplorerPlugin::instance()->startupProject()) {
// startup project first
projects.removeOne(ProjectExplorer::ProjectExplorerPlugin::instance()->startupProject());
projects.insert(0, startupProject);
}
QStringList sourceFiles;
foreach (Project *project, projects)
sourceFiles << project->files(Project::ExcludeGeneratedFiles);
sp.projectSourceFiles = sourceFiles;
if (RunControl *rc = createDebugger(sp))
startDebugger(rc);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment