Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.0
-
None
Description
Let's say in this report my process channel mode is set to QProcess::SeparateChannels.
I'm running a process, which may output the data on stdOut and / or stdErr. I can't predict the order of the data sent, of course. It may happen, that I receive the data only on one of these channels, while the other is empty.
Calling QProcess::waitForReadyRead() in this case is useless, as it seems this works only with conjunction to the previously selected read channel via QProcess::setReadChannel(). So, if my read channel is set to QProcess::StandardOutput and the process sends the data on stdErr, the QProcess::waitForReadyRead() timeouts with a failure. The same happens in the opposite case: read channel is set to QProcess::StandardError and the process sends the data on stdOut -> QProcess::waitForReadyRead() also timeouts with a failure.
I see no way to setup the QProcess so that QProcess::waitForReadyRead() reacts to the data received on any channel.
More info: Utils::Process1 wrapper around QProcess inside Creator makes Utils::Process::waitForReadyRead() to work with data appearing on any channel.
1: https://code.qt.io/cgit/qt-creator/qt-creator.git/tree/src/libs/utils/process.h
Attachments
Issue Links
- relates to
-
QTBUG-119847 Document QProcess::waitForReadyRead()
- Reported