Commit Graph

901 Commits

Author SHA1 Message Date
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
63fc22e274 Process: Change signature of waitForXxx() functions
Change the arg to QDeadlineTimer type.

Change-Id: Id3dee0717e44130c16baf7925e5b06346a1a1ad1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-23 07:09:22 +00:00
Jarek Kobus
665beaead9 Process: Change signature of setReaperTimeout()
Change the arg to std::chrono::milliseconds type.

Change-Id: I7b79fc318e2fd06971148038a31fecd4c1805a79
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2024-01-22 20:42:36 +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
Eike Ziller
73475480f7 iOS: Do not decorate the iOS Simulator device with "ready to use" icon
The iOS Simulator device is always there, and always usable, it never
can be unavailable. Since now the device state leads to a decoration in
the device selector(s), always having a "connected" bubble there looks
confusing. Remove it.

Change-Id: Ia218e05367a18841e966ea8566e16ad859a09597
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-19 10:32:36 +00:00
hjk
d234e71643 All: More ToolChain->Toolchain renamings
And removal of one unused function declaration.

Change-Id: I594e23401d8f247d3be081ce850005574951899d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2024-01-19 10:29:33 +00:00
Christian Stenger
491b24de70 Ios: Fix qbs build
Amends 0ecab7e0d8.

Change-Id: I28c29fbe761e2d61861252e468484bc883a7575b
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-01-19 08:16:25 +00:00
Eike Ziller
7e1b406229 Create a RunWorker for running apps on iOS 17 devices
That uses the various devicectl commands for starting and stopping the
app, and polling it's state for Qt Creator's stop button.

Getting app output and debugging and profiling are not supported, since
devicectl doesn't provide the necessary functionality.

Fixes: QTCREATORBUG-29682
Change-Id: Ied63b280458e5c109446a140a7774c2909aad62f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-18 18:46:32 +00:00
Eike Ziller
0ecab7e0d8 iOS: Extract basic devicectl output processing
Put creating the JSON document and error parsing into a separate
function.

Change-Id: I257f82249a07220467c33220c6b8e4650266b8d9
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2024-01-18 18:46:18 +00:00
hjk
c475cdf42d Ios: Use setup function for toolchain factory
Change-Id: I5c78061327fd57acb1e5803a67dd0a619c26a60c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-18 17:46:08 +00:00
Eike Ziller
699b91d371 iOS: Fix small issues when connecting/disconnecting devices
- Make sure that the updating TaskTree is deleted on quitting QtC by
  maintaining a hash of running updates per device
- If an update is triggered for a device while another is running,
  cancel the first one
- If the device is disconnected while an update is running, cancel the
  update. Otherwise this leads to wrong connection information in QtC

Change-Id: Ia76921d01b47229da1b5decd6b890303f4acfbf5
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-16 08:00:00 +00:00
hjk
f3d11bf0b8 Ios: Hide plugin class in .cpp
Change-Id: I10577ed877c6038ffd714a1a414ed8ba7ec801ee
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-15 09:32:53 +00:00
hjk
68f67d5a1a Debugger: Move plugin class definition to .cpp
Change-Id: I82327b20fb3bd970fe66b43228ca2f014c877f12
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2024-01-15 09:06:08 +00:00
Eike Ziller
a819a2bd9f Merge remote-tracking branch 'origin/12.0'
Change-Id: I62eb6d73b3ed59d0dd9760fc1921e353c993c166
2024-01-15 09:36:58 +01:00
Eike Ziller
28a8d6949b iOS: Implement deployment via devicectl
For devices that that supports. The goal is that iostool will be
unneeded in the end for these.

Call `devicectl device install app` with the right device id and bundle
path and parse its output.

This doesn't use our custom provisioning check, but relies solely on the
errors that are returned by devicectl.

Task-number: QTCREATORBUG-29682
Change-Id: Ibae0908841004a12e1fc91b154bedea4b37db053
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-01-15 07:31:39 +00:00
Eike Ziller
1a29b9e36c iOS: Add a "handler" property for the tool that is used for device ops
To the IosDevice. So other parts of the code know if the device can (and
should) be handled via devicectl instead of iostool.

Change-Id: I700bd1528fad505c3f4b6442d73e24b09ceba68a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-01-15 07:31:29 +00:00
Eike Ziller
b2eac9acf8 iOS: Use layout builder for details in device preference widget
In Preferences > Devices > Devices > Type Specific.
This makes it fit the style of other devices, and automatically makes it
possible to select and copy text from it.

Change-Id: I637858a939ada261504970611ffdb7eccf003c1c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2024-01-15 07:30:56 +00:00
Eike Ziller
fd4b8aa5a8 iOS: Fix provisioning profile check for "newer" devices
Before deploying we check if the provisioning information includes the
device that is deployed to. This suffers from the same issue as
QTCREATORBUG-21291: We use the USB identifier for the device ID in Qt
Creator, which cannot contain dashes, but the iOS hardware udid that
Apple uses can contain dashes (and the USB identifier then is that udid
without the dashes).

We need to use the iOS hardware udid when checking for the device in the
provisioning information.

Fixes: QTCREATORBUG-30158
Change-Id: I6f9e162ad6ece02370923ea59c046f439b8cc47a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-12 08:10:36 +00:00
Eike Ziller
150441bf88 iOS: Avoid iostool for info gathering if possible
Previously we had a small workaround for retrieving the state of
developer mode for iOS 17 devices integrated into our own iostool.

Instead use devicectl for gathering device information for devices that
it can handle, and only fall back to iostool for the devices that it
cannot handle.

Since iostool cannot handle deployment, running, and debugging for
iOS 17 devices anyway, the end goal would be to only use devicectl
for these.

Also add a TaskTree wrapper for IosToolHandler for convenience.

Change-Id: I5bcd09eb354c2dce9b21e62e140de16f2e740d6e
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2024-01-11 07:38:11 +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
f130918026 ProjectExplorer: Rename GccToolChain to GccToolchain
And some related classes/comments.

Change-Id: I9a0661f1a040de594145d403c673ec2e54990e0d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-12-04 15:23:48 +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
Jarek Kobus
ce80a6dad5 TaskTree: Rename TreeStorage<> -> Storage<>
This addresses the 20th point in the master task below.

Task-number: QTCREATORBUG-28741
Change-Id: I696beda87430fbe637abba8054012fb77516e220
Reviewed-by: hjk <hjk@qt.io>
2023-11-20 08:25:50 +00:00
Jarek Kobus
659f0f000c TaskTree: Unify TaskInterface::done(DoneResult) signal
Change the argument of TaskInterface::done() signal
from bool into DoneResult. Make it consistent with
other TaskTree API.

Introduce toDoneResult(bool success) helper.

Change-Id: I7b3041d7c1ed0317c76adbc1fd37448231e85f82
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-11-17 09:44:20 +00:00
Leena Miettinen
0ae211586e UI text: Fix "the the" in visible UI text, comments, and docs
Change-Id: I9b126ffa15b808fdb6f900a36453a9864248d35e
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-13 11:08:11 +00:00
Eike Ziller
f9d4697371 Merge remote-tracking branch 'origin/12.0'
Change-Id: Ice9c78147917fc13b6cf81ba781a37bdcd870e17
2023-11-03 14:58:00 +01:00
Marcus Tillmanns
32f69227f1 IOS: Unify error handling
Instead of using some flags in some struct, we convert the error handling
to use expected_str<ResponseData> to clean up the error handling with
the outside.

Change-Id: I0f8d10c99715989e0069568ebc1d799d412a0600
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-03 10:01:45 +00:00
Marcus Tillmanns
d2b7f9d27c IOS: Fix infinite timeout
Previously the "runCommand" function would never exit if the child process
hangs. This fix makes it so that the caller can specify a function
that determines whether we want to continue to wait.
In this function we then check if the promise has been cancelled.

We also let runCommand return an expected_str to better reflect actual
error reason.

We also early-error in various places to keep indentation low, and
make it easier to track where something returns an error.

Task-number: QTCREATORBUG-29564
Change-Id: I71ee4568d87c6b21c3ba9c71b81d028d517b553a
Reviewed-by: Serg Kryvonos <serg.kryvonos@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-11-03 09:56:06 +00:00
Eike Ziller
a724bd40f5 Merge remote-tracking branch 'origin/12.0'
Change-Id: I17c37a6fd474c3441343e91a67817c8179d0c7cc
2023-10-30 13:20:46 +01:00
Marcus Tillmanns
250b82ba32 Ios: Finish deploy on failure
Previously the deploy step would seemingly run forever if the
startSimulator step failed, as no result was added to the promise.

Change-Id: Ib320d051e78057e536d4ad371cb30108e848c65f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-30 09:16:10 +00:00
Eike Ziller
df80454d26 Merge remote-tracking branch 'origin/12.0'
Change-Id: I04104ef638b28d99da11b9b7a22f31f8d0ddf460
2023-10-24 13:05:55 +02:00
Jarek Kobus
5ac19328fd Ios: Remove unused methods
Change-Id: I57ac8a80218811ebb1be6f217d37fe925de23395
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-10-19 13:55:38 +00:00
Jarek Kobus
b706fab6c6 Ios: Fix synchronization
This fixes the synchronization on early shutdown, e.g. when
Creator is started with "-test Ios".

Change-Id: Ia18215a090809b6095d51ee3647728b4b2ad2d5f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-10-19 13:22:24 +00:00
Jarek Kobus
a31287dfe1 IosToolHandler: Avoid 3 arg connect
Fix signal arg for LogTailFiles::logMessage().

Change-Id: I8d50ee954e9fff2ececfcb17766e0b0cccb98a2b
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-10-06 18:55:14 +00:00
hjk
0eacd0190d All: Remove some unneeded #includes
Change-Id: If9a8fb5e0b32424e3b37ecf3adefc060f86b3630
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-27 13:50:38 +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
hjk
b68bdbafce ProjectExplorer: Remove ClangToolChain as class of its own
Change-Id: I92109855503d8696666a17f6e992bd5ca20cbf68
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-25 09:13:09 +00:00
Marcus Tillmanns
116ad3ed4f ProjectExplorer: Remove IDevice::setDisplayName
also removes IDevice::setDefaultDisplayName

Change-Id: Ie8ac3d95ba1991a20720342de3bf6e97c6414ffa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-09-11 11:25:34 +00:00
hjk
aa7c817f7a Utils: Temporarily introdce Key Id::toKey()
To avoid complications on the user code side during the Key/Store
transition.

Change-Id: I49ae9d496c9c1ee07f17245616fdefefe9abfc2e
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-29 05:48:34 +00:00
hjk
23149b27ab Utils: Introduce variantFromStore and storeFromVariant
These are functional replacements for
  QVariant::fromValue(QVariantMap) (or QVariant::fromValue(Store)) and
  QVariant::toMap() (or QVariant::toValue<Store>())

We will have a few code paths in the end that need to explicitly
operarate on both QVariantMap and Store (e.g. actual reading/writing
to keep format compatibility etc), so these can't in the end be
simple to/fromValue(OneType) but need an internal 'if' or such.

Change-Id: I954f3cb24fa8fe123162b72bbd25d891dd19b768
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-28 11:16:40 +00:00
hjk
d7d78df9da Plugins: And more Store and Key
After this one, is compiles with the opt-in macro. Not changed yet,
though.

Change-Id: I29a66ecb5daa71d0d97566b81fd9f47d92f6368a
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-25 11:45:22 +00:00
hjk
6e307be365 Utils: Rename the new Storage to Store
Apparently that's what the young people on the web use for such a thing.

Change-Id: I75d5396ff3cb3c26efd6008b5f2261354c4f7896
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-08-24 05:56:57 +00:00
hjk
dc6b40a5c0 Use Utils::Storage instead of QVariantMap in a few places
Change-Id: I02833cf2bc3caaadc22ff93ae530e4aebe4c3868
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-23 14:30:50 +00:00
Jarek Kobus
98026b29c6 TaskTree: Get rid of registration macros
Alias task types manually.
Don't require the alias to be inside the Tasking namespace.
Addresses the 22th point of the jira ticket below.

Task-number: QTCREATORBUG-28741
Change-Id: I1bdda7fe5a01e4bcb5052ec328f4e0eace878651
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 10:23:52 +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