forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -129,7 +129,7 @@ protected:
|
||||
void setupColors();
|
||||
void setupActions();
|
||||
|
||||
void writeToPty(const QByteArray &data);
|
||||
qint64 writeToPty(const QByteArray &data);
|
||||
|
||||
int paintCell(QPainter &p,
|
||||
const QRectF &cellRect,
|
||||
|
||||
Reference in New Issue
Block a user