summaryrefslogtreecommitdiff
path: root/src/plugins/android/androidrunner.cpp
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2018-05-15 12:11:54 +0200
committerhjk <hjk@qt.io>2018-05-16 10:18:27 +0000
commit099f8c7e80b615829c0250b1420e1ec123d9eb22 (patch)
tree2252e0e456f4b686896e241921b8f69afd999b16 /src/plugins/android/androidrunner.cpp
parent64d601def38adb3484eed2d8117eab9857090be2 (diff)
downloadqt-creator-099f8c7e80b615829c0250b1420e1ec123d9eb22.tar.gz
Android: Remove AndroidRunnable::{beforeStart,afterFinish}AdbCommands
We have nowadays two ways to pass data from run configurations to tool that do not require intimate knowledge of the sender: 1. Using RunConfigurationAspects, accessible for all workers in a RunControl 2. Using RunWorker::recordData for an individual worker. This removes the need to use specific fields in a runnable and means that a tool plugin can be better separated from target plugins. The approaches are not mutually exclusive, both use an string-ish id, I chose here to use the same string when using both. This patch here uses approach 2. for the GammaRay/Android combo. It also fixes a (harmless) typo (s/POSTSTART/POSTFINISH). Change-Id: I4048693ca73b17253a39bfcacc9e1880ecf25736 Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Diffstat (limited to 'src/plugins/android/androidrunner.cpp')
-rw-r--r--src/plugins/android/androidrunner.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/plugins/android/androidrunner.cpp b/src/plugins/android/androidrunner.cpp
index ce4a0c918c..a1ec0ba528 100644
--- a/src/plugins/android/androidrunner.cpp
+++ b/src/plugins/android/androidrunner.cpp
@@ -130,17 +130,6 @@ AndroidRunner::AndroidRunner(RunControl *runControl,
QString intent = intentName.isEmpty() ? AndroidManager::intentName(m_target) : intentName;
m_androidRunnable.packageName = intent.left(intent.indexOf('/'));
- RunConfiguration *rc = runControl->runConfiguration();
- if (auto aspect = rc->extraAspect(Constants::ANDROID_PRESTARTSHELLCMDLIST_ASPECT)) {
- for (QString shellCmd : static_cast<BaseStringListAspect *>(aspect)->value())
- m_androidRunnable.beforeStartAdbCommands.append(QString("shell %1").arg(shellCmd));
- }
-
- if (auto aspect = rc->extraAspect(Constants::ANDROID_POSTSTARTSHELLCMDLIST_ASPECT)) {
- for (QString shellCmd : static_cast<BaseStringListAspect *>(aspect)->value())
- m_androidRunnable.afterFinishAdbCommands.append(QString("shell %1").arg(shellCmd));
- }
-
const int apiLevel = AndroidManager::deviceApiLevel(m_target);
m_worker.reset(new AndroidRunnerWorker(this, m_androidRunnable));
m_worker->setIntentName(intent);