BTW, spotted some other unused includes marked with yellow.
Change-Id: I364e4b6fae73a2be2cfd3a63c1100be4a91aa49a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Qt 6.5+ writes the NDK version that was used for building Qt into
modules/Core.json. With this change, Qt Creator, now reads this version
and (if present) prefers it over the respective NDK version defined by
Qt Creator's own sdk_definition.json.
The order of preference for an NDK version being required and used for a
Qt version is now:
1) NDK that was manually set as "Default"
2) NDK defined by Qt's modules/Core.json
3) NDK version defined for a Qt version by sdk_definition.json
4) Default/fallback NDK version defined by sdk_definition.json
Task-number: QTCREATORBUG-28629
Change-Id: I2a0a9b3a1719139dc937d468e1dd3643289510a1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Since a long while, an ndk within an Android SDK installation resides
under a subdirectory "ndk/<ndkversion>". The "ndk_path" entry in
sdk_definitions.json is therefore redundant, since the ndk version is
already present.
Qt 6.5+ will provide the ndk version number (see QTCREATORBUG-28629),
without such ndk_path, and therefore it is helpful to contruct the ndk
subpath directly from that version number. For all Qt versions.
This change removes the "ndkPath" entry and the code that handles it.
Task-number: QTCREATORBUG-28629
Change-Id: I5a8f204f87a53a610dbeb9d4c39633582ef209c1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
... and re-use the old QtcProcess::readAllStandard* names for
a QString-returning 'decoded' version.
For now, only use that in 'full Utf8' cases, to stay bug-compatible,
the plan is, however, to employ the QTextCodecs we have already
in the channel buffers. That will be one-by-one, though.
Change-Id: Id209e0671920d4ea4197918e872f441254112d52
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
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>
This was a alias for .stringAppended(), but can be used too easily
when .pathAppended() is meant.
Change-Id: Ia3b64d39828d4074b43d87c923ce3a6a87038948
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
In cases where the obsolete "Android SDK Tools" package is installed
in addition to the "Android SDK Command-line Tools", the older
emulator launcher is called. One reason for that is that the obsolete
package has a higher version number than the new one.
This change resorts to checking the existence of the new emulator
executable and falls back to the old one.
Fixes: QTCREATORBUG-28196
Change-Id: I753e0901334a87314a2c8c70fbc69e55dffc500c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
We've been requiring C++17 since Qt 6.0, and our qAsConst use finally
starts to bother us (QTBUG-99313), so time to port away from it
now.
Since qAsConst has exactly the same semantics as std::as_const (down
to rvalue treatment, constexpr'ness and noexcept'ness), there's really
nothing more to it than a global search-and-replace.
Task-number: QTBUG-99313
Change-Id: I88edd91395849574436299b8badda21bb93bea39
Reviewed-by: hjk <hjk@qt.io>
And instead of qgetenv.
Takes Qt Creator's setting at "Environment > System > Environment" into
account, which makes it easier on some platforms to set them (e.g.
macOS), can be configured differently in different settings paths, and
potentially can be changed at runtime (depending on usage).
Change-Id: I159fb6928954240af742708efbd6776104c4631b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
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>
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>
- Support multi-digit values for version ranges, via "+" in the RegExp
- Turn the RegExp expression into a raw string for easier reading
- Fix shortVersion (Maj.Min.-1) handling by appending the ".-1"
- Explicitly define the Patch number range for 5.15 in sdk_definitions
Change-Id: Icf22f2b4f865b4d5bcff48569aa58137294129ce
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Replaced by the more harmless joinArgs in a compatibility settings
code path for now.
Change-Id: Id6d94faea26002f4a2641b5824d97e09a783b720
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
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>
The AVD specific fields don't need to be carried out by QtC settings,
these can be read from the AVD's config file when they are needed.
This also is good because those values can change at any time,
either manually or by some other IDE like Android Studio, and thus
we don't really need to manage them ourselves.
The fields in question are: skin name, target name, sdcard size,
openGL status.
Change-Id: I86163500ec2fed035e32ec02ed17e182778db4a7
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Use ADB's track-devices command to watch for device
events which would replace the current polling method
with a timer. For AVDs, a QFileSystemWatcher is used
to watch for changes in the AVDs home folder which
would allow updating the AVDs only when a change is done
like edition, deletion, start, stop, even from outside
Qt Creator.
This method would also make device updates faster,
instead of unexpected waits due to timer use.
Task-number: QTCREATORBUG-23991
Change-Id: I08a92252c99c02bc111e597d671f2350817458c7
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
- 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>
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>
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>
... 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>
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>
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>