From 58bd015ddff84c6bd0b5dcff54b9512e188f346c Mon Sep 17 00:00:00 2001 From: Louai Al-Khanji Date: Thu, 4 Feb 2016 17:46:50 -0800 Subject: [PATCH] QProcess: Remove dead code These functions appear to have been dead code always - even in the earliest Qt4 releases! Change-Id: Ie2a458092b45113782284cf8ed3aa11a018b60d4 Reviewed-by: Thiago Macieira --- src/corelib/io/qprocess_p.h | 1 - src/corelib/io/qprocess_unix.cpp | 6 ------ src/corelib/io/qprocess_win.cpp | 9 --------- src/corelib/io/qprocess_wince.cpp | 6 ------ 4 files changed, 22 deletions(-) diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h index 0c501aecd8c..043a44df81c 100644 --- a/src/corelib/io/qprocess_p.h +++ b/src/corelib/io/qprocess_p.h @@ -381,7 +381,6 @@ public: bool waitForReadyRead(int msecs = 30000); bool waitForBytesWritten(int msecs = 30000); bool waitForFinished(int msecs = 30000); - bool waitForWrite(int msecs = 30000); qint64 bytesAvailableInChannel(const Channel *channel) const; qint64 readFromChannel(const Channel *channel, char *data, qint64 maxlen); diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp index a6900544be5..f9d14c8e5a6 100644 --- a/src/corelib/io/qprocess_unix.cpp +++ b/src/corelib/io/qprocess_unix.cpp @@ -1034,12 +1034,6 @@ bool QProcessPrivate::waitForFinished(int msecs) return false; } -bool QProcessPrivate::waitForWrite(int msecs) -{ - pollfd pfd = qt_make_pollfd(stdinChannel.pipe[1], POLLOUT); - return qt_poll_msecs(&pfd, 1, msecs < 0 ? 0 : msecs) == 1; -} - void QProcessPrivate::findExitCode() { } diff --git a/src/corelib/io/qprocess_win.cpp b/src/corelib/io/qprocess_win.cpp index cf0536c2ded..611ce34550f 100644 --- a/src/corelib/io/qprocess_win.cpp +++ b/src/corelib/io/qprocess_win.cpp @@ -819,15 +819,6 @@ qint64 QProcessPrivate::writeToStdin(const char *data, qint64 maxlen) return stdinChannel.writer->write(data, maxlen); } -bool QProcessPrivate::waitForWrite(int msecs) -{ - if (!stdinChannel.writer || stdinChannel.writer->waitForWrite(msecs)) - return true; - - setError(QProcess::Timedout); - return false; -} - bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDir, qint64 *pid) { QString args = qt_create_commandline(program, arguments); diff --git a/src/corelib/io/qprocess_wince.cpp b/src/corelib/io/qprocess_wince.cpp index c859a740d5c..564b3f520d0 100644 --- a/src/corelib/io/qprocess_wince.cpp +++ b/src/corelib/io/qprocess_wince.cpp @@ -278,12 +278,6 @@ qint64 QProcessPrivate::writeToStdin(const char *data, qint64 maxlen) return -1; } -bool QProcessPrivate::waitForWrite(int msecs) -{ - Q_UNUSED(msecs); - return false; -} - bool QProcessPrivate::startDetached(const QString &program, const QStringList &arguments, const QString &workingDir, qint64 *pid) { Q_UNUSED(workingDir);