Skip to content

Commit

Permalink
Fix compilation on 64-bit CPUs when QPROCESS_DEBUG is enabled
Browse files Browse the repository at this point in the history
Change-Id: Iad4bea50805b59bd6e985f5830315a7437880b99
Reviewed-by: Jesus Fernandez <[email protected]>
Reviewed-by: Alex Trotsenko <[email protected]>
Reviewed-by: Thiago Macieira <[email protected]>
  • Loading branch information
dfaure-kdab committed Aug 20, 2017
1 parent 4e39175 commit 2282ca4
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/corelib/io/qprocess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1029,7 +1029,8 @@ bool QProcessPrivate::tryReadFromChannel(Channel *channel)
if (readBytes == -1) {
setErrorAndEmit(QProcess::ReadError);
#if defined QPROCESS_DEBUG
qDebug("QProcessPrivate::tryReadFromChannel(%d), failed to read from the process", channel - &stdinChannel);
qDebug("QProcessPrivate::tryReadFromChannel(%d), failed to read from the process",
int(channel - &stdinChannel));
#endif
return false;
}
Expand All @@ -1039,13 +1040,14 @@ bool QProcessPrivate::tryReadFromChannel(Channel *channel)
channel->notifier->setEnabled(false);
closeChannel(channel);
#if defined QPROCESS_DEBUG
qDebug("QProcessPrivate::tryReadFromChannel(%d), 0 bytes available", channel - &stdinChannel);
qDebug("QProcessPrivate::tryReadFromChannel(%d), 0 bytes available",
int(channel - &stdinChannel));
#endif
return false;
}
#if defined QPROCESS_DEBUG
qDebug("QProcessPrivate::tryReadFromChannel(%d), read %d bytes from the process' output", channel - &stdinChannel
int(readBytes));
qDebug("QProcessPrivate::tryReadFromChannel(%d), read %d bytes from the process' output",
int(channel - &stdinChannel), int(readBytes));
#endif

if (channel->closed) {
Expand Down

0 comments on commit 2282ca4

Please sign in to comment.