From 6a4c47b1768492fb2839438b42b7e0e411925d72 Mon Sep 17 00:00:00 2001 From: BogDan Vatra Date: Tue, 24 Jun 2014 16:47:38 +0200 Subject: AndroidDebugSupport: Split up into general and qmake specific part Introudce AndroidQtSupport. The derived class will eventually move to the qmakeprojectmanager plugin. Change-Id: I3fdc98259644fe718eb15aa9bd11d92dc0cdb1af Reviewed-by: BogDan Vatra --- src/plugins/android/androiddebugsupport.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'src/plugins/android/androiddebugsupport.cpp') diff --git a/src/plugins/android/androiddebugsupport.cpp b/src/plugins/android/androiddebugsupport.cpp index 141a609297..f9f70595f6 100644 --- a/src/plugins/android/androiddebugsupport.cpp +++ b/src/plugins/android/androiddebugsupport.cpp @@ -32,6 +32,7 @@ #include "androidglobal.h" #include "androidrunner.h" #include "androidmanager.h" +#include "androidqtsupport.h" #include #include @@ -40,19 +41,18 @@ #include #include +#include +#include #include #include -#include -#include -#include + #include -#include +#include #include using namespace Debugger; using namespace ProjectExplorer; -using namespace QmakeProjectManager; namespace Android { namespace Internal { @@ -85,7 +85,6 @@ static QStringList qtSoPaths(QtSupport::BaseQtVersion *qtVersion) RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration *runConfig, QString *errorMessage) { Target *target = runConfig->target(); - QmakeProject *project = static_cast(target->project()); DebuggerStartParameters params; params.startMode = AttachToRemoteServer; @@ -101,12 +100,9 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration * params.debuggerCommand = DebuggerKitInformation::debuggerCommand(kit).toString(); if (ToolChain *tc = ToolChainKitInformation::toolChain(kit)) params.toolChainAbi = tc->targetAbi(); - params.executable = project->rootQmakeProjectNode()->buildDir() + QLatin1String("/app_process"); + params.executable = target->activeBuildConfiguration()->buildDirectory().toString() + QLatin1String("/app_process"); params.remoteChannel = runConfig->remoteChannel(); - params.solibSearchPath.clear(); - QList nodes = project->allProFiles(); - foreach (QmakeProFileNode *node, nodes) - params.solibSearchPath.append(node->targetInformation().buildDir); + params.solibSearchPath = AndroidManager::androidQtSupport(target)->soLibSearchPath(target); QtSupport::BaseQtVersion *version = QtSupport::QtKitInformation::qtVersion(kit); params.solibSearchPath.append(qtSoPaths(version)); } @@ -118,9 +114,9 @@ RunControl *AndroidDebugSupport::createDebugRunControl(AndroidRunConfiguration * params.qmlServerAddress = server.serverAddress().toString(); params.remoteSetupNeeded = true; //TODO: Not sure if these are the right paths. - params.projectSourceDirectory = project->projectDirectory().toString(); - params.projectSourceFiles = project->files(QmakeProject::ExcludeGeneratedFiles); - params.projectBuildDirectory = project->rootQmakeProjectNode()->buildDir(); + params.projectSourceDirectory = target->project()->projectDirectory().toString(); + params.projectSourceFiles = target->project()->files(Project::ExcludeGeneratedFiles); + params.projectBuildDirectory = target->activeBuildConfiguration()->buildDirectory().toString(); } DebuggerRunControl * const debuggerRunControl -- cgit v1.2.1