From aa93f2562684c60c94dbc41122da8238af29a19d Mon Sep 17 00:00:00 2001
From: Aurindam Jana <aurindam.jana@digia.com>
Date: Fri, 26 Apr 2013 09:58:22 +0200
Subject: [PATCH] QmlDebugging: Attach to QML application

Specify project source directory and sysroot.

Change-Id: Ie9287ef4da023159b131e67de51ffc218c4d2a70
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
---
 src/plugins/debugger/debuggerplugin.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/plugins/debugger/debuggerplugin.cpp b/src/plugins/debugger/debuggerplugin.cpp
index 1ca6e317156..1349f6f6b1a 100644
--- a/src/plugins/debugger/debuggerplugin.cpp
+++ b/src/plugins/debugger/debuggerplugin.cpp
@@ -1803,7 +1803,10 @@ void DebuggerPluginPrivate::attachToQmlPort()
     foreach (Project *project, projects)
         sourceFiles << project->files(Project::ExcludeGeneratedFiles);
 
+    sp.projectSourceDirectory =
+            !projects.isEmpty() ? projects.first()->projectDirectory() : QString();
     sp.projectSourceFiles = sourceFiles;
+    sp.sysRoot = SysRootKitInformation::sysRoot(kit).toString();
     DebuggerRunControlFactory::createAndScheduleRun(sp);
 }
 
-- 
GitLab