diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2014-06-05 15:10:27 -0700 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-12 17:54:11 +0200 |
commit | 25ef58fe185f1534d9d89aee72e84c3789068907 (patch) | |
tree | 42d7e60ce004235b8b65884e2b453c29017eef8e /src/corelib/io/qprocess_p.h | |
parent | 0f6b3a01e4c6fc7e4c2603b3dfcf3c0f81090ba9 (diff) |
QProcessPrivate: merge the functions dealing with stdout and stderr
Simplifies the code.
Change-Id: I4b3a6e725eb245d3531d1d11d959fb3b85862778
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Diffstat (limited to 'src/corelib/io/qprocess_p.h')
-rw-r--r-- | src/corelib/io/qprocess_p.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h index c491c57abc..6cd9047c04 100644 --- a/src/corelib/io/qprocess_p.h +++ b/src/corelib/io/qprocess_p.h @@ -329,6 +329,7 @@ public: bool openChannel(Channel &channel); void closeChannel(Channel *channel); void closeWriteChannel(); + bool tryReadFromChannel(Channel *channel); // obviously, only stdout and stderr QString program; QStringList arguments; @@ -386,10 +387,8 @@ public: bool waitForFinished(int msecs = 30000); bool waitForWrite(int msecs = 30000); - qint64 bytesAvailableFromStdout() const; - qint64 bytesAvailableFromStderr() const; - qint64 readFromStdout(char *data, qint64 maxlen); - qint64 readFromStderr(char *data, qint64 maxlen); + qint64 bytesAvailableInChannel(const Channel *channel) const; + qint64 readFromChannel(const Channel *channel, char *data, qint64 maxlen); qint64 writeToStdin(const char *data, qint64 maxlen); void cleanup(); |