forked from qt-creator/qt-creator
Android: Dismantle AndroidRunSupport
Merge it with AndroidRunner. Change-Id: I8cf78abd3232539d2fbe4f6dfe64143bf4996f03 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -27,7 +27,6 @@ add_qtc_plugin(Android
|
||||
androidqmltoolingsupport.cpp androidqmltoolingsupport.h
|
||||
androidqtversion.cpp androidqtversion.h
|
||||
androidrunconfiguration.cpp androidrunconfiguration.h
|
||||
androidruncontrol.cpp androidruncontrol.h
|
||||
androidrunner.cpp androidrunner.h
|
||||
androidrunnerworker.cpp androidrunnerworker.h
|
||||
androidsdkdownloader.cpp androidsdkdownloader.h
|
||||
|
@@ -55,8 +55,6 @@ QtcPlugin {
|
||||
"androidqtversion.h",
|
||||
"androidrunconfiguration.cpp",
|
||||
"androidrunconfiguration.h",
|
||||
"androidruncontrol.cpp",
|
||||
"androidruncontrol.h",
|
||||
"androidrunner.cpp",
|
||||
"androidrunner.h",
|
||||
"androidrunnerworker.cpp",
|
||||
|
@@ -13,7 +13,7 @@
|
||||
#include "androidqmltoolingsupport.h"
|
||||
#include "androidqtversion.h"
|
||||
#include "androidrunconfiguration.h"
|
||||
#include "androidruncontrol.h"
|
||||
#include "androidrunner.h"
|
||||
#include "androidsettingswidget.h"
|
||||
#include "androidtoolchain.h"
|
||||
#include "androidtr.h"
|
||||
|
@@ -1,53 +0,0 @@
|
||||
// Copyright (C) 2016 BogDan Vatra <bog_dan_ro@yahoo.com>
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "androidruncontrol.h"
|
||||
|
||||
#include "androidconstants.h"
|
||||
#include "androidglobal.h"
|
||||
#include "androidrunconfiguration.h"
|
||||
#include "androidrunner.h"
|
||||
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <projectexplorer/projectexplorerconstants.h>
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace Android::Internal {
|
||||
|
||||
class AndroidRunSupport final : public AndroidRunner
|
||||
{
|
||||
public:
|
||||
explicit AndroidRunSupport(RunControl *runControl);
|
||||
~AndroidRunSupport() override;
|
||||
};
|
||||
|
||||
AndroidRunSupport::AndroidRunSupport(RunControl *runControl)
|
||||
: AndroidRunner(runControl)
|
||||
{
|
||||
runControl->setIcon(Utils::Icons::RUN_SMALL_TOOLBAR);
|
||||
}
|
||||
|
||||
AndroidRunSupport::~AndroidRunSupport()
|
||||
{
|
||||
stop();
|
||||
}
|
||||
|
||||
class AndroidRunWorkerFactory final : public RunWorkerFactory
|
||||
{
|
||||
public:
|
||||
AndroidRunWorkerFactory()
|
||||
{
|
||||
setProduct<AndroidRunSupport>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE);
|
||||
addSupportedRunConfig(Constants::ANDROID_RUNCONFIG_ID);
|
||||
}
|
||||
};
|
||||
|
||||
void setupAndroidRunWorker()
|
||||
{
|
||||
static AndroidRunWorkerFactory theAndroidRunWorkerFactory;
|
||||
}
|
||||
|
||||
} // Android::Internal
|
@@ -1,10 +0,0 @@
|
||||
// Copyright (C) 2016 BogDan Vatra <bog_dan_ro@yahoo.com>
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Android::Internal {
|
||||
|
||||
void setupAndroidRunWorker();
|
||||
|
||||
} // Android::Internal
|
@@ -5,6 +5,7 @@
|
||||
#include "androidrunner.h"
|
||||
|
||||
#include "androidavdmanager.h"
|
||||
#include "androidconstants.h"
|
||||
#include "androiddevice.h"
|
||||
#include "androidmanager.h"
|
||||
#include "androidrunnerworker.h"
|
||||
@@ -12,8 +13,11 @@
|
||||
|
||||
#include <projectexplorer/projectexplorersettings.h>
|
||||
#include <projectexplorer/target.h>
|
||||
|
||||
#include <qtsupport/qtkitaspect.h>
|
||||
|
||||
#include <utils/url.h>
|
||||
#include <utils/utilsicons.h>
|
||||
|
||||
#include <QHostAddress>
|
||||
#include <QLoggingCategory>
|
||||
@@ -31,6 +35,7 @@ namespace Android::Internal {
|
||||
AndroidRunner::AndroidRunner(RunControl *runControl)
|
||||
: RunWorker(runControl)
|
||||
{
|
||||
runControl->setIcon(Utils::Icons::RUN_SMALL_TOOLBAR);
|
||||
setId("AndroidRunner");
|
||||
static const int metaTypes[] = {
|
||||
qRegisterMetaType<QList<QStringList>>("QList<QStringList>"),
|
||||
@@ -152,4 +157,20 @@ void AndroidRunner::remoteStdErr(const QString &output)
|
||||
m_outputParser.processOutput(output);
|
||||
}
|
||||
|
||||
class AndroidRunWorkerFactory final : public RunWorkerFactory
|
||||
{
|
||||
public:
|
||||
AndroidRunWorkerFactory()
|
||||
{
|
||||
setProduct<AndroidRunner>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE);
|
||||
addSupportedRunConfig(Constants::ANDROID_RUNCONFIG_ID);
|
||||
}
|
||||
};
|
||||
|
||||
void setupAndroidRunWorker()
|
||||
{
|
||||
static AndroidRunWorkerFactory theAndroidRunWorkerFactory;
|
||||
}
|
||||
|
||||
} // namespace Android::Internal
|
||||
|
@@ -48,4 +48,6 @@ private:
|
||||
Tasking::TaskTreeRunner m_taskTreeRunner;
|
||||
};
|
||||
|
||||
void setupAndroidRunWorker();
|
||||
|
||||
} // namespace Android::Internal
|
||||
|
Reference in New Issue
Block a user