diff options
author | Marcus Tillmanns <marcus.tillmanns@qt.io> | 2023-05-15 11:03:16 +0200 |
---|---|---|
committer | Marcus Tillmanns <marcus.tillmanns@qt.io> | 2023-05-15 12:12:20 +0000 |
commit | c82d7ccdcde982b40ecb6690af2dd182fd8dba75 (patch) | |
tree | 701f24d478fdaa8892e1c7d6f121f99aaa3b5a2f | |
parent | 9dad4ab9d4f3b638ab3df6cd45eca1fbaa51fa96 (diff) | |
download | qt-creator-c82d7ccdcde982b40ecb6690af2dd182fd8dba75.tar.gz |
Utils: Delay close signal in pty process
The close signal of the conpty process needs to be delayed
as it otherwise might arrive before the last output of
the process.
This should be fixed in the future by using overlapped io
for the pipes.
Change-Id: I49fe4863672a0b14f5766bbe5ee7b1d8894594ca
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
-rw-r--r-- | src/libs/3rdparty/libptyqt/conptyprocess.cpp | 2 | ||||
-rw-r--r-- | src/libs/3rdparty/libptyqt/conptyprocess.h | 6 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/libs/3rdparty/libptyqt/conptyprocess.cpp b/src/libs/3rdparty/libptyqt/conptyprocess.cpp index 687d3116f5..b9a4afd126 100644 --- a/src/libs/3rdparty/libptyqt/conptyprocess.cpp +++ b/src/libs/3rdparty/libptyqt/conptyprocess.cpp @@ -184,7 +184,7 @@ bool ConPtyProcess::startProcess(const QString &executable, if (!m_aboutToDestruct) emit notifier()->aboutToClose(); m_shellCloseWaitNotifier->setEnabled(false); - }); + }, Qt::QueuedConnection); //this code runned in separate thread m_readThread = QThread::create([this]() { diff --git a/src/libs/3rdparty/libptyqt/conptyprocess.h b/src/libs/3rdparty/libptyqt/conptyprocess.h index ac94048981..d4ffd62b7e 100644 --- a/src/libs/3rdparty/libptyqt/conptyprocess.h +++ b/src/libs/3rdparty/libptyqt/conptyprocess.h @@ -115,11 +115,7 @@ public: void emitReadyRead() { - //for emit signal from PtyBuffer own thread - QTimer::singleShot(1, this, [this]() - { - emit readyRead(); - }); + emit readyRead(); } private: |