Commit Graph

40 Commits

Author SHA1 Message Date
Assam Boudjelthia
d5a3435798 Android: drop const from AndroidConfigurations::currentConfig()
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>
2021-10-26 18:34:58 +00:00
Assam Boudjelthia
ba672d1334 Android: Do some refactoring for AvdDialog class
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>
2021-09-29 10:27:32 +00:00
Assam Boudjelthia
e860871d2a Move AVD Manager from Android Settings to Device Settings
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>
2021-09-27 19:09:05 +00:00
Assam Boudjelthia
1372dfdf7f Android: Fix multiple clang clazy warnings
Change-Id: I2ea6cebd16c09a8a4502f4719d99a9d85e5e7d02
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-06-01 08:11:56 +00:00
Alessandro Portale
670616c6f9 Android: Use qAsConst with non-const Qt containers in range-loops
Change-Id: I1242a5c62a27b7b8f30bb7b43ff406eceb4135f7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-02-23 10:51:37 +00:00
Jarek Kobus
cf010911f7 Don't allocate unneeded temporary containers
Fix clazy warnings: allocating an unneeded temporary container
[clazy-container-anti-pattern]

Change-Id: I4b4c2c634eea650bbdf3c12d982a17f899fc94ec
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2020-12-14 12:35:47 +00:00
Jarek Kobus
6b588d7227 Remove unused variables
Mark some of them with Q_UNUSED, since it looks like
sometimes the copy is done on purpose, to force detach
or used for some hack with memory management.
In one case make unused variable used again.

Change-Id: I3825cd3399fa63bf6e12173c64509287d4a125e5
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-11-20 13:58:46 +00:00
Assam Boudjelthia
9d5ab6ef4b Android: show image type for each android version in New AVD dialog
If the user has multiple installed system-images for the same type of
device and same Android version, it might become confusing to know what
to choose.

Change-Id: I9be7f55731448efb47a6ab79e45f7f1717ade3eb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-11 07:50:36 +00:00
Assam Boudjelthia
cb34bfc493 Android: add line breaks to new AVD warnings
Change-Id: Ie533c468717674959060c7732952892086f37640
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-03 15:10:00 +00:00
Assam Boudjelthia
54667ae51c Android: disable Ok button for new AVD dialog if there is error
Change-Id: I626e80f540e42d726f37cd4802a14a32fa46595d
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-11-03 14:30:13 +00:00
Assam Boudjelthia
d1a42414c5 Android: fix misleading warning when creating an AVD
When no system images are installed in the used SDK path,
the warning should point to install a system image because
none are installed instead of blaming the SDK.

Task-number: QTCREATORBUG-24754
Change-Id: Ic3dc6cb25f014f4216fd63636b3b312b14f76e6d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2020-10-08 18:18:21 +00:00
Alessandro Portale
7b6d44a90a Android: Introduce constants for Android ABIs
Avoiding string duplication prevents typo-related runtime errors and
allows an IDE to use find symbol rather than plain text search.

Change-Id: I7fba7c7c5cf90c0b371efce3b575537b2708dd0f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-07-26 05:49:49 +00:00
Alessandro Portale
0be309bcf1 Various places: performance-for-range-copy
Change-Id: I475990d32a5211d31a77782667a2dfedba134137
Reviewed-by: hjk <hjk@qt.io>
2020-06-15 05:58:46 +00:00
Lars Knoll
99a81e78d5 Port from QRegExpValidator to QRegularExpressionValidator
QRegExpValidator is going away in Qt6, so port over to the
version using QRegularExpression.

Change-Id: Iecd1ba1f0e5e01009ae43b79c1ccc73f0fc046b2
Reviewed-by: hjk <hjk@qt.io>
2020-03-20 11:39:42 +00:00
Alessandro Portale
9904464074 Make various Q_LOGGING_CATEGORY's static
Change-Id: I43d3a198b0863d85a7fb305c7cb768f68acbd139
Reviewed-by: hjk <hjk@qt.io>
2020-01-15 14:54:10 +00:00
Assam Boudjelthia
0df5d8c2e5 Android: Improve "Add new AVD" dialog
* Re-organize the implementation to create a new AVD
* Use SystemImage instead of SdKPlatform because now
an SdkPlatform can be installed partially with a SystemImage.
The current implementation does not consider the this case,
thus we end up with an uncomplete list of installed system images.
* Add Device definitions with categories (phone, tablet, tv, etc.)
to the creation process (check -d arg in avdmanager create avd).

Task-number: QTCREATORBUG-23284
Change-Id: Id02a71ad452fb423fa2781d06ef3fcf2afa328a9
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-13 15:20:05 +00:00
Assam Boudjelthia
bccdf0f187 Set proper names and size constraints for elements of addnewavddialog
* Set sdcard size default to 512MB
* Add proper names to labels
* Default ABI to x86 as it's the recommended by Android Studio

Task-number: QTCREATORBUG-23284
Change-Id: I96ad6936b67045282933ebb31fba2c11b8af1d9d
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-09 09:48:13 +00:00
Alessandro Portale
9264cebe24 Android: Use Utils::InfoLabel in AvdDialog
Task-number: QTCREATORBUG-23346
Change-Id: Iabbad30f4a84d9b2b5cf16ab3e3e1e0cd05eaf8e
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2020-01-02 09:44:36 +00:00
BogDan Vatra
6b31f9cf23 Android multi arch support
[ChangeLog][Android] Android multi arch support for qmake

Change-Id: Ib8b1874604a3392130c96fbc00b26713b3d788ae
Reviewed-by: hjk <hjk@qt.io>
2019-09-16 07:34:54 +00:00
BogDan Vatra
dd9086530f Android: Nuke mips[64] support
There is no mips[64] support in Android anymore.

Change-Id: Ia7829e06c8e5658fb6ee9d20ea34d621a9651f37
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2019-05-07 15:08:03 +00:00
hjk
6f37348b4c Replace static_casts by QOverload where possible
Mainly to get rid of the QProcess::finished deprecation warning.

Also adjust coding style in the surrounding connects when needed.

Change-Id: I12f9b248c7974b892c4a069356e578e80f8c59e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-02-26 15:18:14 +00:00
Alessandro Portale
be5c228e5b Android: Modernize
modernize-use-auto
modernize-use-nullptr
modernize-use-override
modernize-use-using
modernize-use-equals-default
modernize-use-transparent-functors

Change-Id: I6c9e567edf16cf436c0e0c1239b40f74574a1096
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
2018-07-26 08:26:21 +00:00
Vikas Pachdha
ec4fe5f04f Android: Refactor Android SDK packages
Introduce a hierarchy for Android SDK packages and refactor the
code accordingly. This is ground work for sdk management and
automatic android setup

Task-number: QTCREATORBUG-18978
Change-Id: Idef545e3b3a8e33e920be52b26094fb8046afcd3
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-10-11 11:58:16 +00:00
Jake Petroules
5a858d7fed Add missing 64-bit ABIs (since API 21) in Android AVD creation dialog
Change-Id: Ife7d978b8c2e6743f34d670e42ac245249c52a88
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-05-30 06:44:30 +00:00
Vikas Pachdha
70be880bcb Android: Use avdmanager tool
android tool is deprecated since sdk tools version 25.3.0.
Use the new avdmanager tool

Task-number: QTCREATORBUG-17814
Change-Id: Id6f495f14e12d0069df08164cac1929b76d9e932
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-04-12 13:42:10 +00:00
Vikas Pachdha
2b5f5abb2b Android: Add system image information for each platform
Groundwork for the new sdk and avd management tool's integration

Task-number: QTCREATORBUG-17814
Change-Id: I3e46f6d3aa56c0f16dd66d0b1d731043e180e012
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-04-12 12:45:42 +00:00
Tim Jenssen
2631ffabd5 Remove spaces in initializer lists
Format initializer lists code style like.

Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013
Reviewed-by: hjk <hjk@qt.io>
2017-02-22 16:25:09 +00:00
Christian Stenger
e952b9d4f3 Replace occurrences of QStringList() << pattern
Change-Id: I598d8c06193c2e72435a76165d1afc9ee3465b48
Reviewed-by: hjk <hjk@qt.io>
2017-02-09 13:17:49 +00:00
Ulf Hermann
15fbfaf2e9 Move icons to Utils
This way we can use them from libraries, not only from plugins.

Change-Id: Ic35cfd5f04d638d87606bf272b2c00ded1267c1b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2016-08-05 10:52:53 +00:00
Orgad Shaneh
88dfa84fc6 Android: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: Id09b62b7b9812d9c0981202c257d18387a8b09d9
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2016-07-04 09:35:58 +00:00
Tobias Hunger
397e7f4843 Update License according to agreement with Free Qt Foundation
* Update files in src/plugins

Change-Id: Ia5d77fad7d19d4bb3498e78661982f68729adb22
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:57:01 +00:00
Alessandro Portale
033862f305 Themed Icons: Introduce Utils::Icon
Instead of describing icons via file name or in the themed icons case
via
a string that is a list of mask/color pairs, we have now a class for it.

Icons are now listed in per-plugin *icons.h headers.

RunControl::m_icon was The only place left where an icon property was in
fact a string. This patch changes that member to be a Utils::Icon.

Change-Id: Ibcfa8bb25e6d2e330c567ee7ccc0b97ead603177
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-11-25 12:30:52 +00:00
Alessandro Portale
b8bdc6f669 Icon refresh: First step towards the new Qt Creator themes
http://blog.qt.io/blog/author/didesous/ announced new designs/themes
for Qt Creator. This patch replaces many of the existing toolbar icons
with recolorizable masks for better theming support.

Change-Id: I557aa485205fe2624f33724226f698c303342b40
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2015-10-23 16:04:52 +00:00
Daniel Teske
0bd0468263 Android Avd Dialog: Fix what the Name validator accepts
While at it, make non acceptable chars give better feedback.

Change-Id: I080f01592b2c8cbd6580734ca3e6fd46b9491106
Task-number: QTCREATORBUG-13589
Reviewed-by: BogDan Vatra <bogdan@kde.org>
2015-05-15 14:22:33 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Leena Miettinen
282a45a6cf Android: apply UI text guidelines to messages
Do not use "please".
Replace "a image" with "an image".

Change-Id: I32614291b3be4c8a9860ddf8036ef5898bf52ce6
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-07-18 09:06:59 +02:00
Alessandro Portale
fe08cb8902 Centralize error/warning/info icons
There are multiple copies of these pngs in different plugins.
Let's have one version in core, also as @2x variant.

Change-Id: Iedff1a6190a72c1947dd202ae1ee46f59f9fb13c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-06-17 22:45:09 +02:00
Alessandro Portale
d6b12213a7 ProjectExplorer: Use constants for compile_warning.png and _error
Instead of repeating strings like
   ":/projectexplorer/images/compile_warning.png" all over the code,
we should use constants for it.

Change-Id: I91b36838d6da0a2332381e433788e796948d26db
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-05-19 16:51:59 +02:00
Daniel Teske
a087b3cd7f Android: Rework Create AVD dialog
Filter the list of api levels to only show those that can be created.

Change-Id: I7aaaa58324ca44176e39982cda29d746011fa346
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-04-01 16:24:45 +02:00