summaryrefslogtreecommitdiff
path: root/src/plugins/android/androidruncontrol.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2023-01-05 10:34:21 +0100
committerhjk <hjk@qt.io>2023-01-23 11:18:03 +0000
commit978639b995cd5041698fba01bd0e9f4acbe2a628 (patch)
tree83980b85874a6489b751fc891d07afd801f35d98 /src/plugins/android/androidruncontrol.cpp
parent9c57ed6bd28c4ec55fcd68cf49c17603b06c9b39 (diff)
downloadqt-creator-978639b995cd5041698fba01bd0e9f4acbe2a628.tar.gz
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>
Diffstat (limited to 'src/plugins/android/androidruncontrol.cpp')
-rw-r--r--src/plugins/android/androidruncontrol.cpp25
1 files changed, 21 insertions, 4 deletions
diff --git a/src/plugins/android/androidruncontrol.cpp b/src/plugins/android/androidruncontrol.cpp
index 4ffd7de009..16a20b627a 100644
--- a/src/plugins/android/androidruncontrol.cpp
+++ b/src/plugins/android/androidruncontrol.cpp
@@ -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