Commit Graph

2095 Commits

Author SHA1 Message Date
Leena Miettinen
1f3e6b4c7a Android: Fix punctuation and wording of messages
Task-number: QTCREATORBUG-27055
Change-Id: I4180717163ec52a405c40e1a932713dda27c3f38
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-02-18 07:27:41 +00:00
Alessandro Portale
2cd7d89ec5 Android: Remove a cast in AndroidDeployQtStep::init
Don't do an additional dynamic_cast.

Change-Id: Icf3beda4e78bc03232689439e8ba264287b603ab
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-02-16 17:17:44 +00:00
hjk
75ef67615d ProjectExplorer: Remove IDeviceFactory::setCanCreate
That's implicit now by using setCreator()

The Android case looks odd as this is (and was) effectively static
information at startup. This will be addressed in a follow-up patch,
for now keep it functionally equivalent.

Change-Id: I4e6082f88dcd21379186340189acb581caef172a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-04 12:10:07 +00:00
Eike Ziller
e24b91555b Android: Remove unused include
Change-Id: I98d59fd17dbaca1fcfdf82506ec1fe669fe86f69
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 11:15:24 +00:00
Eike Ziller
9bc9fb5a0d Fix avdmanageroutputparser test
- There is no PLUGIN_DEPENDS for tests, and it wouldn't work anyhow
  because of duplicated symbols. It was interpreted as a dependency and
  the test disabled because no such target exists.
- Move the platformNameToApiLevel(...) function to
  avdmanageroutputparser.h to break the dependency to a lot of Android
  support code.

Amends 78da7e2922

Change-Id: I6933684a76e5291d415c72388caa3df2bee7cbfb
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-03 15:31:13 +00:00
Assam Boudjelthia
95627ce10f Set NDK list vertical size policy to maximum
And remove the spacer under the NDK list buttons.
Let the NDK list take less vertical space.

Change-Id: I4bd8769c45ddfbaaf34257b964a534c85de0e2fd
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-01 12:49:22 +00:00
Assam Boudjelthia
328886ed4d Show Android api 32 as Android 12L
Change-Id: I48122062de4ce3bc092089d73d7bbae5abced73b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-01 11:50:04 +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
e58f50df2a Android: Remove html code from tr-strings in keystore creation dialog
This change removes markup with its unthemed color values from
translatable strings. Terminates error messages with a ".". Adjusts the
message strings in the .ts files, accordingly.

The error label is changed from QLabel to Utils::InfoLabel.

Change-Id: Ifdd65de8d9e0ae311b494e70b9dc77ca0a3e4f46
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2022-01-31 21:45:28 +00:00
hjk
fd49c1d567 Android: Compile fix for Qt 5
Amends 49443d689.

Change-Id: Idadb794b85bebff9678b54f55f8b9822719a8d8a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-01-31 08:45:35 +00:00
Alessandro Portale
49443d689e Android: Detect available Ndk platforms also for recent Ndk versions
In order to detect the list of platforms that an Ndk installation
supports, AndroidConfig::availableNdkPlatforms iterates through the
directories of the Ndk.

The directory structure of the Ndk changed in the recent versions. So
that the detection that works with Ndk 19 does not work with Ndk 23.
Also, the new directory structure is split up by Android ABI. And the
lists of supported platforms differ between ABI.

This change adds detection for the new structure, in case that the
old implementation fails to return a list. It also adds an autotest
that covers the old and new detection of supported platforms.

Fixes: QTCREATORBUG-26772
Change-Id: I6e584963f51feca0bf90c7ed3a9fdb03cb5d39e6
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-30 19:11:45 +00:00
Alessandro Portale
d087fe424d Android: Set debugger sysroot also for recent Ndk versions
Android debug support specifies the sysroot inside the used Ndk.

Recent Ndk versions have a different folder structure which moved the
sysroot location inside the Ndk to somewhere else. This change adds
finding the sysroot in the new directory layout in case it cannot be
found in the traditional location.

Instead of Ndk version checks, this code uses FilePath::exists to see if
the sysroot is valid.

Fixes: QTCREATORBUG-26814
Change-Id: I37db3043e405b83168d7c80c522d31bc148e458c
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-30 18:13:45 +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
hjk
2b6f26dee2 ProjectExplorer: Use a lambda for DeviceFactory::create()
Somewhat slimmer interface on the user code side and follows
existing practice.

Change-Id: I20ed8f5a00591265d32ea9ce93e1f1bbc76d2437
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-26 14:51:09 +00:00
hjk
1fc83d2a56 Utils: Wrap various file system iteration flags and filters
... into a single class.

This makes passing them around as a whole easier, and opens a path
to have "generic" filters in form of a lambda or such.

Change-Id: Ibf644b2fedcf0f1a35258030710afff8f5873f88
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-01-26 13:13:41 +00:00
Eike Ziller
be5fb98f1f Merge remote-tracking branch 'origin/6.0' into 7.0
Change-Id: I72684fe4b0857e52a15ee83721f9d7975582a8d2
2022-01-26 09:25:13 +01:00
Jarek Kobus
c216e883b2 QtcProcess: Forward declare QTextCodec
No need to include it in the QtcProcess header.

Change-Id: Ie1acfeaad332bbd2205f3457ad313d9fabed69b7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2022-01-25 17:20:53 +00:00
Jarek Kobus
5127d155d2 QtcProcess: Get rid of setProcessUserEventWhileRunning()
Introduce EventLoopMode enum and pass it to the
QtcProcess::runBlocking() instead. There is no need to
store this setting. By default this value is NoEventLoop.

Change-Id: Icad98b77bec5280b79039b7e5aa4ec408261521c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-25 08:44:11 +00:00
Alessandro Portale
14eb2ce0a5 Android: Make a couple of AndroidConfig's functions static
They do not access non-static members. This way, the functions can be
called (e.g. by auto tests) without having an AndroidConfig instance.

Change-Id: I2551bddc2f4745ee7486b490f1abf935204c7763
Reviewed-by: hjk <hjk@qt.io>
2022-01-25 07:06:28 +00:00
hjk
a48a96e05c QtSupport: Introduce a type alias for QList<BaseQtVersion *>
Change-Id: I96b0eccc04da2f4a1a4e5ea9bdceb91b3fa3d724
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 14:38:20 +00:00
Alessandro Portale
13af635b5e Android: Use native paths format when setting an environment
ANDROID_HOME, ANDROID_SDK_ROOT and JAVA_HOME should be set as native
paths in an environment to follow common practice.

Change-Id: I073d125c93e27a02cc2b909e8c641ea61b3e9f8e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-24 12:40:44 +00:00
hjk
25f5771aa4 Rename QtSupport::BaseQtVersion to QtVersion
... and the Utils::QtVersion enum to Utils::QtMajorVersion to avoid
conflicts.

Change-Id: Ib688c67388272b7204a91444155f60b8c18a56bd
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-24 12:13:19 +00:00
Assam Boudjelthia
9d221706f4 Android: Install both target and whole project artefacts with qmake
As a workaround for qmake projects with dependencies for shared
libraries, make sure to install both the current target and the whole
project artefacts, the latter was the default before QTCREATORBUG-25793.

Task-number: QTCREATORBUG-26550
Change-Id: I8f313652bb582b2512ebe3471933e53120baf020
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-24 09:36:07 +00:00
Eike Ziller
9d8a419d10 Remove qmake build files
Removes qmake as a build system for building Qt Creator itself.
Keep them for some tests that are not completely moved to CMake yet.

Change-Id: I846c6ef65626b6dfae6375fdc85d00677aa8c2fb
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-20 12:18:15 +00:00
hjk
e695109078 ProjectExplorer: Make ToolchainManager::toolchains() overloads explicit
Saves a few cycles for the plain access.

Also sprinkle a few 'const'.

Change-Id: I238dfd9352ee39caa3aa48cd04a9f1cf827b029e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-01-20 06:13:09 +00:00
hjk
d8e2a3fd45 Android: De-noise toolchain detection a bit
Change-Id: Iab68004fd6310b5658bd9c3c1e23a761e3414ead
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-19 11:03:18 +00:00
Eike Ziller
3749cfc896 InfoBar: Make adding more buttons possible
Change-Id: Ic0c946cf3f87fe46cd06391f38e0bc71374ad340
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-01-18 09:33:20 +00:00
Alessandro Portale
9c7b1d39d3 Android: Fix compatibility check in AndroidDevice::canSupportAbis
A typo prevented to check whether a non-armeabi device supports running
armeabi applications.

Change-Id: Ibfdf76f69c1bdf5f4dc1ba73147328a8f7f6ae3f
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-01-15 12:08:18 +00:00
Alessandro Portale
44407e404b Android: Fix lldb connection for devices with uppercase "serial number"
The host name in the remote channel url needs to match the Android
device serial number case-sensitively. Otherwise, the lldb connection
fails.

When constructing a remote channel url via QUrl, the host name gets
forced to be lowercase. The url for serialnumber "MYPHONE12346" would
become "adb://myphone12346:<port>" and the lldb connection fails.

Use the DebuggerRunTool::setRemoteChannel(const QString &host, int port)
overload for lldb to avoid the issue.

Task-number: QTCREATORBUG-26709
Change-Id: I0e61d981c4b80a9d251ba1f7626fc2be9625a831
Reviewed-by: hjk <hjk@qt.io>
2021-12-16 07:20:50 +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
Eike Ziller
d422b408e0 Merge remote-tracking branch 'origin/6.0'
Conflicts:
	cmake/QtCreatorIDEBranding.cmake
	qbs/modules/qtc/qtc.qbs
	qtcreator_ide_branding.pri

Change-Id: I32991a77e52831dd2e24cf4a51ec252998c2d743
2021-12-09 12:04:32 +01:00
Jarek Kobus
c3a5dc380d IDevice: Make fromMap() / toMap() protected
Change-Id: I9a8f1caddffaf4e0f446ccc4f08f1110b6c003d4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-08 14:44:38 +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
53d5bc5a08 Android: Add channel and include_obsolete UI filters to SDK Manager
Allow to filter channels and obsolete packages from the UI.

Change-Id: Ifcaa2a1c3421a15e60f92b7a9b86cc9ab3554885
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-12-07 15:44:39 +00:00
hjk
e64ce914f9 Utils/Ssh: Move SshRemoteProces::isRunning() to QtcProcess base
... and use it on a few places.

Change-Id: Id2cea709e355a46821a720e593740ac032888ced
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-12-06 13:44:23 +00:00
hjk
76024f6fcc Android: Remove a superfluous #include
Change-Id: If7696c497d5ee2ce9b988c9e488638307e7d376a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-03 17:04:27 +00:00
Kai Köhne
47367a13ba Android: Use native separators in installation step ui
Change-Id: I724f91d8387cfd3138faa847d06674707d4d0f10
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2021-12-03 09:09:48 +00:00
Kai Köhne
16c8f1a9b6 Android: Fix use of keytool on Windows
Fixes: QTCREATORBUG-26647
Change-Id: I34fd2b4304480186d1a05e2c9101b2cfbd1e8e47
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-12-02 17:07:43 +00:00
Christian Kandeler
b2d63bf79e Fix various compiler warnings
Change-Id: Ib64f04f154b2c44dad3248ef038449c2ac628686
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2021-12-02 15:48:52 +00:00
Alessandro Portale
fd768cf55e Android: Show native paths in .pro File selection dialogs
Change-Id: I99e15a5d9ae3074447513e5e08f843c05653957e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-12-01 13:31:29 +00:00
Christian Kandeler
684f5da066 Android: Try harder to find the right qmake project file
... for adding the OpenSSL libs to.
For the typical Android case of a single application product, this will
do the right thing, and otherwise won't do anything worse than now.

Fixes: QTCREATORBUG-24255
Change-Id: I577f3cbd3fda086b8a7c7c5614d0ca79ff9d46f7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-11-30 16:54:52 +00:00
hjk
56009b8b15 Merge remote-tracking branch 'origin/6.0'
Change-Id: I0eae76ecff1a315877e4fdd471f0de3a3a55f180
2021-11-24 11:37:12 +01:00
Alessandro Portale
d0de8b18dd QmlDesigner/Android: Rename designviewer -> qtdesignviewer
"Qt Design Viewer" is the name of the component.

Change-Id: I37228ca32badc4107bb0faa088af5f6afeb9a8ac
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Piotr Mikolajczyk <piotr.mikolajczyk@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-24 09:05:34 +00:00
Henning Gruendl
590e19acb7 QmlDesigner: Enable environment variable usage
Change-Id: I91ada6d7dfa5e8376333c5ef27fbd72a5484e4f4
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-11-22 15:38:42 +00:00
Christian Kandeler
8f611286f7 Fix some compiler warnings
Change-Id: I9128afcf56bd47cb6627012bb6b0d13395b432ac
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-11-22 13:39:08 +00:00
Eike Ziller
eba4115b82 Merge remote-tracking branch 'origin/6.0'
Change-Id: I3bab4e31bc5993c59c7025ebde0846bf6c75810e
2021-11-19 10:44:15 +01:00
hjk
0030836f96 Android: Fix compilation
Amends 35e6991772.

Change-Id: Iba3dcf86b7b1ca7963a0b99798dafec85d19bd65
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-11-16 11:45:17 +00:00
Piotr Mikolajczyk
35e6991772 Fix bad activity if designviewer built with qt6
Changed the activity name run, so only the Qt6 version
of Qt Design Viewer is launched.

Change-Id: I79efc2a4ab37e9015b2feabda08ce274c6fca553
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-11-16 09:36:22 +00:00