diff options
author | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2021-08-22 01:51:57 +0300 |
---|---|---|
committer | Assam Boudjelthia <assam.boudjelthia@qt.io> | 2021-09-21 15:33:40 +0000 |
commit | 96255208a53532906c1b0c3130dc53776efa3a71 (patch) | |
tree | 5aa0e851aefbdc542fa5db9cd1c71ab002bab452 /src/plugins/android/androidmanager.cpp | |
parent | 15b6eaa47b348efaae4756cd2a095dc78273337d (diff) | |
download | qt-creator-96255208a53532906c1b0c3130dc53776efa3a71.tar.gz |
Change device selection mechanism on Android
Currently, on deploy/debug steps on Android, an AndroidDeviceDialog
is popped up each time a deployement is done to select a device. This
can be avoidable by using Qt Creator DeviceKitAspect to have the list
of devices easily selectable from the project mini-menu.
This is better than the current way because it:
* reduces the time from deployment to running the app
* reduces the number of clicks
* avoids having to select the same device each time or
* if a default device is selected, this avoids having to go to project
settings to reset the default device to be able to deploy to a new
device.
* it looks cleaner and more compatible with Creator.
Task-number: QTCREATORBUG-23991
Change-Id: Ida4ab7245c1a3b0ca26c5ccdc9a21a072edf0725
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/androidmanager.cpp')
-rw-r--r-- | src/plugins/android/androidmanager.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/android/androidmanager.cpp b/src/plugins/android/androidmanager.cpp index d5177de681..7d181c405b 100644 --- a/src/plugins/android/androidmanager.cpp +++ b/src/plugins/android/androidmanager.cpp @@ -25,16 +25,17 @@ #include "androidmanager.h" +#include "androidavdmanager.h" #include "androidbuildapkstep.h" -#include "androidconstants.h" #include "androidconfigurations.h" -#include "androidrunconfiguration.h" -#include "androidglobal.h" -#include "androidtoolchain.h" +#include "androidconstants.h" #include "androiddeployqtstep.h" +#include "androiddevice.h" +#include "androidglobal.h" #include "androidqtversion.h" -#include "androidavdmanager.h" +#include "androidrunconfiguration.h" #include "androidsdkmanager.h" +#include "androidtoolchain.h" #include <coreplugin/documentmanager.h> #include <coreplugin/messagemanager.h> @@ -552,7 +553,8 @@ void AndroidManager::installQASIPackage(Target *target, const FilePath &packageP if (appAbis.isEmpty()) return; const int deviceAPILevel = AndroidManager::minimumSDK(target); - AndroidDeviceInfo info = AndroidConfigurations::showDeviceDialog(target->project(), deviceAPILevel, appAbis); + const IDevice::ConstPtr device = DeviceKitAspect::device(target->kit()); + AndroidDeviceInfo info = AndroidDevice::androidDeviceInfoFromIDevice(device.data()); if (!info.isValid()) // aborted return; |