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>
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>
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>
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>
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>
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>
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>
Although, recent Qt versions (Qt 5.12+) don't really need r10, this
can be useful if an older version is used, or if the user wants to
explicitly use Ndk r10.
Change-Id: Ic88929a747bcea89384a7bae9d8f8b26135fae65
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
After NDK r10x, there's one common gdb executable instead
of separate for each ABI. Currently, multiple debuggers
are being registered for each ABI although they all share
the same command. Apart from simplifying the list of debuggers,
this will make it less time consuming where each NDK can register
one instead of 4 debuggers.
Also, there was two functions handling debugger registration for
the default NDKs and another for custom ones chosen manually by
the user. Now, they are merged together instead.
Change-Id: I886b6fa8eb2190e630189f9002e7a44cd18c7b71
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: hjk <hjk@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>
No idea how to reproduce, but it can happen [1] that stale Android kits
appear in Qt Creator, which have broken combinations of Qt version and
toolchains. The Android plugin updates the Android kits at startup,
but only updates known "correct" kits, or creates new ones.
Additionally remove any previously auto-created Android kits that
were not recognized to be still usable.
[1]: probably after switching between a working Android setup and a
broken one, with broken toolchains/debuggers brought into the mix
Change-Id: I709f52df62f8998647e4d68bdfe76015e8941ab8
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>
When reading a path from file chooser, settings or environment variable,
make sure it is portable and "clean".
Avoids extra compiler registrations, invalid Kits and similar issues.
Fixes: QTCREATORBUG-26092
Change-Id: I2a11563f40973d5f595bf00e37ff045a503aa9f7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
If a user already chose a default device to run, we don't need to create
the whole AVD selection dialog, but rather straightforward to get the
device info if it's already connected, otherwise the dialog opens for
selection as usual.
Change-Id: I5fee9411d755e89da23a8d365f284e8b52808a07
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
It's the same as FilePath::lastModified locally, and toFileInfo
doesn't work remotely. So it's overall at least not worse.
Change-Id: Ice8d80dcfd01dc38edc1dce2b53e1b5e6274380f
Reviewed-by: Christian Kandeler <christian.kandeler@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>
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>
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>
Makes the interface more similar to QtcProcess.
Change-Id: I58e57d9fdb7c37eb0d2a5c5eef8643d6be97c3cc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Saves some code on the user side.
Change-Id: I32cd220b6e533f5497a1865f9c34ab9db4cfda79
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Don't set the whole kit's values to sticky, instead set only
device, toolchain, qt version properties to sticky to follow
the behavior of other platform's kits.
This also allow users to set specific CMake version for the kits
in case the selected one is not correct, since Android plugin doensn't
handle that anyway.
Fixes: QTCREATORBUG-25042
Change-Id: Ia6f6474b5ad9132e841e6e7024113439649b61f1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
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>
QStringRef is gone.
qsizetype vs int.
QMultiHash::insertMulti is gone.
QXmlStreamWriter writes UTF-8 by default.
Task-number: QTCREATORBUG-24098
Change-Id: Id217e40a1f17993a84fc725976e9cb84618b0580
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>