QProcessPrivate: Use member initialization
Change-Id: I9fb8120a68daaa41c153010a52f7a3e99087153b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
parent
f478905068
commit
013b6cf0f1
@ -828,27 +828,6 @@ QProcessPrivate::QProcessPrivate()
|
|||||||
{
|
{
|
||||||
readBufferChunkSize = QRINGBUFFER_CHUNKSIZE;
|
readBufferChunkSize = QRINGBUFFER_CHUNKSIZE;
|
||||||
writeBufferChunkSize = QRINGBUFFER_CHUNKSIZE;
|
writeBufferChunkSize = QRINGBUFFER_CHUNKSIZE;
|
||||||
processChannelMode = QProcess::SeparateChannels;
|
|
||||||
inputChannelMode = QProcess::ManagedInputChannel;
|
|
||||||
processError = QProcess::UnknownError;
|
|
||||||
processState = QProcess::NotRunning;
|
|
||||||
pid = 0;
|
|
||||||
sequenceNumber = 0;
|
|
||||||
exitCode = 0;
|
|
||||||
exitStatus = QProcess::NormalExit;
|
|
||||||
startupSocketNotifier = nullptr;
|
|
||||||
deathNotifier = nullptr;
|
|
||||||
childStartedPipe[0] = INVALID_Q_PIPE;
|
|
||||||
childStartedPipe[1] = INVALID_Q_PIPE;
|
|
||||||
forkfd = -1;
|
|
||||||
crashed = false;
|
|
||||||
dying = false;
|
|
||||||
emittedReadyRead = false;
|
|
||||||
emittedBytesWritten = false;
|
|
||||||
#ifdef Q_OS_WIN
|
|
||||||
stdinWriteTrigger = 0;
|
|
||||||
processFinishedNotifier = 0;
|
|
||||||
#endif // Q_OS_WIN
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -297,17 +297,17 @@ public:
|
|||||||
bool _q_startupNotification();
|
bool _q_startupNotification();
|
||||||
bool _q_processDied();
|
bool _q_processDied();
|
||||||
|
|
||||||
QProcess::ProcessChannelMode processChannelMode;
|
QProcess::ProcessChannelMode processChannelMode = QProcess::SeparateChannels;
|
||||||
QProcess::InputChannelMode inputChannelMode;
|
QProcess::InputChannelMode inputChannelMode = QProcess::ManagedInputChannel;
|
||||||
QProcess::ProcessError processError;
|
QProcess::ProcessError processError = QProcess::UnknownError;
|
||||||
QProcess::ProcessState processState;
|
QProcess::ProcessState processState = QProcess::NotRunning;
|
||||||
QString workingDirectory;
|
QString workingDirectory;
|
||||||
Q_PID pid;
|
Q_PID pid = 0;
|
||||||
int sequenceNumber;
|
int sequenceNumber = 0;
|
||||||
|
|
||||||
bool dying;
|
bool dying = false;
|
||||||
bool emittedReadyRead;
|
bool emittedReadyRead = false;
|
||||||
bool emittedBytesWritten;
|
bool emittedBytesWritten = false;
|
||||||
|
|
||||||
Channel stdinChannel;
|
Channel stdinChannel;
|
||||||
Channel stdoutChannel;
|
Channel stdoutChannel;
|
||||||
@ -327,17 +327,17 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
QProcessEnvironment environment;
|
QProcessEnvironment environment;
|
||||||
|
|
||||||
Q_PIPE childStartedPipe[2];
|
Q_PIPE childStartedPipe[2] = {INVALID_Q_PIPE, INVALID_Q_PIPE};
|
||||||
void destroyPipe(Q_PIPE pipe[2]);
|
void destroyPipe(Q_PIPE pipe[2]);
|
||||||
|
|
||||||
QSocketNotifier *startupSocketNotifier;
|
QSocketNotifier *startupSocketNotifier = nullptr;
|
||||||
QSocketNotifier *deathNotifier;
|
QSocketNotifier *deathNotifier = nullptr;
|
||||||
|
|
||||||
int forkfd;
|
int forkfd = -1;
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
QTimer *stdinWriteTrigger;
|
QTimer *stdinWriteTrigger = nullptr;
|
||||||
QWinEventNotifier *processFinishedNotifier;
|
QWinEventNotifier *processFinishedNotifier = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void start(QIODevice::OpenMode mode);
|
void start(QIODevice::OpenMode mode);
|
||||||
@ -361,9 +361,9 @@ public:
|
|||||||
|
|
||||||
bool startDetached(qint64 *pPid);
|
bool startDetached(qint64 *pPid);
|
||||||
|
|
||||||
int exitCode;
|
int exitCode = 0;
|
||||||
QProcess::ExitStatus exitStatus;
|
QProcess::ExitStatus exitStatus = QProcess::NormalExit;
|
||||||
bool crashed;
|
bool crashed = false;
|
||||||
|
|
||||||
bool waitForStarted(int msecs = 30000);
|
bool waitForStarted(int msecs = 30000);
|
||||||
bool waitForReadyRead(int msecs = 30000);
|
bool waitForReadyRead(int msecs = 30000);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user