Changed the activity name run, so only the Qt6 version
of Qt Design Viewer is launched.
Change-Id: I79efc2a4ab37e9015b2feabda08ce274c6fca553
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Fix the wizard from inserting the filename for the file path leading to
an invalid directory.
Example invalid path: /projectpath/projectname/projectname.pro/android
With fixed path: /projectpath/projectname/android
Fixes: QTCREATORBUG-26580
Change-Id: If82a6f795ca400beddc26b959e65ea066ad79433
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This adds workaround to reduce the load added by the update of the
Android device list, which currently happens in a polling style. Skip
an update if (*):
- The current open project is configured with a non-Android kit
- No project is open
- the current project target is null
To summarize the timeline of the timer used here:
- AndroidDeviceManager::setupDevicesWatcher() is called when Creator
is started or when settings are changed. The setup makes the connections
for the timeout and for AVD list future watcher. This will be done once.
If the timer is active it won't be done again, so no duplicate
connections.
- In the setup, the list of devices in updated once.
- On timer timeout, we attempt to update the list, however with
conditions listed in (*) as well as only when an Android adb path is
found.
Fixes: QTCREATORBUG-26547
Change-Id: I13312c4b507ce4e4064adb1c1342f4648f915394
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Return to correct function call order when preparing
and uploading data to the device.
(Manual pick from master)
Change-Id: I0a78b6614765bfae5c3accd99c1c150540871aac
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
... because of binary compatibility.
Comes after a2b6dba0bc.
Change-Id: I18866de39a05c6690b47632cc5503f8555e006da
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
For Windows, lldb-server on the local file system is not a
QDir::Executable, but just a QDir::Files.
Task-number: QTCREATORBUG-26281
Change-Id: I4eb91ad9bce62401a945c46a1d2f94b654f9eaa2
Reviewed-by: hjk <hjk@qt.io>
Actually use the version variable that was defined prior to the line.
Amends: 0de09fe3a3
Change-Id: Ie05e1a4e1be0fa0729dd1de38fc6b5351d02d380
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Don't enforce the presence of a "platforms" subdirectory if the NDK is
of version 22 or higher. The last NDK version with that directory is 21.
Change-Id: Ib431e7db4521533206304d252dcf93b7ea6169e5
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
QProcess wasn't used in these files.
Change-Id: I24900bcf312eb6ea1ca3bc0c753cebb505ec552b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Somehow "am start" command can output to stderr even if the process
reports success, this can cause the activity launch to fail silently.
For example calling "am start -n package/activity --user 2" can fail
if the device has no user 2, however the process result will be success,
and the stderr will contain something like:
Error type 3
Error: Activity class {org.qtproject.example.scroll_example/
org.qtproject.qt.android.bindings.QtActivity} does not exist.
And the app won't start.
This concerns mostly extra am start args provided by the user, but not
sure if it might happen in other cases, so make sure to report the
stderr nonetheless.
Change-Id: I9317e118fcf4fe0c3ed83dcc53c1c00564c5148e
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Since the config can be expected to modify configuration values
(e.g. setEmulatorArgs()) it shouldn't be const, but can be set
to const whenever creating a reference that is not meant for
modifying the config.
Change-Id: I8c816a5422d4d57afa158c723d908e3a9a9a0db8
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Add error messages for cases in the different steps (e.g. build, deploy,
etc.) for user. This makes it easier for the user to know what's wrong
instead of just failing with no explanation.
Change-Id: I96ea65f5c73edf14c2214b699503211b740d029c
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Keep it only Android Device since this title is used in many places
around Qt Creator in different contexts it is better to make it
"Android Device" to not give any unintentional hint that only virtual
devices are covered. Such cases are the project creation wizard and the
kit target device settings.
Task-number: QTCREATORBUG-26477
Change-Id: I8c7224243aec6b8f5b5bf95db8d23b9aecbafca6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This is not really needed anymore, it was mainly used for physical
devices to report whether they need user authorization to be used
via adb. This is now handled by IDevice::DeviceState, where a
Connected device is unauthorized, otherwise any physical device is
ReadyToUse if authorization is good.
Change-Id: If5c1e49b98063eabe4205cd8adb5b11515e1e1de
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
No need to have these enums which are now only a duplication of
IDevice::MachineType and IDevice::DeviceState.
Change-Id: Icc3f112f2670c7354bb282b36fad0f0631b9e047
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Check Constants::AndroidDeploySettingsFile path first, and use
the buildTarget's workingDir only if that former value is empty.
Fixes: QTCREATORBUG-26357
Change-Id: I726a4b5cd60042845988b4428eea03ef0adb9920
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
No need to manually provide a parameter to adbToolPath inside
AndroidConfigurations itself, functions that needs it can just
get it directly.
Change-Id: Ie319e82e4ea3b7e3ad6588284168f6116bef2686
Reviewed-by: hjk <hjk@qt.io>
AVDs don't get a serial number until they are started, and avdmanager
don't make it easy to get their serial either, so we need to check
the running devices with adb "emu avd name" command and compare.
Change-Id: I3253d25a3461a36eb9918b3c796062bf9e82e0c6
Reviewed-by: hjk <hjk@qt.io>
This will makes it much easier selecting packages for install/uninstall
operations, and makes more space for the package name by removing the
operation column, as well as making changes more apparent by marking
pending changes in bold font.
Change-Id: Iec86c384195dd8c51fd8f00c1de56cdbb2bab62a
Reviewed-by: hjk <hjk@qt.io>
Both the sdkmanger and avdmanager (maybe more) need to parse the sdk
level for packages and devices which may contain letters, make them
use the same logic.
Change-Id: Iff7fef3a66e00fac11b833f73f2f334a4cf1a766
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
The deploy step widget most useful aspect is the uninstall before
deploy checkbox, and having it expanded by default would improve the
UX a bit by avoiding one extra mouse click.
Change-Id: I23ebc90daf9290d229d93dca1b9b25629902e3f2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Add "am start" extra arguments after all the params used by Creator's
deployment process are added. This in turn help tackle two issues:
1) Allowing users to use [-n] to start a different Activity than the
default one.
2) Won't fail deployment silently is a param is a non supported arg,
where adb would try to start an app but the return code is 0 even if
the that app is not found.
Then, we don't need the warning aspect anymore because after this
change, we would rely on "adb am start" to report an exception, but
the app would start anyway if the case 2 above occurs.
Change-Id: Ie609b748e76a068c66c8a9be1d08ccc050167ad1
Reviewed-by: hjk <hjk@qt.io>
The current label could be confused with build-tools version, so make
it more explicit.
Change-Id: I96abe9af04e6a6e8518926578411f759b90fc9a0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Valid for windows hosts, otherwise, the command might fail.
Change-Id: I3e759c74ea0a785fd226cda08f301f0cce17c9b7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Make some changes to make Android kits behave as, for example,
desktop kits:
* Set the build device of the kit to the default desktop device.
* Don't make the device and toolchain aspects sticky.
Change-Id: I41a40c6ed8dc3434fa4f3a09349b75b5fd379317
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
clean, rename and delete unused constants, we well as unify the
usage between qmake, cmake, and qbs.
Change-Id: I8827ac2f2f7660e337694fef17f744e727bd776a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Actions like start, erase, and avd arguments are specific to emulator
type devices, so make sure such actions are only in that case.
Task-number: QTCREATORBUG-23991
Change-Id: I9d5ffbd733c31540ab4e3d2a617cad54e70f8f8e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The list of packages from the sdk manager can be too much to look at and
search manually, thus a search field is very convenient to have here.
The search is very simple, include any package that contains the search
word into the result.
Change-Id: Id222841162739d49562ad11bb0f3152041614ebc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Move some logic for avd creation to the AvdDialog, and some
refactoring and simplification.
Change-Id: Id65e586ab1c0e9e898a04f07d7707371f20da649
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Move AVD management and creation to Qt Creator's DeviceManager
facilities. This allows AVDs to be created from the Devices settings
page and their details and control/action buttons for starting/stopping,
etc. are added there as well. This makes the process similar to other
device types that Qt Creator supports, to get a similar experience.
Task-number: QTCREATORBUG-23991
Change-Id: I16c52b3cc73035e0ee12fd54ae9dad4595c8cda5
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>