diff options
Diffstat (limited to 'src/corelib/io/qiodevice.cpp')
-rw-r--r-- | src/corelib/io/qiodevice.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp index 94fb68450c..fbee1a223f 100644 --- a/src/corelib/io/qiodevice.cpp +++ b/src/corelib/io/qiodevice.cpp @@ -739,6 +739,18 @@ void QIODevicePrivate::setWriteChannelCount(int count) } /*! + \internal +*/ +bool QIODevicePrivate::allWriteBuffersEmpty() const +{ + for (const QRingBuffer &ringBuffer : writeBuffers) { + if (!ringBuffer.isEmpty()) + return false; + } + return true; +} + +/*! Opens the device and sets its OpenMode to \a mode. Returns \c true if successful; otherwise returns \c false. This function should be called from any reimplementations of open() or other functions that open the device. |