aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/android
Commit message (Collapse)AuthorAgeFilesLines
* Android: Use native separators in installation step uiKai Köhne2021-12-031-1/+2
| | | | | | | Change-Id: I724f91d8387cfd3138faa847d06674707d4d0f10 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: hjk <hjk@qt.io>
* Android: Fix use of keytool on WindowsKai Köhne2021-12-021-1/+1
| | | | | | Fixes: QTCREATORBUG-26647 Change-Id: I34fd2b4304480186d1a05e2c9101b2cfbd1e8e47 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* QmlDesigner/Android: Rename designviewer -> qtdesignviewerAlessandro Portale2021-11-241-2/+2
| | | | | | | | | "Qt Design Viewer" is the name of the component. Change-Id: I37228ca32badc4107bb0faa088af5f6afeb9a8ac Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Piotr Mikolajczyk <piotr.mikolajczyk@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlDesigner: Enable environment variable usageHenning Gruendl2021-11-221-3/+9
| | | | | | | Change-Id: I91ada6d7dfa5e8376333c5ef27fbd72a5484e4f4 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Fix some compiler warningsChristian Kandeler2021-11-221-2/+2
| | | | | Change-Id: I9128afcf56bd47cb6627012bb6b0d13395b432ac Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Android: Fix compilationhjk2021-11-161-1/+1
| | | | | | | Amends 35e6991772. Change-Id: Iba3dcf86b7b1ca7963a0b99798dafec85d19bd65 Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* Fix bad activity if designviewer built with qt6Piotr Mikolajczyk2021-11-161-1/+2
| | | | | | | | 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>
* Android: Fix AndroidManifest wizard invalid package source dirJonathan Mouchou2021-11-151-1/+4
| | | | | | | | | | | | | 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>
* Android: Skip device list update no Android Kit is activeAlessandro Portale2021-11-111-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fix to qmlpreview failing to upload filesPiotr Mikolajczyk2021-11-101-1/+1
| | | | | | | | | 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>
* Android: fix missing argument in UI stringAssam Boudjelthia2021-11-091-1/+2
| | | | | Change-Id: I9a02be25429b444704eb6864d59b2f4311ae75ea Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Android: don't recreate a new AvdMangerAssam Boudjelthia2021-11-091-1/+1
| | | | | Change-Id: Icc4f2bb2df34aa3497441d6fbd64c6c8fe1394b3 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Android: Register Lldb if it is presentChristian Stenger2021-11-092-14/+65
| | | | | | Change-Id: I46a544c0541ca4f0a969064faf055c1e99b9c5ad Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Android: since jpg is allowd, add jpeg to icon/splash file dialogAssam Boudjelthia2021-11-083-5/+6
| | | | | Change-Id: I018650a33d681f4ea75c9333eb875a197ce96e3d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Android: remove unused function that couldn't be removed in 5.0 branchAssam Boudjelthia2021-11-082-7/+0
| | | | | | | | | ... because of binary compatibility. Comes after a2b6dba0bcec4675cbc5c951cfb112296e65d4e4. Change-Id: I18866de39a05c6690b47632cc5503f8555e006da Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Andriod: declare QLatin1String as char[] instead in AndroidMangerAssam Boudjelthia2021-11-051-7/+8
| | | | | Change-Id: I4f11950dcdfa0caddf02bf2b123ff78a9c01c062 Reviewed-by: hjk <hjk@qt.io>
* Android: FilePathify part of debugger abi detectionhjk2021-11-051-5/+6
| | | | | Change-Id: I3abbc780c1e1301db4c6d367dcdf1dcf8cbf556d Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Android: Enable locating NDK's lldb-server on Windows hostsAlessandro Portale2021-11-051-1/+3
| | | | | | | | | 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>
* Android: Improve prior commitAlessandro Portale2021-11-041-1/+1
| | | | | | | | | Actually use the version variable that was defined prior to the line. Amends: 0de09fe3a3da4a0a74788644c66f8a41a252c07f Change-Id: Ie05e1a4e1be0fa0729dd1de38fc6b5351d02d380 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: Enable manual adding of NDKs v22+Alessandro Portale2021-11-031-3/+15
| | | | | | | | 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>
* Remove unneeded includes of QProcessJarek Kobus2021-11-031-2/+1
| | | | | | Change-Id: I017e020c8b2a53d6f4a2422a0a0856044e768247 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* Remove unneeded includes of QProcess from cpp filesJarek Kobus2021-11-012-3/+1
| | | | | | | | 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>
* Android: report am start errors in case process returns successAssam Boudjelthia2021-10-292-3/+13
| | | | | | | | | | | | | | | | | | | | | | 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>
* Android: Fix lupdate issuesEike Ziller2021-10-281-8/+12
| | | | | | Change-Id: I08bdc81eabb082a091f27d2dea44369573946c49 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Android: drop const from AndroidConfigurations::currentConfig()Assam Boudjelthia2021-10-2611-16/+16
| | | | | | | | | | | 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>
* Android: Add and organize error cases for different stepsAssam Boudjelthia2021-10-265-109/+166
| | | | | | | | | | 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>
* Merge remote-tracking branch 'origin/5.0' into 6.0Eike Ziller2021-10-262-19/+16
|\ | | | | | | | | | | | | | | Conflicts: src/plugins/android/androidpackageinstallationstep.cpp src/plugins/cppeditor/cppmodelmanager.cpp Change-Id: I3bad38e1cfe717e98209d49461c9813a8e555eff
| * Android: get build dir based on settings file path for qmake projectsAssam Boudjelthia2021-10-252-19/+16
| | | | | | | | | | | | | | | | | | 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>
* | Android: Fix UI textLeena Miettinen2021-10-251-2/+2
| | | | | | | | | | | | | | Task-number: QTCREATORBUG-26458 Change-Id: Ibc407db46a605c6bde8f994af63f678a5a102b0e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* | Android: remove Virtual from the AndroidDeviceFactoryAssam Boudjelthia2021-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Android: remove unauthorized field form AndroidDeviceInfoAssam Boudjelthia2021-10-253-4/+8
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Android: remove AndroidDeviceType and State from AndroidDeviceInfoAssam Boudjelthia2021-10-258-45/+27
| | | | | | | | | | | | | | | | | | 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>
* | Android: Make refresh action device specificAssam Boudjelthia2021-10-252-2/+26
| | | | | | | | | | | | Change-Id: I18386ad88e04696068f5f127cadb7ffcc6f25a56 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Android: Align api and revision columns to the rightAssam Boudjelthia2021-10-151-1/+1
| | | | | | | | | | Change-Id: Ib6e0d1e0b6922cfe5b90e320b25b2dce2dcaba14 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Android: Remove unnecessary parameters in AndroidConfigurationsAssam Boudjelthia2021-10-133-23/+18
| | | | | | | | | | | | | | | | | | 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>
* | Android: handle return correct serialNumber for a running avdAssam Boudjelthia2021-10-133-4/+31
| | | | | | | | | | | | | | | | | | 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>
* | Move SDK Manager instal/uninstall checkbox to left of package nameAssam Boudjelthia2021-10-133-29/+29
| | | | | | | | | | | | | | | | | | | | 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>
* | Move sdkmanager's sdk level parsing to AndroidConfigAssam Boudjelthia2021-10-134-25/+27
| | | | | | | | | | | | | | | | | | | | 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>
* | Fix various compiler warningsChristian Kandeler2021-10-132-5/+4
| | | | | | | | | | Change-Id: I59db57e8501bbd0d0293ccce1b520df8acc07413 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* | Android: set the deploy step widget to expanded by defaultAssam Boudjelthia2021-10-121-1/+2
| | | | | | | | | | | | | | | | | | 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>
* | Android: put "am start" extra args at the end of the arguments listAssam Boudjelthia2021-10-122-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Android: correct label for build platform sdk in project settingsAssam Boudjelthia2021-10-081-1/+1
| | | | | | | | | | | | | | | | | | 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>
* | Android: add environment to removeAvd()Assam Boudjelthia2021-10-061-0/+1
| | | | | | | | | | | | | | Valid for windows hosts, otherwise, the command might fail. Change-Id: I3e759c74ea0a785fd226cda08f301f0cce17c9b7 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | Android: few fixes for android kits aspectsAssam Boudjelthia2021-10-061-2/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | Android: Clean up for extraData constantsAssam Boudjelthia2021-10-0610-28/+29
| | | | | | | | | | | | | | | | | | 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>
* | Android: make sure emulator device actions are emulator specificAssam Boudjelthia2021-10-042-25/+66
| | | | | | | | | | | | | | | | | | 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>
* | Add search field for Android Sdk ManagerAssam Boudjelthia2021-10-042-24/+43
| | | | | | | | | | | | | | | | | | | | | | 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>
* | Android: Fix compileChristian Stenger2021-09-301-0/+1
| | | | | | | | | | | | | | Amends b7c15d4d8dfdbc. Change-Id: I613476daa551cf52ef3b5e905868d027156b6826 Reviewed-by: hjk <hjk@qt.io>
* | Android: Make fixes to androidqmlpreviewAssam Boudjelthia2021-09-302-206/+180
| | | | | | | | | | | | | | | | | | | | This amends 261a39cbbd2fa53d35bd4d4de8642dc341f9f6ad with fixes to issues noticed after merging the initial patch. Change-Id: I5f859374cbba3a2e020e6ca0789cc2b387d2739a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* | Android: Do some refactoring for AvdDialog classAssam Boudjelthia2021-09-293-118/+110
| | | | | | | | | | | | | | | | | | 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>