diff options
author | BogDan Vatra <bogdan@kde.org> | 2014-06-24 16:47:38 +0200 |
---|---|---|
committer | Daniel Teske <daniel.teske@digia.com> | 2014-07-21 12:41:14 +0200 |
commit | 6a4c47b1768492fb2839438b42b7e0e411925d72 (patch) | |
tree | 6246fec74da97144c72637b34e655a9da1f1501c /src/plugins/android/androiddebugsupport.cpp | |
parent | 8481c91fbf2257b74c19e93174140fe530a0e019 (diff) | |
download | qt-creator-6a4c47b1768492fb2839438b42b7e0e411925d72.tar.gz |
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 <bogdan@kde.org>
Diffstat (limited to 'src/plugins/android/androiddebugsupport.cpp')
-rw-r--r-- | src/plugins/android/androiddebugsupport.cpp | 24 |
1 files changed, 10 insertions, 14 deletions
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 <debugger/debuggerengine.h> #include <debugger/debuggerplugin.h> @@ -40,19 +41,18 @@ #include <debugger/debuggerrunner.h> #include <debugger/debuggerstartparameters.h> +#include <projectexplorer/buildconfiguration.h> +#include <projectexplorer/project.h> #include <projectexplorer/target.h> #include <projectexplorer/toolchain.h> -#include <qmakeprojectmanager/qmakebuildconfiguration.h> -#include <qmakeprojectmanager/qmakenodes.h> -#include <qmakeprojectmanager/qmakeproject.h> + #include <qtsupport/qtkitinformation.h> -#include <QDir> +#include <QDirIterator> #include <QTcpServer> 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<QmakeProject *>(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<QmakeProFileNode *> 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 |