forked from qt-creator/qt-creator
Utils: Preserve output order with merged channels
Restored the process channel mode members to ProcessSetupData and StartProcessPacket and forward to the QProcess created in LaunchSocketHandler. LaunchSocketHandler now avoids reading from stderr for merged channels since it's guaranteed to not be available. This avoids asserts in Qt 6.3.0 and warnings in Qt 6.3.1 while preserving the original output order when an application has a mix of stdout and stderr output. Change-Id: I9f4541932cf9d8638b38658a5efea9cb5f1798f3 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -64,6 +64,7 @@ void StartProcessPacket::doSerialize(QDataStream &stream) const
|
||||
<< env
|
||||
<< int(processMode)
|
||||
<< writeData
|
||||
<< int(processChannelMode)
|
||||
<< standardInputFile
|
||||
<< belowNormalPriority
|
||||
<< nativeArguments
|
||||
@@ -75,12 +76,14 @@ void StartProcessPacket::doSerialize(QDataStream &stream) const
|
||||
void StartProcessPacket::doDeserialize(QDataStream &stream)
|
||||
{
|
||||
int processModeInt;
|
||||
int processChannelModeInt;
|
||||
stream >> command
|
||||
>> arguments
|
||||
>> workingDir
|
||||
>> env
|
||||
>> processModeInt
|
||||
>> writeData
|
||||
>> processChannelModeInt
|
||||
>> standardInputFile
|
||||
>> belowNormalPriority
|
||||
>> nativeArguments
|
||||
@@ -88,6 +91,7 @@ void StartProcessPacket::doDeserialize(QDataStream &stream)
|
||||
>> unixTerminalDisabled
|
||||
>> useCtrlCStub;
|
||||
processMode = Utils::ProcessMode(processModeInt);
|
||||
processChannelMode = QProcess::ProcessChannelMode(processChannelModeInt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user