Commit Graph

86 Commits

Author SHA1 Message Date
Alessandro Portale
323f353c6c Android: Replace AVD partition-size spinbox with emulator args input
The android emulator supports many more command-line startup options
than "-partition-size". Let's allow the user to take advantage of the
full functionalty, by providing a free-text input field for the options.

A link to the online documentation is also provided.

As a side-effect, the issue that an overridden parition size can cause
the "Cold Boot: different AVD configuration" warning is solved by not
having -partition-size by default.

Task-number: QTCREATORBUG-24735
Change-Id: I41d7b826133708c7ff447c1e257f62368745dea1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-10-07 11:25:28 +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
Assam Boudjelthia
f936e7c10d Android: rephrase few logs
Change-Id: If03a15c88caab210fd07c61312757317ea86af2f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-01 20:10:16 +00:00
Assam Boudjelthia
0cfb9e2bce Android: remove old android tool
Follows af7c218d95, the old android
tool is not useful anymore.

Change-Id: I126ecc24622f2e90465440c86b84cdfb30c103e1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-07-01 13:24:38 +00:00
Assam Boudjelthia
af7c218d95 Android: remove native sdk and avd manager buttons
The native SDK and AVD manager buttons are no longer useful, since the
original, visual Java-basd tool for managing SDK and AVDs were removed
from Google's offering. The replacement is a set of command line tools
and a visual tool within Android Studio, which can not directly be
launched from Qt Creator.

Qt Creator has it's UI on top of the command line tools.

Change-Id: If660d7f566c173f46d9b2a97c9204746d33270e6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-26 07:15:07 +00:00
Christian Kandeler
f4f9d9cdbb Android: Remove some unused variables
Change-Id: Id6d8f0735c410a331c406a3f3a094aac5f03f5a9
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2020-04-23 09:20:17 +00:00
Assam Boudjelthia
2555f4b8dd Android: Fix UNINIT_CTOR and PASS_BY_VALUE issues
Change-Id: Ie77e69226769d9ea0440611f2f5985c5ec08beaa
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-02-11 08:52:48 +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
Alessandro Portale
ae79b40561 Android: Fix AVD info parsing for renamed instances
Android Studio's AVD manager renames the AVD info file to match the
instance ID.

Task-number: QTCREATORBUG-23448
Change-Id: Id8ff0a53ae93b168c55442166072d14c5c84d2e0
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-14 21:19:56 +00:00
Alessandro Portale
e25212e2c5 Android: Log various avdmanager invocations
... in order to to understand what Qt Creator does when creating,
deleting or launching AVDs.

Change-Id: Iebcc9273746ad89069870ee09dab67c127b10be9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-14 08:11:15 +00:00
Assam Boudjelthia
d4ce0b6cfe Android: Remove unnecessary block of code from AndroidDeviceInfoList
Task-number: QTCREATORBUG-23284
Change-Id: I006ed8b63e979b4e3b27035f3b6838870ea7a11b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-14 08:10:49 +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
6a5b182706 Android: fix avdmanager parsing error for some new device types
Currently avdmanager tool can give an error
"Error: Google <device> no longer exists as a device", due to missing
definition for new devices in device.xml.

This change temporarily removes the tag "hw.device.manufacturer" to
parse successfully, then recover it back.

Task-number: QTCREATORBUG-23284
Change-Id: I9c6f4b432d7c5d16944c9b620c4a4ecda473d45a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-13 12:19:19 +00:00
Assam Boudjelthia
6d897c00f4 Android: Add more informative fields to AVD manager UI
Task-number: QTCREATORBUG-23284
Change-Id: Ic93de1c05731360b85925acd23bdca12edc56069
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-01-08 08:36:44 +00:00
Alessandro Portale
8e5b587b3d Android: Log invocations of avdmanager
Change-Id: I32e4fe3d837adcb6860247f45757187902566934
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-01-08 05:48:40 +00:00
hjk
ca4ba34229 Use Utils::FilePath in SynchronousProcess
Adapt callers and surrounding code.

Change-Id: Ie6c1883a44169cf9d790d06b660f46d24dc24c89
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2019-06-11 08:11:07 +00:00
hjk
473a741c9f Utils: Rename FileName to FilePath
More in line with QFileInfo terminonlogy which appears to be
best-of-breed within Qt.

Change-Id: I1d051ff1c8363ebd4ee56376451df45216c4c9ab
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-28 12:23:26 +00:00
hjk
0e4df97f90 Some more FileName::appendPath -> pathAppended() changes
Change-Id: Ia05b54f157b08353d5a9efccee48dfc212d3a489
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-15 13:19:58 +00:00
hjk
d1f9e466da Utils: Introduce a non-mutating FileName::pathAppended
... and start using it. The plan is to replace all appendPath() uses.

Change-Id: I555bcfa742b99b0951b98b0c0e707422c348fadb
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-05-15 11:45:24 +00:00
Eike Ziller
4545c81e57 Merge remote-tracking branch 'origin/4.9'
Conflicts:
	doc/src/howto/creator-sidebar-views.qdoc
	doc/src/howto/creator-ui.qdoc
	qbs/modules/qtc/qtc.qbs
	qtcreator.pri
	src/plugins/autotest/testresultmodel.cpp
	src/plugins/autotest/testresultmodel.h

Change-Id: I24cc585ca7782cb1d9cb0b8b73b46892b41937fd
2019-05-08 12:41:25 +02:00
BogDan Vatra
4b98f52c0e Android: fix avd creation for google play images
Latest avdmanager doesn't support "--tag" argument anymore and it fails
big time.

Change-Id: I9b1296a1813623d44add3e9e783b8395e6865cf2
Reviewed-by: hjk <hjk@qt.io>
2019-05-03 07:00:43 +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
Tim Jenssen
f0f142d4c8 setReadChannelMode -> setProcessChannelMode
setReadChannelMode is obsolete since some time

Change-Id: I91567d38d3509c7d1b174da4e6ca160c4b5d8452
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2019-02-07 14:29:02 +00:00
Christian Kandeler
966f4ea6a9 ProjectExplorer: Rework the build step run interface
Originally, the build manager used to run all build steps in a dedicated
thread. Communication between the step and the manager happened via a
QFutureInterface that was passed into the step's run() function.
Later, new steps were added that operated asynchronously, so the build
manager had to differentiate between the different kinds of steps for
starting and stopping.
These days, almost all build and deploy steps work asynchronously, which
made the QFuture-based interface look increasingly odd.
With this patch, all build steps are expected to work asynchronously, so
the build manager no longer needs to differentiate. Steps are started
and requested to stop via the run() and cancel() functions,
respectively, and emit the finished() signal when they are done. Build
step implementors no longer have to deal with a QFutureInterface. For
steps whose implementation is inherently synchronous, the BuildStep base
class offers a runInThread() function.

Change-Id: If905c68b234c5a669f6e19f43142eaa57d594803
Reviewed-by: hjk <hjk@qt.io>
2019-01-31 16:10:01 +00:00
Christian Kandeler
c6a6c12f05 Canonicalize some includes
Our canonical style is
    #include <utils/fileutils.h>
rather than
    #include "utils/fileutils.h"
Which makes sense, as such headers will never be found in the local
directory.

Change-Id: I4ca46e90d6c4d19d4b1f235f4c79caad864ef222
Reviewed-by: hjk <hjk@qt.io>
2019-01-10 09:04:46 +00:00
Orgad Shaneh
bdc2b4b59f Remove hard-coded disabling of debug logs
Instead, set the default level of all logs to QtWarningMsg.

The call to setFilterRules overrides the user preferences in qtlogging.ini.

Change-Id: Id5f6cd550d14ff7f45ae04c5d3110e0bafb0f072
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-10-13 16:36:58 +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
Ulf Hermann
ab152497a0 Android: Merge output channels of AVD process
Otherwise, if the process produces a non-0 exit code, we get an error
message with only the stdout, which likely is empty.

Change-Id: I3b84f928cf786015aab499cdc2277d530d243841
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-05-22 07:32:47 +00:00
Eike Ziller
62050437c3 Merge remote-tracking branch 'origin/4.6'
Conflicts:
	src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp

Change-Id: Ia723411f4b5c9c90f9786223ac6a7346d7ab9b99
2018-04-26 10:16:32 +02:00
Vikas Pachdha
83d8de3366 Android: Check for AVD startup failure
Task-number: QTCREATORBUG-20160
Change-Id: Ifbae6d10da6c782e701bc7840ce4324526d0dd82
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-20 05:26:10 +00:00
Vikas Pachdha
503fb603c3 Android: Set proper environment for the avdmanager tool
Task-number: QTCREATORBUG-19988
Change-Id: If34b4ff570ed6d6fdbb91435913d9130feceb499
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2018-04-20 05:25:33 +00:00
Vikas Pachdha
6e4ae817c2 Android: Check for missing emulator tool
Task-number: QTCREATORBUG-20160
Change-Id: I481adfe9a7a1b2c9c151d01d2fe1b010735c898b
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-04-19 10:05:03 +00:00
Vikas Pachdha
717c7bfd9f Android: Add explicit tag for google_apis system images
Task-number: QTCREATORBUG-20298
Change-Id: I9bc4d9192584ffbc1180ae7b69f334c915ca16f4
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2018-04-19 06:30:34 +00:00
Vikas Pachdha
e70179e14f Android: Add API to check whether to use native SDK UI tools
Task-number: QTCREATORBUG-18978
Change-Id: I1cf4749e81b3b49de14ff88a5876569886d2cdfe
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2017-10-11 11:59:46 +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
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