ProjectExplorer: Split Target and ToolRunners into smaller tasks

This increases re-usability of activities like 'port gathering',
and makes their use less dependent on actual device implementations.

Change-Id: I017cb74874f2b38c487ba2d03906a675d5618647
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2017-05-09 10:25:11 +02:00
parent 9b93d5a330
commit 89f02cba2c
56 changed files with 1270 additions and 1843 deletions

View File

@@ -48,7 +48,8 @@ namespace Internal {
RunControl *AndroidAnalyzeSupport::createAnalyzeRunControl(RunConfiguration *runConfig, Core::Id runMode)
{
RunControl *runControl = Debugger::createAnalyzerRunControl(runConfig, runMode);
auto runControl = new RunControl(runConfig, runMode);
runControl->createWorker(runMode);
QTC_ASSERT(runControl, return 0);
AnalyzerConnection connection;
if (runMode == ProjectExplorer::Constants::QML_PROFILER_RUN_MODE) {
@@ -64,7 +65,7 @@ RunControl *AndroidAnalyzeSupport::createAnalyzeRunControl(RunConfiguration *run
}
AndroidAnalyzeSupport::AndroidAnalyzeSupport(RunControl *runControl)
: ToolRunner(runControl)
: RunWorker(runControl)
{
auto runner = new AndroidRunner(this, runControl->runConfiguration(), runControl->runMode());

View File

@@ -34,7 +34,7 @@
namespace Android {
namespace Internal {
class AndroidAnalyzeSupport : public ProjectExplorer::ToolRunner
class AndroidAnalyzeSupport : public ProjectExplorer::RunWorker
{
Q_OBJECT

View File

@@ -40,6 +40,7 @@ struct ANDROID_EXPORT AndroidRunnable
QVector<QStringList> afterFinishADBCommands;
QString deviceSerialNumber;
QString displayName() const { return packageName; }
static void *staticTypeId;
};