Commit Graph

248 Commits

Author SHA1 Message Date
Tim Jenssen
ca43b1c0fa Merge remote-tracking branch 'origin/13.0' into qds/dev
Change-Id: I524162811ad42e406d7b8e5f38e7043e776005e1
2024-05-07 13:31:11 +00:00
Alessandro Portale
67ab041903 Android: Disable "Make [NDK] default" button while NDKs list is empty
When pressing the "Make [NDK] Default" button while the list is empty
leads to a crash. The button should actually not be enabled if the list
is empty.

This change disables the button while the NDKs list is empty.

Fixes: QTCREATORBUG-30716
Change-Id: I5f10fd180f62d20210f1b0c0261e4d821d0582dd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-05-02 15:24:08 +00:00
Alessandro Portale
fcf3cf4770 Android: Allow users to use other Java versions than 17
Fixes: QTCREATORBUG-30684
Change-Id: I59940f43530fe5f36fdf4fc1655365ff321619f9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2024-04-30 12:54:28 +00:00
Tim Jenssen
6ea8c6290c Merge remote-tracking branch 'origin/13.0' into qds/dev
Change-Id: I3adcadf18eb19344461c5a6a0b6d3aec9045430c
2024-03-13 18:25:08 +01:00
Alessandro Portale
e604f285e8 Android: Provide direct JDK download link to required version
This changes the JDK download link to the JDK 17 packages on
adoptium.net, which is the latest source for JDK binaries for all three
host OSses.

Fixes: QTCREATORBUG-30335
Change-Id: I54322c82b7854d948fe15462f198f8eac1f58981
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-03-13 14:51:58 +00:00
Tim Jenssen
e7e9a58e46 Merge remote-tracking branch 'origin/13.0' into qds/dev
Change-Id: I8cd3cdf5854299d3017d6c6bfa656fc483a0e20b
2024-03-11 17:18:48 +00:00
Eike Ziller
3dbdad20dc Utils: Fix build with MSVC with C++20
Rename process.h back to qtcprocess.h

MSVC's "threads" standard header includes <process.h>, and that ends up
including our process.h from Utils.

There already was a hacky workaround in place for a similar issue with
MINGW, but that doesn't work with MSVC because that doesn't have

Simply use a name that doesn't conflict.

Change-Id: I1159cd2096b4f2dbc4a1728d0131dd6edd30ebd3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit 5af531cd39)
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-03-11 12:08:33 +00:00
Marcus Tillmanns
10da1ef3ff Android: Make errors visible
Change-Id: Ic0a1ebbc932c5854f7b41572a96a1c6b6c8896a0
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-03-07 09:00:29 +00:00
Artem Sokolovskii
25c0fc9c45 Android: Add output about JDK path issues
Change-Id: Ib72c5e8e2e23aa1f24d5181a060c72aaa2006d37
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-03-05 13:06:05 +00:00
Alessandro Portale
c536712707 Android: Remove command line and version numbers from translations
Change-Id: Ib4fcd6cbf0a023e074aaad4b265c0ab60edac01a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2024-02-27 12:49:36 +00:00
Marcus Tillmanns
536bb51c5a Android: Validate selected Java version
Change-Id: If77e5b524fdfea7d87ff4f221ef81d2f723f2f82
Reviewed-by: hjk <hjk@qt.io>
2024-02-27 08:42:49 +00:00
Jarek Kobus
947eaccea8 Various plugins: Fix remaining C++20 warnings about [=] captures
Change-Id: I3aab5f6fac0d30ff7e31dc524d2f42565b80bdb0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2024-02-06 13:08:30 +00:00
hjk
d89bb4ef1e Android: Remove two now unneded lambda captures
Change-Id: I46647daf2a0edbb4cb1b062989631b83dd5b42c5
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-02-01 17:32:23 +00:00
hjk
2beaba4627 Android: Use more direct access to current config singleton
Change-Id: Ica5ba556ac022fe39ed4439d023cda1742344eed
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-01-24 13:41:13 +00:00
hjk
497b9b3c2c Android: Use new setup for a few factories
Change-Id: I4538a2839b995f7bc245ae1a91f1979cc8c0dfdc
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-11-24 10:20:42 +00:00
Eike Ziller
64550e1339 Tr: Small fixes like full stops, whitespace and typos
Change-Id: I4d1edba6d28661af3c2255add35141f1e73fc304
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-10-18 11:16:03 +00:00
Jarek Kobus
804ad5a7f6 AndroidSdkDownloader: Reuse TaskTree
Use it for downloading and unarchiving chain of tasks.

Change-Id: I28d4c07a49933665158452ec836a4a6b2c5e23b0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-06-09 07:28:42 +00:00
hjk
529ade9f08 Android: Use functor to apply changed settings
Change-Id: I12a62dd4aa34ba3c23b0569e3b2724c2d7415ded
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-10 13:53:58 +00:00
Jarek Kobus
a0f6e8dc04 Utils: Rename qtcprocess.{cpp,h} -> process.{cpp,h}
Follows QtcProcess -> Process rename.

Change-Id: I97235a9a40cb7fd52944515b7ab878d96528f919
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-05-04 05:52:26 +00:00
Jarek Kobus
470c95c94b Utils: Rename QtcProcess -> Process
Task-number: QTCREATORBUG-29102
Change-Id: Ibc264f9db6a32206e4097766ee3f7d0b35225a5c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-05-04 05:52:16 +00:00
Christian Stenger
5a5d6f7548 Android: Silence soft assert
Change-Id: Ie4916e2de2cb51388df674219a45df0e7d4d5abf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-04 15:04:52 +00:00
Kai Köhne
56baf8c058 Remove GPL-3.0+ from license identifiers
Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0,
this applies only to a hypothetical newer version of GPL, that doesn't
exist yet. If such a version emerges, we can still decide to relicense...

While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only

Change was done by running

  find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \;

Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-06 11:15:13 +00:00
Jarek Kobus
0d74be319a Android: Pass context object to lambda connections
Remove some unneeded lambda () brackets.

Change-Id: Id00e2bc736683bb844cc7ba936ac9d21aa204416
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-12-07 16:30:13 +00:00
Alessandro Portale
76804a0839 Android: Link directly to command line tools download
Change-Id: I6a5d4321a0d6c0b854730615aa33acfe4986c9b6
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-11-30 12:30:13 +00:00
Artem Sokolovskii
fabf2f8cde Android: Rename Android Settings names
Change-Id: I5d8fe1d1525dcea65c2a616b86d777d1ffabce28
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-22 13:31:19 +00:00
Alessandro Portale
5c65115271 Android: Convert to using Tr::tr
Change-Id: Ie9110093101b0f49808b4da7b13ac3f47c3bb994
Reviewed-by: hjk <hjk@qt.io>
2022-10-07 10:24:32 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
Replace the current license disclaimer in files by
a SPDX-License-Identifier.

Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-08-26 12:27:18 +00:00
hjk
58c5b126d3 Utils: Settle on lowerSnakeCase for LayoutBuilder::Setter
Change-Id: Icfe487d8c7712cc8ad28f0f61e8ae4778a356fc3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-07-27 08:40:12 +00:00
hjk
dc839df59b Utils: Introduce a Layouting::empty item
A bit more explicit than the current mix of Space() and asserting {}.

Change-Id: Ia296b1d23294dfccd1e33827e136b821a4d2c6fe
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-07-26 09:08:18 +00:00
hjk
14257a24f9 Utils: Introduce Layouting::{br,st}
... as "standard" ways to define line breaks and simple stretch.

There have already been too many patterns to do it.

Break() and Stretch() still work for the patches in flight, but
they are planned to be removed.

Change-Id: I9b70dcdc11244a904a496b0c55938dfb0b265fc8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-25 09:52:15 +00:00
hjk
50e53b3e63 Android: Inline androidsettingswidget.ui
Change-Id: Ib30810b182eabd3d7f58691f3c3023151408ae04
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-07-22 09:53:33 +00:00
Jarek Kobus
a98b185e90 Drop Qt5: Android, IOS & WASM: Get rid of QOverload
Add a context object into some lambdas.

Change-Id: I72631aeb36703f8f335f3819796fb52148f1b377
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-20 10:30:48 +00:00
Assam Boudjelthia
525a284f3e Android: simplify AndroidSdkManagerWidget::installEssentials()
Remove an argument that doesn't need to be be provided explicitly
by the caller and can be done internally.

Change-Id: Ie225f847560b746ce9b8103ab38caca5caca1b0a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-07-11 12:35:33 +00:00
Assam Boudjelthia
f079479756 Android: Look for latest JDK version and not 1.8 specifically
Recent SDK Manager that is used by Qt Creator works with JDK 11+,
and JDK 11 is needed by Qt 5.15.7+, so look for the newest JDK
instead of 1.8 as currently being done.

Change-Id: I6ff415aa300d742735e8636b24a03116d5bfe2b6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-07-08 10:40:43 +00:00
Jarek Kobus
c67ef789ee AndroidSettingsWidget: Remove unneeded includes
Change-Id: I8a0f78868a335125b5ccdbb3554d222d68d5751d
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-07-05 11:09:01 +00:00
Jarek Kobus
104bbfc713 AndroidSettingsWidget: Connect to QtcProcess::done() signal
Instead of connecting to errorOccurred() and finished() signals.

Change-Id: If802368f1f084e5990458942b3ef94517a0cfdff
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-04-08 18:50:07 +00:00
Assam Boudjelthia
5f16074cb3 Android: rephrase sdk download popup question
Remove the double column, put the path in new line to avoid potential
word wrap at the start, and surround it with quotes.

Change-Id: Ifb33e4efaaa13342bfc3a75fc58d67e359e4e804
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-25 09:23:52 +00:00
Assam Boudjelthia
b6c83df7d9 Android: move SDK Manager to separate dialog
Hide the SDK Manager into own dialog which reduces the visible
elements on the Android Settings page by default. The dialog
will be brought up when installing essential packages for example.

Also, the dialog can be opened manually via a new button, which
makes it available on demand instead be there in the front all
the time, because that SDK Manager UI is needed only when installing
packages which doesn't happen often.

Change-Id: I09b92ae7b10673ba520da9ffd98d8120e1aaf104
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-03-25 09:23:37 +00:00
Jarek Kobus
5924716e21 AndroidSettingsWidget: Fix some issues
1. Don't create gitCloner if we are not going to start it,
   i.e. when we early return with QMessageBox::information().
2. Pass a context object of *this into gitCloner connection.
3. Don't kill the gitCloner, deleteLater() instead.

Change-Id: Ibb68627ed8d16e2dc43c9d63761609c8b8c82db0
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-03-25 07:05:05 +00:00
Assam Boudjelthia
5454dda249 Android: keep up with sdk tools changing folder structure
The cmdline-tools package used to have the folder structure "tools/bin".
However, latest packages are using the structure "cmdline-tools/bin".
And since subsequent updates we are installing "cmdline-tools;latest"
package, it will be put in "cmdline-tools/latest" folder, so we cannot
extract to that path, or otherwise sdkmanager will complain that the
path is in use.

Currently we extract it and put it under the SDK path, then use it to
install the essential packages, then it won't be used at all. This patch
changes that by extracting the downloaded package into a temporary
location, and use sdkmanager from there directly.

Also, this patch updates the links to the cmdline-tools along the way.

Fixes: QTCREATORBUG-27174
Change-Id: I1f5d0e38f5a026631e8a3852821d85a69d543c32
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-03-17 20:45:07 +00:00
Jarek Kobus
8e0ae8ba96 QtcProcess: Limit the inclusion of qtcprocess.h
Move the rest of QtcProcess enums to processenums.h.
Move ExitCodeInterpreter into processenums.h.
Remove superfluous Utils:: prefix.

Change-Id: Iaa596f353d33d6930085a621b114cc15a35caa80
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-02 13:30:39 +00:00
Assam Boudjelthia
ef003ba769 Android: Simplify SDK setup process by minimizing number of dialogs
SDK setup process currently downloads the SDK tools, then checks
the mandatory packages, asks the user if they want to install them,
then show a dialog with package details, then asks again whether
the user wants to check the licenses.

The following two steps are redundant because there's a dialog which
guards the package installation and waits for user's input:
* Asking the user if they want to install the mandatory packages
* Asking the user if they want to verify the licenses

Change-Id: If06c0adea9444107a149c3ec32be67061954d1bb
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-01 10:31:18 +00:00
Alessandro Portale
9e2554b660 Use Utils::Archive instead of java's jar in AndroidSdkDownloader
The exctraction of the downloaded commandlinetools zip file via java's
jar tool did suddenly not work anymore on Windows. The exit code of
jarExtractProc in AndroidSdkDownloader::extractSdk would be != 0.

Instead of fixing the jar usage, this change replaces it with the
recently added Utils::Archive.

That has the advantage that it preserves the file permissions while
exctracting, so that we can also get rid of setSdkFilesExecPermission.

Another advantage is that the SDK can be extracted even before a jdk
has been selected.

Change-Id: I99cc2aff8e183108eb11dbf96f06557e5b299d56
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-28 12:35:45 +00:00
Alessandro Portale
f1a5a1f716 Android: Allow users to select which NDK to use for kits
This adds a "Make Default" button next to the NDKs list view. The
default NDK version is then used to override the NDK version for all Qt
versions in the sdk_definitions.json.

Fixes: QTCREATORBUG-21755
Fixes: QTCREATORBUG-22389
Fixes: QTCREATORBUG-24248
Fixes: QTCREATORBUG-26281
Change-Id: I460daafdd7f2d6380c0114bcd14cb0c46226d516
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-12-10 09:15:34 +00:00
Alessandro Portale
5e77303b57 Android: Turn SDK manager from QTabWidget into QGroupBox
Since the AVD manager moved into the "Devices" option page, the SDK
manager tab was left alone in the QTabWidget. One single tab looks
strange and uses more space than needed.

This change turns the SDK manager area into a QGroupBox, which is
consistent with the rest of the Android Options page. This patch also
adjusts the margins and spacings of the SDK manager widget to fit to the
rest of the options page.

Change-Id: Id1ed38862e8f9e984f53cdfb59492e30902162a7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-12-08 11:45:45 +00:00
Assam Boudjelthia
e3fb97b5ce Android: give a visual indication when sdkmanager is reloading packages
Add an info message when sdkmanager is reloading the packages, and also
don't expand the summary widget when the widgets are not active,
which can be when the packages are being reloaded or when the licenses
are being reviewed, this will give more space for reviewing the licenses
instead of having the summary take most of the settings page space.

Change-Id: I6acf3f6edc3b3d3fa78f0ba00308a21f8bb4fa72
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-12-07 18:07:57 +00:00
Assam Boudjelthia
ca9742e2a1 Android: Merge Java settings into Android settings
... to save some space.

Change-Id: I68d7cae1b007eff0624f2c0993e191c64fb415fc
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-07 15:44:57 +00:00
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
Alessandro Portale
c44478f0fe Android: Fix FilePath usage (string vs. userInput/Output)
Important on Windows

Change-Id: I0a3041e28ad60f28544ecdab2f6153b7931939f2
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-09-29 08:25:09 +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