summaryrefslogtreecommitdiff
path: root/src/plugins/debugger
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@nokia.com>2011-10-28 13:25:58 +0200
committerKai Koehne <kai.koehne@nokia.com>2011-10-28 17:02:52 +0200
commite453585df5f9dd9f0edf3e0d637b84ff4b1cdf7c (patch)
tree194f49e94ffab79db03f7243c359903fea83f138 /src/plugins/debugger
parentaccf6d0e8b5e856f9f2bd25d73079f11f36d87e1 (diff)
downloadqt-creator-e453585df5f9dd9f0edf3e0d637b84ff4b1cdf7c.tar.gz
Debugger: Always prefer files in loaded projects even for "Attach to QML Port"
Change-Id: Ia26e3664878339f9f92681deb12d018e31e6c13a Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
Diffstat (limited to 'src/plugins/debugger')
-rw-r--r--src/plugins/debugger/debuggerplugin.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index c825011787..830d3500b3 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -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);
}