Commit Graph

324 Commits

Author SHA1 Message Date
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
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
hjk
baf5377b60 Docker: Simplify settings access
Change-Id: I0ecbba9d29b041b06dac26159be702a38db42185
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-07-14 14:00:23 +00:00
Eike Ziller
26e96bfad8 Merge remote-tracking branch 'origin/11.0'
Conflicts:
	src/plugins/debugger/debuggeritemmanager.cpp

Change-Id: I9d99d13feff9315f52eacbd84857c63cb69bf804
2023-07-03 10:24:09 +02:00
hjk
5b93ecdd05 Docker: Add sanity check in start container
Change-Id: I633685402f27a3af317a58fd6f3c1d58174db989
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-06-30 11:44:00 +00:00
hjk
a62fcb73ce ProjectExplorer: Remove IDevice::createProcessListModel
All re-implementations are the same nowadays.

Change-Id: I954b3c9ca296967a99ea548ade6282fba188249f
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>
2023-06-23 12:27:03 +00:00
hjk
d045d8dc60 ProjectExplorer: Merge DeviceProcessList into ProcessList
The abstraction was not used anymore.

Change-Id: I756ae65b9164d0032c3e6a26c3a123fc50f72a75
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-06-23 12:21:39 +00:00
Marcus Tillmanns
ffa52040a4 Docker: Fix ensureReachable
ensureReachable for a path on the same device must return true.

Change-Id: I5b6924795997758ec0ad31520fa971ecd2a9615c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-06-23 10:40:42 +00:00
Leena Miettinen
942f30d461 Docker: Fix UI text
- Write Docker with an initial capital letter
- Rewrite a tooltip to add reasons for adding a flag first, and
  then the flag.

Change-Id: I8b4f3775ad618999faddec90b62ba7bb11ac23ae
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-06-19 11:05:45 +00:00
hjk
6f31d87444 Use more FilePathAspect
Change-Id: Ib348df1460f8610607251498b07010df58d51ddf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-05-19 15:07:17 +00:00
Marcus Tillmanns
e6081aaa0a Utils: Add TerminalMode::Detached
Change-Id: Ic36845d3469719e17f24602ce80f3e6cfc984fbf
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-05-04 10:43:36 +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
Marcus Tillmanns
522de9bfd7 Devices: Unify Port Gathering method
All devices that support it use the same mechanism to gather ports
so this patch removes the individual implementations in favor
of a single one in IDevice.cpp.

This patch also removes:
* canAutodetectPorts() as it was not used.
* Port::parseFrom...Output as they are not used anymore.

Change-Id: I8ecedec2d71e60985402387982c64311c5a651e6
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-06 06:58:44 +00:00
Marcus Tillmanns
c378df273c Docker: Fix windows terminal
Do not send the marker when running in a PTY. On windows it gets encased
in junk and duplicated otherwise.

Change-Id: I9017066b0f1d22d4700704bfa2120c4f5d66daa9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-05 09:15:24 +00:00
hjk
de546ff3ec Debugger: Support piping dumpers into gdb
This allows using dumpers available on the host being used from
remotely running gdb. No lldb/cdb yet.

Task-number: QTCREATORBUG-29000
Task-number: QTCREATORBUG-16246
Change-Id: Ib1a40a8c0284dcf41e8800d70ca3e632c699b2fa
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-05 06:26:11 +00:00
hjk
305ccfe259 Utils: Replace FilePath::onDevice() by new FilePath::withMappedPath()
Basically a.onDevice(b) == b.withNewMappedPath(a), matching the order
of b.withNewPath(a).

Whether the (curretly docker-specific) path mapping is useful /there/, and
whether some of the calls are needed at all is dubious. I added some
FIXME and changed a few cases directly.

Change-Id: I7514736ce922f632f1f737bc496f6783389a42b6
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 06:56:55 +00:00
Marcus Tillmanns
b999e5700e Terminal: Fix docker cmd for terminals
* Fix env for terminals

Change-Id: Ie16a74aeca3ad34a76af1dee0c5a01e607aabebb
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-04 05:59:35 +00:00
Marcus Tillmanns
f1f5a7412a Utils: Send __qtc marker from stub
Docker and ssh devices need the real process id on the
remote device. The process stub now send this if it receives
it as the first line of output.

Change-Id: I5d3af39651958fc88d21c3854a0fa1d7f51547a6
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-04 05:59:25 +00:00
Marcus Tillmanns
0015c666d2 Docker: Fix ensureReachable return value
DockerDevice::ensureReachable returned false in case a path was
already mounted.

Change-Id: I7b378a063dfe5380a1ead648f89911f2225c6338
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-03 07:34:40 +00:00
Marcus Tillmanns
0fb635e76c Docker: Fix Shell destruction handling
Change-Id: I125ac2eaf99e8dff85da06640f048b502f36fa08
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-29 06:54:40 +00:00
Marcus Tillmanns
c7b6c66cab Docker: Fix process state handling
Fixes the following errors that would trigger warnings due to incorrect
QtcProcess/ProcessImpl state synchronization

* Don't emit readyRead when state != Running
* Set result.m_error to FailedToStart if remote pid was not received
* Send stderr data once the pid was received
* Don't call deleteLater() on nullptr

Change-Id: I4b498a860ad27bef1a5b3e26417576431b54e84c
Reviewed-by: hjk <hjk@qt.io>
2023-03-28 06:32:38 +00:00
hjk
5996e58ffa ProjectExplorer: Allow Devices to be added without using the wizard
This re-organizes the buttons on the main device page a bit: The
topmost one still starts the wizard selection, below that are direct
individual buttons to add specific devices.

Change-Id: I52b2803febf658259dde9589544656fd4c8fc889
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-24 13:20:19 +00:00
Marcus Tillmanns
29873068eb Utils: Store Device::osType in settings
Change-Id: I41348be752598b7a8d1f1979764e7111cccc95a9
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-23 12:33:58 +00:00
Marcus Tillmanns
4d6683b2cb Docker: Fix warning
Change-Id: Ia4665c1fcd0f52b5b8180b811e59ad7ba5bc2587
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-03-22 08:18:01 +00:00
Marcus Tillmanns
44074accc7 Terminal: Use QtcProcess to start terminal window
Previously DesktopDevice::openTerminal used custom code to open a
terminal window. This patch changes it to use QtcProcess with
TerminalMode::On.

This also removes the need for "openTerminal.py" on macOS.

Change-Id: Iec978bdd19487ff8e59dcd88c35c2d01b0681022
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-21 15:09:15 +00:00
Marcus Tillmanns
97c1bb53a5 Docker: Check Image available
Docker will try to download images from the registry if an image is
not available locally. This takes a while, even if the image is not
available remotely. To circumvent the hangs resulting from this we
first check if the image is available locally and if it is not we do
not try to start it.

Fixes: QTCREATORBUG-28880
Change-Id: I6b9de8601b87e3050ae9ac5f1bbe3fa9701d4cc1
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-03-21 14:09:33 +00:00
Jarek Kobus
a43c20969c QtcProcess: Remove TerminalMode::Pty enum value
Make Pty::Data optional. When set, the PtyProcessImpl
implementation is implied.

Change-Id: I7990e9d9016223e6597d876a5d0c4ed177365874
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-15 13:52:45 +00:00
Marcus Tillmanns
666f3258ba Docker: Fix shell exit handling
Previously if a docker container was removed outside of Qt Creator
the shell would not be correctly reset by the dockerdevice and
therefor cause a hang.

Change-Id: I5e84f7c114e525c732f45b701277736d6acc7a11
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-15 13:33:25 +00:00
Marcus Tillmanns
2d15be91bf ProjectExplorer: Consolidate ProcessList
* Combined local and ssh process list retrieval into LocalProcessList
* Combined QnxProcessList into LocalProcessList
* Renamed LocalProcessList to ProcessList

Change-Id: I230c575375e306c638e4ca3034fa2d7ed243a44c
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-03-14 14:40:19 +00:00
hjk
08bacd3f19 Avoid a few double lookups when expanding environment values
Change-Id: Ie84caee89a48d8006e6324c5a82901d01a5fac6c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-03 11:37:05 +00:00
Marcus Tillmanns
78b1407adf Docker: Don't swallow output when startup fails
Previously error output occurring while the PID marker was
not parsed yet was not passed on to the parent QtcProcess.

Change-Id: Id6cbaa13a7d6c62d7a8612e118092eb2be6e790c
Reviewed-by: hjk <hjk@qt.io>
2023-03-02 16:32:57 +00:00
Marcus Tillmanns
86da87d306 ProjectExplorer: Remove IDevice::terminalCommand
Since Terminals can now be started for device file paths, there
is no need anymore for IDevice::terminalCommand.

Change-Id: I01c831ea7ee29d53efa6880631e8c6d54a4316aa
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-02 14:13:19 +00:00
Marcus Tillmanns
1da18a4b62 Utils: Integrate ptyqt into qtcprocess
Integrating PtyQt directly into QtcProcess allows us to
start Pseudo terminal processes using the existing QtcProcess
functionality such as starting remote process on e.g. docker
or remote linux devices.

This is needed for the new Terminal plugin.

Change-Id: Iaeed5ff9b341ba4646d955b2ed9577a18cd7100f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-02 14:10:11 +00:00
Jarek Kobus
8b09ad8898 QtcProcess: Introduce PtyData
That's going to be used by PtyProcessImpl.

Change-Id: Ifc1a7886ceed73272c9e415414db49452175a334
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-02 14:10:06 +00:00
hjk
81748fa00b Docker: Avoid explicit environment iteration
Task-number: QTCREATORBUG-28357
Change-Id: I0addc68309ab532d5a710916c7d017eccee1f348
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-03-02 13:43:58 +00:00
Marcus Tillmanns
6451538d39 Docker: Don't try to mount existing directories
Change-Id: I1df4e1bf8689edf08c539d71529e4149909502d7
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-03-01 12:55:02 +00:00
Jarek Kobus
d249e77f77 DockerDevice: Fix compile warning
Amends 682ef157d8

Change-Id: I2ee639aac5d6b2ba55e96d322a6d5818ca0d6735
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-02-27 11:50:02 +00:00
Marcus Tillmanns
682ef157d8 Terminal: Add Terminal plugin
Adds a new Terminal plugin that provides a Terminal pane inside
Qt Creator.

Fixes: QTCREATORBUG-8511
Change-Id: I7eacb3efa2463d7df9f383ae3fc33254fb9019a9
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>
2023-02-24 10:19:33 +00:00
Alessandro Portale
226799858c Translations: Replace QCoreApplication::translate() with Tr::tr()
Calling <Module>::Tr::tr() is preferred over
QCoreApplication::translate("::<Module>", "..."). This changes
occurrences in .cpp files.

Change-Id: I3311ef0dbf3e7d105a3f181b6b988f3b444468f1
Reviewed-by: hjk <hjk@qt.io>
2023-02-10 16:27:37 +00:00
Marcus Tillmanns
78cf3eb671 Docker: Check writeData
Previously only the process mode was checked to decide
whether we need an interactive docker session when starting
a process.

Change-Id: Ia80c78d861107239d0c86c405e06f30e7770ff8e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-02-07 13:06:56 +00:00
Marcus Tillmanns
e780ca991c Docker: Use rootPath() for Shell
Change-Id: Ie2578b768d8fcb91c55a33b4eb62e43c127ccee2
Reviewed-by: hjk <hjk@qt.io>
2023-02-07 11:16:02 +00:00
hjk
040ef3b7d3 Docker: Use a optional<Environment> to handle the non-fetched state
Change-Id: I93ef9da6c9c7731b28f9d6fab6413ce9c4f428b4
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-01-27 12:37:51 +00:00
hjk
dab859e776 Utils: Replace Environment.isValid() with .hasChanges()
That's closer to the intended semantics. The "other" use in docker
will be changed to an optional<Environment> as follow-up to
keep this here mechanical.

Change-Id: I43ef9da6c9c7731b28f9d6fab6413ce9c4f428b4
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-01-27 12:37:35 +00:00
Jarek Kobus
8e3a22329d QtcProcess: Add closeWriteChannel()
Change-Id: I080be230ec420ead2866f9481123125361e57033
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-01-24 08:48:12 +00:00
hjk
e7c536011f Prefix Tr::tr contexts with ::
To make outliers better visible in Linguist

Change-Id: Ic35ea2a858b7e3576d9a416fb494fddb616eaaa1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-13 12:00:17 +00:00
Marcus Tillmanns
b16c6495a0 Docker: Make sure temporary paths don't duplicate
Change-Id: I980f2a02c0a521d2d142573d94eb8850c26f0999
Reviewed-by: hjk <hjk@qt.io>
2023-01-11 07:59:22 +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