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>
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>
This makes sure that Qt 5 CMake android projects return the build dir
and not the android build libs folder.
Change-Id: I675e2ea2946beb63bbe08b9bf4b7d9603c386f09
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
The Android deployment file for CMake project was constructed based
on the main project target and thus was always expecting the file
to be under the build folder root path. This makes sure the correct
path to the output path is retrieved.
This practically different problems with running examples when the
main project is a Qt module, for both qmake and cmake.
Fixes: QTCREATORBUG-25793
Change-Id: I5fdedd94c7c4c84c351c28476ca14b0f95f99f22
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Deploy step uses AndroidManager::minimumSDK() which looks for the
version in the AndroidManifest.xml file which used to contain the
minimum and target sdk, but if the manifest doesn't contain that
value, this logic returns 0. So, return the defaultMinimumSDK()
in case the first way fails.
Change-Id: Id10e552d7c8de4d3544b7fa8f26ae5dd9e974df5
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
... by Target::activeBuildKey.
This is effectively the same problem under the hood, but isolates
it a bit.
Change-Id: Ie37a4d67aab3e044bb99b7b8d2bd7900198c5538
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Currently, Creator gets the minimum sdk version from a hard-coded
value (16) which is used for all projects. However, this is not ideal
because some Qt versions require a specific sdk level to build and run
properly. So, this change ensures that the minimum sdk value is obtained
based the Qt version used in the project.
Fixes: QTCREATORBUG-26127
Change-Id: I948dd18d16c3d9ca587ad7712aa4c9a1bfd53972
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Similar to QT_RESTRICTED_CAST_FROM_ASCII to avoid the need for
decorations in user code.
At the same time, drop some convenience constructors and functions
in CommandLine and Icon essentially serving the same purpose.
Change-Id: Ida4e5ac19c2da0a4298a97b2a8e1511d56bbb79d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This is already baked into QtcProcess::Result.
Change-Id: I02b017c7d26b5c42ea4e00cea5c3b393274edfdc
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
To make clear that this is not just any finish.
Also change FinishedError to FinishedWithError, to create
symmetry.
Also adapt enum member description to reality.
Change-Id: I13e05391eb86fdb24e2ae660f14dfddb282e1104
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Make functionality dependent on an (intentionally ugly)
setProcessUserEventWhileRunning call.
Also, back-paddle a bit on API combination of QtcProcess and
SynchronousPrceoss for now and prevent the QtcProcess-and-
runBlocking and SynchronousProcess-and-start combinations.
Goal is still to have all in QtcProcess in the end, but this
may take a while.
Change-Id: Ic146ec5db0ab8dc9613e5b2af5f4dc90bc7465ca
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Makes run() more similar to what start() looks like.
Also add some asserts to make sure run() and related functions are
only called on SyncronousProcesses, as these are currently the only
ones where this works.
Change-Id: Idee6076c3f40a484db5c17f5bb348698cc83d220
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This was requiring parameters the process object already knows.
This is a slight behavior change in most cases, it now includes
always the command line arguments, which previously only happened
in gcctoolchain.cpp and iarewtoolchain.cpp.
Change-Id: Id25a68c397e2f1d8bf52ab29210e215b1de46c6d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The result is fully stored in the object anyway. Using the extra
SynchronousProcessResponse structure only causes copies of
the data and complicates access on the user side in
a lot of cases.
The result bits are now also accessible individually.
There's obvious room for follow-up changes on the topic, e.g.
ShellCommand::runCommand's parameter list could shrink to
just a SynchronousProcess parameter.
Change-Id: I45aa7eb23832340be06905929280c012e1217263
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Mechanical to prepare merging the actual classes.
Adapting #includes.
Change-Id: I77a2c28129287778bc870c30cb890cd26bc2e62b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... in connection with CMakeBuildConfiguration initialization.
Having an Android device type does not necessarily mean an Android Qt
version is selected in an incomplete kit.
Change-Id: Ib157166c45b7d2ac20eafd6437054b9232595c1e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
If the default libs path doesn't exist (which is the case for qbs) then
try to get the abis using the current project node data method using
the Android::Constants::ANDROID_ABIS flag.
Because in multiplex (multi arch) mode dynamic libraries are compiled in
different products, library paths must be gathered from those
sibling products using the "dependencies" json array.
Change-Id: I9409a6a12fd9f304f427ed7868a7060c8f985a0b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Bring pane to front if error occurs when trying to install custom APK.
This is only triggered when the user explicitly presses a button, so
that is fine.
Task-number: QTCREATORBUG-24430
Change-Id: I4358e9a430ac220400ed70ebfe617f556d6e91a3
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Introduce bool QtSupport::supportsMultipleQtAbis().
Let AndroidQtVersion respond according to the QVersionNumber.
This allows to replace the version arithmetics in several
places with straight forward (and better findable) function calls.
Task-number: QTCREATORBUG-24471
Change-Id: Ib6e39fd6485a54e08ad66f84d4e2582989043419
Reviewed-by: hjk <hjk@qt.io>
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>
Including some random uses.
This mimics std::filesystem::operator/(std::filesystem::path).
Change-Id: I0b0f5cf0d962fd33d4cbb9be96645a0b4a21ee03
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Using Target is actually not optimal as handle to access that
information (BuildSystem + BuildKey or sth to that effect would
be better), so reduce the visibility of this kind of interface.
Change-Id: I138f156b51795d51d2af49c5119d160663dfc20d
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Allow parsing packages of the latest Android 11 (R) with API level 30.
Change-Id: Ia50d2ff23395b79828d47a8f9aeb3880aa131d83
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Special accessors to the repeatedly used C and C++ cases to denoise
and slim down user code. Plus some code cosmetics nearby.
Change-Id: Iba4662bd4731d8c4256e658529f39d5c995691ce
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Based on change 286266, we can find a correct NDK version for Qt for
Andriod version. This change allows Android plugin to get relevant NDK
information and registers appropriate toolchains and kits settings.
[ChangeLog][Android] Automatically use correct NDK version
corresponding to used Qt version.
Task-number: QTCREATORBUG-23583
Change-Id: Ic6b0d7a1ae8962c075b77498de88e018a008ac3e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>