io/process: emit read for data remaining in buffer on exit

This commit is contained in:
outfoxxed 2025-05-24 02:39:01 -07:00
parent 89e796cb21
commit c4a7d16478
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E
3 changed files with 8 additions and 0 deletions

View file

@ -254,6 +254,8 @@ void Process::onStarted() {
void Process::onFinished(qint32 exitCode, QProcess::ExitStatus exitStatus) {
this->process->deleteLater();
this->process = nullptr;
if (this->mStdoutParser) this->mStdoutParser->streamEnded(this->stdoutBuffer);
if (this->mStderrParser) this->mStderrParser->streamEnded(this->stderrBuffer);
this->stdoutBuffer.clear();
this->stderrBuffer.clear();