forked from qt-creator/qt-creator
Android: Use specific classes for run worker factories
Slimmer file interfaces. Change-Id: I2cf846c04000eb29fe53219db9a97088b6b9a1aa Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
This commit is contained in:
@@ -50,6 +50,7 @@ const char ANDROID_DEPLOYMENT_SETTINGS_FILE[] = "ANDROID_DEPLOYMENT_SETTINGS_FIL
|
||||
const char ANDROID_SO_LIBS_PATHS[] = "ANDROID_SO_LIBS_PATHS";
|
||||
const char JAVA_HOME_ENV_VAR[] = "JAVA_HOME";
|
||||
|
||||
const char ANDROID_RUNCONFIG_ID[] = "Qt4ProjectManager.AndroidRunConfiguration:";
|
||||
const char ANDROID_PACKAGE_INSTALL_STEP_ID[] = "Qt4ProjectManager.AndroidPackageInstallationStep";
|
||||
const char ANDROID_BUILD_APK_ID[] = "QmakeProjectManager.AndroidBuildApkStep";
|
||||
const char ANDROID_DEPLOY_QT_ID[] = "Qt4ProjectManager.AndroidDeployQtStep";
|
||||
|
@@ -10,6 +10,7 @@
|
||||
|
||||
#include <debugger/debuggerkitinformation.h>
|
||||
#include <debugger/debuggerrunconfigurationaspect.h>
|
||||
#include <debugger/debuggerruncontrol.h>
|
||||
|
||||
#include <projectexplorer/project.h>
|
||||
#include <projectexplorer/projectnodes.h>
|
||||
@@ -20,9 +21,12 @@
|
||||
|
||||
#include <utils/fileutils.h>
|
||||
#include <utils/hostosinfo.h>
|
||||
#include <utils/qtcprocess.h>
|
||||
|
||||
#include <QFutureWatcher>
|
||||
#include <QHostAddress>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QLoggingCategory>
|
||||
|
||||
namespace {
|
||||
@@ -33,8 +37,7 @@ using namespace Debugger;
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
namespace Android::Internal {
|
||||
|
||||
static FilePaths getSoLibSearchPath(const ProjectNode *node)
|
||||
{
|
||||
@@ -77,15 +80,24 @@ static FilePaths getExtraLibs(const ProjectNode *node)
|
||||
return res;
|
||||
}
|
||||
|
||||
AndroidDebugSupport::AndroidDebugSupport(RunControl *runControl, const QString &intentName)
|
||||
: Debugger::DebuggerRunTool(runControl)
|
||||
class AndroidDebugSupport : public Debugger::DebuggerRunTool
|
||||
{
|
||||
public:
|
||||
explicit AndroidDebugSupport(RunControl *runControl) : Debugger::DebuggerRunTool(runControl)
|
||||
{
|
||||
setId("AndroidDebugger");
|
||||
setLldbPlatform("remote-android");
|
||||
m_runner = new AndroidRunner(runControl, intentName);
|
||||
m_runner = new AndroidRunner(runControl, {});
|
||||
addStartDependency(m_runner);
|
||||
}
|
||||
|
||||
void start() override;
|
||||
void stop() override;
|
||||
|
||||
private:
|
||||
AndroidRunner *m_runner = nullptr;
|
||||
};
|
||||
|
||||
void AndroidDebugSupport::start()
|
||||
{
|
||||
Target *target = runControl()->target();
|
||||
@@ -98,7 +110,7 @@ void AndroidDebugSupport::start()
|
||||
setAttachPid(m_runner->pid());
|
||||
|
||||
QtSupport::QtVersion *qtVersion = QtSupport::QtKitAspect::qtVersion(kit);
|
||||
if (!Utils::HostOsInfo::isWindowsHost()
|
||||
if (!HostOsInfo::isWindowsHost()
|
||||
&& (qtVersion
|
||||
&& AndroidConfigurations::currentConfig().ndkVersion(qtVersion)
|
||||
>= QVersionNumber(11, 0, 0))) {
|
||||
@@ -157,7 +169,7 @@ void AndroidDebugSupport::start()
|
||||
if (qtVersion) {
|
||||
const FilePath ndkLocation =
|
||||
AndroidConfigurations::currentConfig().ndkLocation(qtVersion);
|
||||
Utils::FilePath sysRoot = ndkLocation
|
||||
FilePath sysRoot = ndkLocation
|
||||
/ "platforms"
|
||||
/ QString("android-%1").arg(sdkVersion)
|
||||
/ devicePreferredAbi; // Legacy Ndk structure
|
||||
@@ -187,5 +199,13 @@ void AndroidDebugSupport::stop()
|
||||
DebuggerRunTool::stop();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
// AndroidDebugWorkerFactory
|
||||
|
||||
AndroidDebugWorkerFactory::AndroidDebugWorkerFactory()
|
||||
{
|
||||
setProduct<AndroidDebugSupport>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::DEBUG_RUN_MODE);
|
||||
addSupportedRunConfig(Constants::ANDROID_RUNCONFIG_ID);
|
||||
}
|
||||
|
||||
} // Android::Internal
|
||||
|
@@ -3,26 +3,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "androidrunner.h"
|
||||
#include <debugger/debuggerruncontrol.h>
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
namespace Android::Internal {
|
||||
|
||||
class AndroidDebugSupport : public Debugger::DebuggerRunTool
|
||||
class AndroidDebugWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
AndroidDebugSupport(ProjectExplorer::RunControl *runControl,
|
||||
const QString &intentName = QString());
|
||||
|
||||
void start() override;
|
||||
void stop() override;
|
||||
|
||||
private:
|
||||
AndroidRunner *m_runner = nullptr;
|
||||
AndroidDebugWorkerFactory();
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
} // Android::Internal
|
||||
|
@@ -1,6 +1,8 @@
|
||||
// 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 "androidplugin.h"
|
||||
|
||||
#include "androidconfigurations.h"
|
||||
#include "androidbuildapkstep.h"
|
||||
#include "androidconstants.h"
|
||||
@@ -9,7 +11,6 @@
|
||||
#include "androiddevice.h"
|
||||
#include "androidmanifesteditorfactory.h"
|
||||
#include "androidpackageinstallationstep.h"
|
||||
#include "androidplugin.h"
|
||||
#include "androidpotentialkit.h"
|
||||
#include "androidqmlpreviewworker.h"
|
||||
#include "androidqmltoolingsupport.h"
|
||||
@@ -48,8 +49,7 @@ using namespace ProjectExplorer::Constants;
|
||||
|
||||
const char kSetupAndroidSetting[] = "ConfigureAndroid";
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
namespace Android::Internal {
|
||||
|
||||
class AndroidDeployConfigurationFactory : public DeployConfigurationFactory
|
||||
{
|
||||
@@ -89,29 +89,10 @@ public:
|
||||
AndroidPackageInstallationFactory packackeInstallationFactory;
|
||||
AndroidManifestEditorFactory manifestEditorFactory;
|
||||
AndroidRunConfigurationFactory runConfigFactory;
|
||||
|
||||
RunWorkerFactory runWorkerFactory{
|
||||
RunWorkerFactory::make<AndroidRunSupport>(),
|
||||
{NORMAL_RUN_MODE},
|
||||
{runConfigFactory.runConfigurationId()}
|
||||
};
|
||||
RunWorkerFactory debugWorkerFactory{
|
||||
RunWorkerFactory::make<AndroidDebugSupport>(),
|
||||
{DEBUG_RUN_MODE},
|
||||
{runConfigFactory.runConfigurationId()}
|
||||
};
|
||||
RunWorkerFactory profilerWorkerFactory{
|
||||
RunWorkerFactory::make<AndroidQmlToolingSupport>(),
|
||||
{QML_PROFILER_RUN_MODE},
|
||||
{runConfigFactory.runConfigurationId()}
|
||||
};
|
||||
RunWorkerFactory qmlPreviewWorkerFactory{
|
||||
RunWorkerFactory::make<AndroidQmlPreviewWorker>(),
|
||||
{QML_PREVIEW_RUN_MODE},
|
||||
{"QmlProjectManager.QmlRunConfiguration.Qml", runConfigFactory.runConfigurationId()},
|
||||
{Android::Constants::ANDROID_DEVICE_TYPE}
|
||||
};
|
||||
|
||||
AndroidRunWorkerFactory runWorkerFactory;
|
||||
AndroidDebugWorkerFactory debugWorkerFactory;
|
||||
AndroidQmlToolingSupportFactory profilerWorkerFactory;
|
||||
AndroidQmlPreviewWorkerFactory qmlPreviewWorkerFactory;
|
||||
AndroidBuildApkStepFactory buildApkStepFactory;
|
||||
AndroidDeviceManager deviceManager;
|
||||
};
|
||||
@@ -177,5 +158,4 @@ void AndroidPlugin::askUserAboutAndroidSetup()
|
||||
Core::ICore::infoBar()->addInfo(info);
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
} // Android::Internal
|
||||
|
@@ -5,8 +5,7 @@
|
||||
|
||||
#include <extensionsystem/iplugin.h>
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
namespace Android::Internal {
|
||||
|
||||
class AndroidPlugin final : public ExtensionSystem::IPlugin
|
||||
{
|
||||
@@ -31,5 +30,4 @@ private slots:
|
||||
#endif // WITH_TESTS
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
} // Android::Internal
|
||||
|
@@ -1,11 +1,14 @@
|
||||
// Copyright (C) 2021 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "androidqmlpreviewworker.h"
|
||||
|
||||
#include "androidavdmanager.h"
|
||||
#include "androidconfigurations.h"
|
||||
#include "androidconstants.h"
|
||||
#include "androiddevice.h"
|
||||
#include "androiddeviceinfo.h"
|
||||
#include "androidmanager.h"
|
||||
#include "androidqmlpreviewworker.h"
|
||||
#include "androidtr.h"
|
||||
|
||||
#include <coreplugin/icore.h>
|
||||
@@ -24,20 +27,23 @@
|
||||
#include <qtsupport/baseqtversion.h>
|
||||
#include <qtsupport/qtkitinformation.h>
|
||||
|
||||
#include <utils/qtcprocess.h>
|
||||
#include <utils/runextensions.h>
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QDeadlineTimer>
|
||||
#include <QFutureWatcher>
|
||||
#include <QThread>
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Utils;
|
||||
|
||||
namespace Android::Internal {
|
||||
|
||||
#define APP_ID "io.qt.qtdesignviewer"
|
||||
|
||||
class ApkInfo {
|
||||
class ApkInfo
|
||||
{
|
||||
public:
|
||||
ApkInfo();
|
||||
const QStringList abis;
|
||||
@@ -62,8 +68,60 @@ ApkInfo::ApkInfo() :
|
||||
|
||||
Q_GLOBAL_STATIC(ApkInfo, apkInfo)
|
||||
|
||||
class UploadInfo
|
||||
{
|
||||
public:
|
||||
FilePath uploadPackage;
|
||||
FilePath projectFolder;
|
||||
};
|
||||
|
||||
static const char packageSuffix[] = ".qmlrc";
|
||||
|
||||
class AndroidQmlPreviewWorker : public RunWorker
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AndroidQmlPreviewWorker(RunControl *runControl);
|
||||
~AndroidQmlPreviewWorker();
|
||||
|
||||
signals:
|
||||
void previewPidChanged();
|
||||
|
||||
private:
|
||||
void start() override;
|
||||
void stop() override;
|
||||
|
||||
bool ensureAvdIsRunning();
|
||||
bool checkAndInstallPreviewApp();
|
||||
bool preparePreviewArtefacts();
|
||||
bool uploadPreviewArtefacts();
|
||||
|
||||
SdkToolResult runAdbCommand(const QStringList &arguments) const;
|
||||
SdkToolResult runAdbShellCommand(const QStringList &arguments) const;
|
||||
int pidofPreview() const;
|
||||
bool isPreviewRunning(int lastKnownPid = -1) const;
|
||||
|
||||
void startPidWatcher();
|
||||
void startLogcat();
|
||||
void filterLogcatAndAppendMessage(const QString &stdOut);
|
||||
|
||||
bool startPreviewApp();
|
||||
bool stopPreviewApp();
|
||||
|
||||
Utils::FilePath designViewerApkPath(const QString &abi) const;
|
||||
Utils::FilePath createQmlrcFile(const Utils::FilePath &workFolder, const QString &basename);
|
||||
|
||||
RunControl *m_rc = nullptr;
|
||||
const AndroidConfig &m_androidConfig;
|
||||
QString m_serialNumber;
|
||||
QStringList m_avdAbis;
|
||||
int m_viewerPid = -1;
|
||||
QFutureWatcher<void> m_pidFutureWatcher;
|
||||
Utils::QtcProcess m_logcatProcess;
|
||||
QString m_logcatStartTimeStamp;
|
||||
UploadInfo m_uploadInfo;
|
||||
};
|
||||
|
||||
FilePath AndroidQmlPreviewWorker::designViewerApkPath(const QString &abi) const
|
||||
{
|
||||
if (abi.isEmpty())
|
||||
@@ -158,8 +216,8 @@ void AndroidQmlPreviewWorker::filterLogcatAndAppendMessage(const QString &stdOut
|
||||
}
|
||||
}
|
||||
|
||||
AndroidQmlPreviewWorker::AndroidQmlPreviewWorker(ProjectExplorer::RunControl *runControl)
|
||||
: ProjectExplorer::RunWorker(runControl),
|
||||
AndroidQmlPreviewWorker::AndroidQmlPreviewWorker(RunControl *runControl)
|
||||
: RunWorker(runControl),
|
||||
m_rc(runControl),
|
||||
m_androidConfig(AndroidConfigurations::currentConfig())
|
||||
{
|
||||
@@ -213,7 +271,6 @@ bool AndroidQmlPreviewWorker::ensureAvdIsRunning()
|
||||
devSN = m_serialNumber;
|
||||
|
||||
if (!avdMananager.isAvdBooted(devSN)) {
|
||||
using namespace ProjectExplorer;
|
||||
const IDevice *dev = DeviceKitAspect::device(m_rc->target()->kit()).data();
|
||||
if (!dev) {
|
||||
appendMessage(Tr::tr("Selected device is invalid."), ErrorMessageFormat);
|
||||
@@ -430,5 +487,17 @@ bool AndroidQmlPreviewWorker::stopPreviewApp()
|
||||
return res.success();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
// AndroidQmlPreviewWorkerFactory
|
||||
|
||||
AndroidQmlPreviewWorkerFactory::AndroidQmlPreviewWorkerFactory()
|
||||
{
|
||||
setProduct<AndroidQmlPreviewWorker>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::QML_PREVIEW_RUN_MODE);
|
||||
addSupportedRunConfig("QmlProjectManager.QmlRunConfiguration.Qml");
|
||||
addSupportedRunConfig(Constants::ANDROID_RUNCONFIG_ID);
|
||||
addSupportedDeviceType(Android::Constants::ANDROID_DEVICE_TYPE);
|
||||
}
|
||||
|
||||
} // Android::Internal
|
||||
|
||||
#include "androidqmlpreviewworker.moc"
|
||||
|
@@ -3,70 +3,14 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "androidconfigurations.h"
|
||||
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
|
||||
#include <utils/qtcprocess.h>
|
||||
namespace Android::Internal {
|
||||
|
||||
#include <QFutureWatcher>
|
||||
|
||||
namespace Android {
|
||||
class SdkToolResult;
|
||||
|
||||
namespace Internal {
|
||||
|
||||
class UploadInfo
|
||||
class AndroidQmlPreviewWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
||||
{
|
||||
public:
|
||||
Utils::FilePath uploadPackage;
|
||||
Utils::FilePath projectFolder;
|
||||
AndroidQmlPreviewWorkerFactory();
|
||||
};
|
||||
|
||||
class AndroidQmlPreviewWorker : public ProjectExplorer::RunWorker
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
AndroidQmlPreviewWorker(ProjectExplorer::RunControl *runControl);
|
||||
~AndroidQmlPreviewWorker();
|
||||
|
||||
signals:
|
||||
void previewPidChanged();
|
||||
|
||||
private:
|
||||
void start() override;
|
||||
void stop() override;
|
||||
|
||||
bool ensureAvdIsRunning();
|
||||
bool checkAndInstallPreviewApp();
|
||||
bool preparePreviewArtefacts();
|
||||
bool uploadPreviewArtefacts();
|
||||
|
||||
SdkToolResult runAdbCommand(const QStringList &arguments) const;
|
||||
SdkToolResult runAdbShellCommand(const QStringList &arguments) const;
|
||||
int pidofPreview() const;
|
||||
bool isPreviewRunning(int lastKnownPid = -1) const;
|
||||
|
||||
void startPidWatcher();
|
||||
void startLogcat();
|
||||
void filterLogcatAndAppendMessage(const QString &stdOut);
|
||||
|
||||
bool startPreviewApp();
|
||||
bool stopPreviewApp();
|
||||
|
||||
Utils::FilePath designViewerApkPath(const QString &abi) const;
|
||||
Utils::FilePath createQmlrcFile(const Utils::FilePath &workFolder, const QString &basename);
|
||||
|
||||
ProjectExplorer::RunControl *m_rc = nullptr;
|
||||
const AndroidConfig &m_androidConfig;
|
||||
QString m_serialNumber;
|
||||
QStringList m_avdAbis;
|
||||
int m_viewerPid = -1;
|
||||
QFutureWatcher<void> m_pidFutureWatcher;
|
||||
Utils::QtcProcess m_logcatProcess;
|
||||
QString m_logcatStartTimeStamp;
|
||||
UploadInfo m_uploadInfo;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
} // Android::Internal
|
||||
|
@@ -2,20 +2,22 @@
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||
|
||||
#include "androidqmltoolingsupport.h"
|
||||
|
||||
#include "androidconstants.h"
|
||||
#include "androidrunner.h"
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
namespace Android::Internal {
|
||||
|
||||
AndroidQmlToolingSupport::AndroidQmlToolingSupport(RunControl *runControl,
|
||||
const QString &intentName)
|
||||
: RunWorker(runControl)
|
||||
class AndroidQmlToolingSupport final : public RunWorker
|
||||
{
|
||||
public:
|
||||
explicit AndroidQmlToolingSupport(RunControl *runControl) : RunWorker(runControl)
|
||||
{
|
||||
setId("AndroidQmlToolingSupport");
|
||||
|
||||
auto runner = new AndroidRunner(runControl, intentName);
|
||||
auto runner = new AndroidRunner(runControl, {});
|
||||
addStartDependency(runner);
|
||||
|
||||
auto worker = runControl->createWorker(QmlDebug::runnerIdForRunMode(runControl->runMode()));
|
||||
@@ -27,14 +29,17 @@ AndroidQmlToolingSupport::AndroidQmlToolingSupport(RunControl *runControl,
|
||||
});
|
||||
}
|
||||
|
||||
void AndroidQmlToolingSupport::start()
|
||||
private:
|
||||
void start() override {}
|
||||
void stop() override { reportStopped(); }
|
||||
};
|
||||
|
||||
|
||||
AndroidQmlToolingSupportFactory::AndroidQmlToolingSupportFactory()
|
||||
{
|
||||
setProduct<AndroidQmlToolingSupport>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::QML_PROFILER_RUN_MODE);
|
||||
addSupportedRunConfig(Constants::ANDROID_RUNCONFIG_ID);
|
||||
}
|
||||
|
||||
void AndroidQmlToolingSupport::stop()
|
||||
{
|
||||
reportStopped();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
} // Android::Internal
|
||||
|
@@ -4,23 +4,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <projectexplorer/runcontrol.h>
|
||||
#include <utils/environment.h>
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
namespace Android::Internal {
|
||||
|
||||
class AndroidQmlToolingSupport : public ProjectExplorer::RunWorker
|
||||
class AndroidQmlToolingSupportFactory final : public ProjectExplorer::RunWorkerFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AndroidQmlToolingSupport(ProjectExplorer::RunControl *runControl,
|
||||
const QString &intentName = QString());
|
||||
|
||||
private:
|
||||
void start() override;
|
||||
void stop() override;
|
||||
AndroidQmlToolingSupportFactory();
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
} // Android::Internal
|
||||
|
@@ -3,6 +3,7 @@
|
||||
|
||||
#include "androidruncontrol.h"
|
||||
|
||||
#include "androidconstants.h"
|
||||
#include "androidglobal.h"
|
||||
#include "androidrunconfiguration.h"
|
||||
#include "androidrunner.h"
|
||||
@@ -13,8 +14,18 @@
|
||||
|
||||
using namespace ProjectExplorer;
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
namespace Android::Internal {
|
||||
|
||||
class AndroidRunSupport final : public AndroidRunner
|
||||
{
|
||||
public:
|
||||
explicit AndroidRunSupport(ProjectExplorer::RunControl *runControl,
|
||||
const QString &intentName = QString());
|
||||
~AndroidRunSupport() override;
|
||||
|
||||
void start() override;
|
||||
void stop() override;
|
||||
};
|
||||
|
||||
AndroidRunSupport::AndroidRunSupport(RunControl *runControl, const QString &intentName)
|
||||
: AndroidRunner(runControl, intentName)
|
||||
@@ -37,5 +48,11 @@ void AndroidRunSupport::stop()
|
||||
AndroidRunner::stop();
|
||||
}
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
AndroidRunWorkerFactory::AndroidRunWorkerFactory()
|
||||
{
|
||||
setProduct<AndroidRunSupport>();
|
||||
addSupportedRunMode(ProjectExplorer::Constants::NORMAL_RUN_MODE);
|
||||
addSupportedRunConfig(Constants::ANDROID_RUNCONFIG_ID);
|
||||
}
|
||||
|
||||
} // Android::Internal
|
||||
|
@@ -7,23 +7,14 @@
|
||||
|
||||
#include <projectexplorer/runconfiguration.h>
|
||||
|
||||
namespace Android {
|
||||
namespace Internal {
|
||||
namespace Android::Internal {
|
||||
|
||||
class AndroidRunner;
|
||||
|
||||
class AndroidRunSupport final : public AndroidRunner
|
||||
class AndroidRunWorkerFactory final : public ProjectExplorer::RunWorkerFactory
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit AndroidRunSupport(ProjectExplorer::RunControl *runControl,
|
||||
const QString &intentName = QString());
|
||||
~AndroidRunSupport() override;
|
||||
|
||||
void start() override;
|
||||
void stop() override;
|
||||
AndroidRunWorkerFactory();
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
} // namespace Android
|
||||
} // Android::Internal
|
||||
|
Reference in New Issue
Block a user