Commit Graph

14 Commits

Author SHA1 Message Date
Marcus Tillmanns
2a510011f1 Utils: Send start failed if no ProcessInterface
Change-Id: I38cdce9812bcec3240e3fb4f30a1dd266a5515e9
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-10-12 08:41:19 +00:00
Marcus Tillmanns
577b26bf1c Utils: Remove unused function
Change-Id: Ib6aadb180a1208f5ee124f788619afa213aa6823
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-10-06 06:18:47 +00:00
Marcus Tillmanns
e17866e283 Terminal: Show key when input is hidden
Change-Id: I5fca6a8c4f43ea2b95bad4df247b5df0abad521c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-09-05 13:18:36 +00:00
Jarek Kobus
f4eb25ccec Process: Add setRunData() helper
It allows to set command/workingDir/env in one go.

Fix condition for setCommand() to match the one for setWorkingDir().

Change-Id: I0aa4639f3357c387a0fe8da321e94e34a3ea232d
Reviewed-by: hjk <hjk@qt.io>
2023-08-17 08:08:09 +00:00
Marcus Tillmanns
31f7ed44b6 FilePath: Use isSameDevice
Some places compared the scheme and host of a filepath to
decide whether its the same device. This is incorrect and
leads to false negatives. isSameDevice is the correct way
to decide whether two paths are from the same device.

Fixes: QTCREATORBUG-29474
Change-Id: Iced8f434dadb931f6595f47f95647b341c48d3aa
Reviewed-by: hjk <hjk@qt.io>
2023-08-08 13:19:35 +00:00
Marcus Tillmanns
def291f260 Terminal: Improve paste performance
Pasting large amounts of data on macos would block the App indefinitely.

The issue was a blocking call to ::write. The first fix for that was to
set O_NONBLOCK on the tty stdout fd. The second fix was to pass the
actual result of the write back to the caller so they can react to it.

In the TerminalSurface we now check if the write was successful and
if not we buffer the data and try again later.

Change-Id: Ibc92cce57fad88b5e9aa325197b42e17bec5e746
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-07-26 09:48:17 +00:00
Marcus Tillmanns
2edaf459bd Utils: Support relative path for PtyProcess
Change-Id: I8af96e51a4b75c192f5fab339449f4d07b1a040a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-06-13 07:40:41 +00:00
Marcus Tillmanns
11ec14ebf4 Utils: Dont auto add sudo to all processes
Terminal processes need to add to the stub and not the target app,
so sudo is only automatically added for default processes.

The terminal interface is changed such that sudo is added to the stub.

Task-number: QTCREATORBUG-27519
Change-Id: Ife11e937644c4e946401a5b079e90fa64aee2c52
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-06-12 08:09:04 +00:00
Jarek Kobus
abb85b073a QScopeGuard: Make all usages of QScopeGuard consistent
Change-Id: Icfc35ecbdbdee8dadbb1b17789694093427c3ed9
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-06-07 10:35:01 +00:00
hjk
52db6f38f7 Utils: Replace two deprecated uses of .count()
Change-Id: I13d683b762c5093231e42c57d58ae322746d9922
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-06-06 14:35:46 +00:00
Leena Miettinen
48e2c66a4e Doc: Remove docs for Utils::SynchronousProcess
...that has been integrated into QtcProcess.

Change-Id: I39b6e4cb5d713d59345015b2a471cd4e6ef99f57
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-05-26 07:35:53 +00:00
Leena Miettinen
8c288bf05f Doc: Add "\inmodule QtCreator" to \class and \namespace docs
To get rid of QDoc warnings.

Change-Id: Idd39b7ae4327798c376f424c94d6617bcaee2258
Reviewed-by: hjk <hjk@qt.io>
2023-05-22 12:48:35 +00:00
Jarek Kobus
c75b59f9b4 Process: Rename QtcProcessPrivate -> ProcessPrivate
Rename the logging category for Process.
Fix inline comments accordingly.
Adapt warning/debug messages accordingly.

Change-Id: I2b1f0f558701def3afa3c1b04adf629833dba9e7
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: hjk <hjk@qt.io>
2023-05-10 06:07:22 +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