Commit Graph

6 Commits

Author SHA1 Message Date
Jarek Kobus
f0e7ab6228 UnixPtyProcess: Get rid of foreach
Change-Id: I9ca9092c874960e63d6a29bcd11181bb571c3615
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
2023-08-04 18:03:17 +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
6d70a27965 UnixPtyProcess: Fix read loop
Previously a value of "-1" from ::read would result in an endless loop.
This could easily be reproduced by "cat /dev/random | base64"

The buffer usage was also much more complicated than needed.
A static readBuffer now keeps the amount of allocations lower.

Change-Id: I5bb1a3c84b107ff8c2d3801bca8c6ae9a709cdb3
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-03-03 08:12:38 +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
Marcus Tillmanns
3e73fe302e Terminal: Coverity warning fixes
Change-Id: If96291ff6df97f7e85840eb0951cc3f4abfab0f6
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-02-27 10:41:05 +00:00
Marcus Tillmanns
82194d7e9c Terminal: Add required 3rdparty libraries
Change-Id: Ic477e305f78632f5c454cd639dfc7e41fb643fe1
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2023-02-23 14:18:45 +00:00