forked from qt-creator/qt-creator
ProcessLauncher: stop awaiting for ready read when finished
In case the user called waitForReadyRead() and we have received the finished signal instead (without receiving readyRead signals in meantime), we should interrupt the wait and return false, since there is no point to wait for future readyRead signals from not running process. Change-Id: Ib4a770aea6ed562a5bef197eaa51b20c146842f0 Reviewed-by: hjk <hjk@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -559,6 +559,9 @@ bool LauncherHandle::waitForSignal(int msecs, CallerHandle::SignalType newSignal
|
||||
return true;
|
||||
if (wasCanceled)
|
||||
return true; // or false? is false only in case of timeout?
|
||||
const bool finishedSignalFlushed = flushedSignals.contains(CallerHandle::SignalType::Finished);
|
||||
if (finishedSignalFlushed)
|
||||
return false; // finish has appeared but we were waiting for other signal
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user