Commit Graph

445 Commits

Author SHA1 Message Date
hjk
c28fb1fdbe ProjectExplorer: Rename ToolChain to Toolchain
Change-Id: Ibb520f14ff3e2a6147ca5d419b9351c50c141063
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-24 15:18:24 +00:00
hjk
2d4867e73f ProjectExplorer: Rename Tool{C,h}ainFactory
Also adapt derived classes.

Change-Id: Iebf654c974730333c42b6994269ad1a4d5f7f428
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-24 13:55:25 +00:00
hjk
353c3cc930 Android: Use new setup for more plugin items
Change-Id: Id5ff09813ab7b4be425d007abd4cc04d9c9472c1
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-11-24 10:25:51 +00:00
Alessandro Portale
e006d4e86d Android: Avoid "Empty filename passed to function" warning
When launching Qt Creator with clean settings on Windows, the Android
plugin might cause an "Empty filename passed to function" warning that
comes from deep inside Qt.

This hack works around that.

Change-Id: Id668b981a1467a54d852082e95963e34554006e9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-11-04 18:11:04 +00:00
hjk
342e066886 Utils, all: Standardize on QtcSettings
Change-Id: Id222016f15b1c3bfe6710fe5d0297666d4565ef1
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 13:25:31 +00:00
Marcus Tillmanns
c32b7067fe Android: Don't unnecessarily test toolchains
Change-Id: I19046800c4fce6e7d2cd8d66381ac74ae41aa620
Reviewed-by: hjk <hjk@qt.io>
2023-09-05 12:37:03 +00:00
Cristian Adam
16c12f71ff Android: Speed up startup by using existing Qt6 Information
This will use the available information from modules/Core.json
and determine the abi version from the "compiler_target" used to build
Qt.

This is only available with Qt6. Qt 6.4 and 6.5 have this information.

Otherwise the "android-clang" qmake mkspec will be parsed and evalauted
to get the Qt ABIs.

Change-Id: Ia0c73f5c87983f44a156b54335dc8b36698c15b2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-09-01 15:43:00 +00:00
hjk
8d0aa34bfc Plugins: A bit more Keys and Store
Change-Id: Iee55eeaa881dd9f2047fdbe95ad8d827f4ba34e0
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-25 08:00:02 +00:00
hjk
8cf7ac4ac7 Android: Avoid some cast for tool chains
targetAbi() is available in the base and non-virtual.

Change-Id: I1c65dccec98b7df5211b2ecfa1e91a4bb4b6e98f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-08-17 08:00:08 +00:00
hjk
2a07253a42 Debugger: Rename debuggerkitinformation.{cpp,h}
... to debuggerkitaspect.{cpp,h}

Change-Id: Ia6316fcdc893ca066933658a52c78ef1587a76e8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-08-16 07:33:43 +00:00
hjk
aa25fdcc69 QtSupport: Rename qtkitinformation.{h,cpp} -> qtkitaspect.{h,cpp}
Change-Id: I12229e5e98b468101d32edd35be74bbda0921d89
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 08:59:52 +00:00
hjk
017d7c0e47 ProjectExplorer: Rename kitinformation.{h,cpp} to kitaspects.{h,cpp}
Change-Id: I069bddeb457366210d339edcbb8ffb359a40fab8
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-08-15 07:31:03 +00:00
Jarek Kobus
f313c5538f Android: Simplify return statements
Change-Id: I100b16a1fd74c4528f61f681bbeb5cdb4adddee5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-08-04 09:52:39 +00:00
Jarek Kobus
8dd46d0399 Various Plugins: Simplify return FilePath statements
Change-Id: Ia9efb86f722caca1492b577d51442f1f23b804b4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-08-02 08:19:23 +00:00
hjk
68c3103f76 Android: Use a more direct access to the tools' path
Change-Id: I49c574144fd4d6b2edd829538c424465c1fe7f05
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-07-27 13:03:41 +00:00
hjk
37d2240dfc Some more Qt deprecation
s/type/typeId/

Change-Id: I403af524146f0582709c1264e7517d8769dd723b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-09 09:38:20 +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
Assam Boudjelthia
4b73de5580 Android: allow non-integer platform sdk versions
Some of the more recent SDK platform versions don't follow
the form android-xx (x being integer) and can contain non-integer
characters or other sections such as android-33-ext4, which were
not showing on the list of SDK platform versions in the project's
settings.

Task-number: QTBUG-112465
Change-Id: I3de14c4f1b15a64dcced48c6e8817efbda6677bc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-05 17:38:45 +00:00
hjk
f10a524f05 Remove some QList::toVector() no-ops
Change-Id: I4d7ecf26a2d18b7e58e8bbae8d1b12f3e73924d9
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-04 14:34:16 +00:00
Alessandro Portale
8432760f9a Android: Make QRegularExpressions static const
Change-Id: I76653261c47a91dc5c3e3368e1961774917bc741
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-23 16:04:06 +00:00
hjk
3e7d93c788 ProjectExplorer: Move some not-fully-session related bits
... out of SessionManager.

The idea is to later move SessionManager into the Core plugin,
which both is sensible conceptually and also prerequisite to
merge the Bookmark plugin into TextEditor plugin.

Currently, only the interface is split, as the load/save
implemetations are non-mechanical to disentangle.

Change-Id: I31631db3094ea192825a2ccaa6add6188662940b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-01 09:26:50 +00:00
Jarek Kobus
62e0b4052f Remove unneeded includes of utils/runextensions.h
BTW, spotted some other unused includes marked with yellow.

Change-Id: I364e4b6fae73a2be2cfd3a63c1100be4a91aa49a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-27 13:16:44 +00:00
hjk
1285b80c40 Utils: Use an enum indication the possible abort of an dir iteration
The bool is not really clear.

Change-Id: I4ce6412736aec6b1853fd53d4e535ad045748350
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-26 07:38:21 +00:00
hjk
2cbe7783de Android: Move strange macro to smaller scope
Change-Id: Ia53ba19eb2879d7b72677e28639e4f506581f213
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-01-25 07:04:24 +00:00
Alessandro Portale
b73d6f3be8 Android: Read NDK and api versions from modules/Core.json
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>
2023-01-24 17:15:11 +00:00
Alessandro Portale
64b5364cab Android: Factor out removal of ndk packages from list
Will be used in additional places, soon.

Change-Id: Iceff0d14175f0bc9132d697d82ac46049a84ec17
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-01-24 07:27:44 +00:00
Alessandro Portale
6d79c5c2b3 Android: Remove "ndkPath" entry from sdk_definitions.json
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>
2023-01-18 10:11:48 +00:00
hjk
4ddd28ae22 Utils: Rename QtcProcess::readAllStandard* to readAllRawStandard*
... 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>
2023-01-10 12:08:53 +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
hjk
4417c48e7b Utils: Remove FilePath::operator+()
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>
2022-11-30 06:57:02 +00:00
hjk
3c8c5b08a8 Android: Simplify 32bit detection logic
Change-Id: I379e8903294dce644bd9f0214b596b56e5d7d81e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-28 12:34:13 +00:00
Artem Sokolovskii
a130a7ae0b Android: Remove support old cmdline tools
Link: https://developer.android.com/studio/releases/sdk-tools

Change-Id: I9ea7c83af604bfc4b5d5e81b037034b7e148e99a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-11-22 10:10:46 +00:00
Tim Jenssen
aa33927651 Merge remote-tracking branch 'origin/9.0'
Conflicts:
	src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp
	src/plugins/qmldesigner/components/stateseditornew/propertychangesmodel.cpp
	src/plugins/qmldesigner/components/stateseditornew/propertymodel.cpp
	src/plugins/qmldesigner/qmldesignerprojectmanager.cpp
	src/plugins/qmldesigner/qmldesignerprojectmanager.h

Change-Id: Ib029a830ee99190bc4ea2ad75d9300bfa86b42d9
2022-10-25 19:02:15 +02:00
Christian Kandeler
13f40f5471 Utils: Add sorted() function
For simpler calling code.

Change-Id: Ia0a16a28770fd172f74d06a626148248bf5d3c0c
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-10-25 14:29:45 +00:00
Artem Sokolovskii
fecb6d50e5 Android: Fix emulator tool path
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>
2022-10-20 13:07:24 +00:00
Marc Mutz
8eb4d52342 Port from qAsConst() to std::as_const()
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>
2022-10-07 13:47:53 +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
Alessandro Portale
a917770053 Replace QtSupport::QtVersionNumber with QVersionNumber
Task-number: QTCREATORBUG-27786
Change-Id: I71a44709c264829f629c9dfce702076eda297a77
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-09-19 12:08:39 +00:00
Eike Ziller
55c627efef Android: Use qtcEnvironmentVariable* instead of qEnvironmentVariable*
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>
2022-08-29 09:12:37 +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
Marcus Tillmanns
04205d1225 FileUtils: Adds toFilePathList function
Change-Id: Ie3137751135fdb6c3161cc886f307323fcce6b72
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-04 11:33:53 +00:00
Alessandro Portale
afe0b5a42d Utils: Use FilePaths alias instead of QList<FilePath>
Change-Id: I2eb0956377e46a34e73208b301eb662704a25e8b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-07-21 16:05:38 +00:00
Alessandro Portale
8ad4acdd30 Android: Don't quote log lines with path names
Change-Id: I70f23af46bd6c8318971b20727e4010889bdcebc
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-07-17 11:11:45 +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
Alessandro Portale
c899793b37 Android: Fix version mapping from sdk_definitions.json
- 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>
2022-07-04 08:26:04 +00:00
Alessandro Portale
8a83938886 Android: Fix OS-specific parsing in parseDependenciesJson
The Linux-specific sdk_essential_packages should not be installed if on
Windows.

Change-Id: I6b13a131785c7a76a35abf282dacdf915781e6d1
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-07-01 14:20:31 +00:00
Artem Sokolovskii
bef1bd18f7 Android: Remove foreach / Q_FOREACH usage
Task-number: QTCREATORBUG-27464
Change-Id: I2530688c44735bc4c69d57f9e8f392867be316f0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-05-05 11:00:36 +00:00
hjk
4297b9f289 Android: Avoid one use of ProcessArgs::splitArgs()
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>
2022-04-22 14:21:09 +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