Commit Graph

470 Commits

Author SHA1 Message Date
Jarek Kobus
ff0074415e Android: Hide toolsPrefix() and toolchainPrefix() in cpp
Change-Id: Id71d66239cd99f3f8b48bfafa5e76125adcfedc8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-27 12:41:45 +00:00
Jarek Kobus
c6174e8f1c Android: Hide getDeviceProperty() in cpp
Use a new CommandLine's c'tor.

Change-Id: I7e0809e97ae265cc83bd05a335beb4fa815e2a4e
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-23 14:11:23 +00:00
Jarek Kobus
5edbbbcb67 Android: Hide getAvdName() in cpp
Simplify it a bit.

Change-Id: I862eea2a388be3b83b73667a872f9cf9854c5c8a
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-05-23 14:11:16 +00:00
hjk
f30d369b99 Fix QMetaType::type() related deprecation warnings
Not in sdktool, which still builds with Qt 5.15

Change-Id: I6e6f4331127b821e471e2840e7959cd65e6419e9
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-05-23 13:04:22 +00:00
Jarek Kobus
982ad24243 CommandLine: Reuse new c'tor
Change-Id: Id154881b4f5d8c488e5c1f5e0f843d36bf838759
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-05-22 09:13:41 +00:00
Jarek Kobus
3fc5551465 Android: Use QList instead of QVector
Change-Id: If4e163716e8ad5eac782d4b023dcb88fca0f8414
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-04-24 17:24:50 +00:00
Eike Ziller
309a01337f Merge remote-tracking branch 'origin/13.0'
Change-Id: I12578a55fb61a3a9620c749c0b3bbbae6dcb4493
2024-04-02 14:54:30 +02:00
Alessandro Portale
44bf71169c Revert "Android: Speed up startup by using existing Qt6 Information"
This reverts commit 16c12f71ff.

Reason for revert: Introduces bugs.

AndroidQtVersion::addToEnvironment() set varying ANDROID_NDK_PLATFORM
values in successive calls. Only after a call of
QtVersion::ensureMkSpecParsed, a consistent value is set.

The symptom could be fixed by adding QtVersion::ensureMkSpecParsed calls
in strategic places (e.g. in the beginning of
AndroidQtVersion::addToEnvironment), but it does not make me confident
that this covers all potential code paths. The change that introduces
the issue is 16c12f71ff and will therefore
be reverted. It may be resurrected in QtC 14, but with much caution.

This issue seems to be specific to qmake. It hardens my impression, that
there are no easy gains to be made in the current state of the Android
plugin. An improvement for one use-case will break another use-case
which may be fixed only after two release cycles. It is Mikado code:
"Only touch if needed and safe".

Change-Id: I6ad860f6af8848a900d9421837a03929f9a57645
Fixes: QTCREATORBUG-30554
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2024-03-26 13:38:34 +00:00
Eike Ziller
1b97fdc100 Merge remote-tracking branch 'origin/13.0'
Conflicts:
	src/plugins/debugger/gdb/gdbsettings.cpp
	src/plugins/perfprofiler/perfprofilerruncontrol.cpp

Change-Id: I0d5b914f9d9b5499920a5db484ef77af6ae748d5
2024-03-12 09:27:39 +01:00
Eike Ziller
e31a06a0f4 Android/ProjectExplorer: Fix crash when removing multiple Android Qts
That were configured for a project.

The crash is triggered by a messy combination of the Android automatic
kit creation, project window update, and automatic creation of Qt
versions and kits by the automatic project importers, including a mess
of the listener pattern without any atomicity.

- the user removes the Qt versions
- the Android plugin updates the automatic kits and individually reports
  the removed kits (*)
- that triggers an update of the project window and an update of the
  target setup page (even if that is not shown, but that's yet another
  issue)
- that triggers the project importers, which add Qt versions, which in
  turn triggers another update of automatic kits in the Android plugin -
  while that is still in the reporting loop at (*)
- that leads to the crash, because the state at this point of time is a
  mess

This minimal fix of the specific crash makes the kit update reporting in
the Android plugin at (*) "more atomic", and the same for similar code
in the iOS plugin.

Fixes: QTCREATORBUG-30347
Change-Id: I2bea6fb735abcaa34469fc43f44aa37313f70429
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-03-06 10:46:44 +00:00
Eike Ziller
5af531cd39 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>
2024-02-28 08:09:05 +00:00
Assam Boudjelthia
ea26cd13b9 Android: get essential platforms and build-tools packages from BuiltWith
The commit 1180d5b8a270cfe7bd1c501c892d1c38ee7425de added information
about the ndk and android api level used at build time, ndk version has
already been accounted for in b73d6f3be8.
This now accounts for "platforms;android-xx" and "build-tools;xx.x.x"
packages.

Fixes: QTCREATORBUG-30404
Change-Id: I78b8885b88294404bc29c41a7b9491a331fcd709
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-02-22 12:02:01 +00:00
Artem Sokolovskii
0afe354952 Android: Update Android Stidio jdk detection
Fixes: QTCREATORBUG-28866
Fixes: QTCREATORBUG-30322
Change-Id: Id7908301a6c6acb540e6a7d575cc6b8b95cdf5d6
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-02-12 11:38:20 +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
Jarek Kobus
10ff747a0f Use more std::chrono and std::chrono_literals namespaces
Change-Id: Ib8c83988d7afe35d81b87ff8c5c87eef2082f12d
Reviewed-by: hjk <hjk@qt.io>
2024-01-23 09:32:43 +00:00
Jarek Kobus
afc67468e6 Process: Get rid of setTimeoutS()
Add an extra arg to runBlocking() function instead.
Use std::chrono::seconds for timeout.

Change-Id: I7c3c21e8f26a2ccbed157d15083d6ef0b4cd2f7e
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:27:51 +00:00
Jarek Kobus
290121bc21 Process: Use more rawStd{Out,Err} const methods instead of mutable ones
Avoid using readAllStandard{Output,Error} mutable methods if possible.
Use non-mutable methods when we are not connected to
readyReadStandard{Output,Error} signals.

Change-Id: I2e830e571b9eab2177fd856bbe06dfc5137d9c01
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-21 17:21:25 +00:00
hjk
aad933c09d Android: Hide AndroidToolchainFactory in .cpp
Change-Id: Ic820eea1b597eefc850407d75fd4a4c3a0a9985d
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-18 14:20:15 +00:00
hjk
8d6491e6ba Android: Have test class definitions closer to tested code
Change-Id: I92fbc2285a6d3f6d6b5e891f6727d5aa9778efa8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-12 17:01:38 +00:00
hjk
f114df2bd3 Android: Hide plugin class definition in .cpp
It's not meant to be used from the outside.

Change-Id: I94e46f95f896fa4b44e77e0196523beb8afdf8c3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2024-01-12 13:56:41 +00:00
Christian Kandeler
368ad63653 ProjectExplorer: Make DeviceKitAspect mutable for all non-Desktop kits
Fixes: QTCREATORBUG-30031
Change-Id: I0b2dacb5977b0f8e81afd13a0a4af6354ea81915
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-12-14 12:03:36 +00:00
hjk
27ef041d28 ProjectExplorer: Some more ToolChain->Toolchain renamings
Change-Id: I5cb2adf544a846f45f7fe7ce60f67b10ad100d91
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-12-12 08:14:59 +00:00
hjk
c463f944e9 ProjectExplorer: Rename ToolchainManager signals and members
Change-Id: I5195cb785f91dbaafdeeb8bb8c71939a6e3ff9e5
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-27 16:45:02 +00:00
hjk
b5937836f4 ProjectExplorer: Rename ToolChainManager to ToolchainManager
Plus the private and some comments.

Change-Id: I95d72d77f25cb1c969a1a6148e7186150a697d1f
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-11-27 16:33:34 +00:00
hjk
3bbda8f9da ProjectExplorer: Rename Tool{C,c}hainKitAspect
Change-Id: I74460b6402ab00f972c208023f03fac617982a11
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-11-27 13:35:28 +00:00
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