From 3605fc653b3f54c9cda59fb3bf29b97d85ae0737 Mon Sep 17 00:00:00 2001 From: Alex Trotsenko Date: Wed, 13 Jul 2016 15:39:38 +0300 Subject: QRingBuffer: allow to change the chunk size of the buffer dynamically Change-Id: I0ac55713c7bb8c48d2c9c774376543caef781980 Reviewed-by: Oswald Buddenhagen Reviewed-by: Thiago Macieira --- src/corelib/io/qiodevice_p.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/corelib/io/qiodevice_p.h') diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h index d264bfd31d..eed98a8fe3 100644 --- a/src/corelib/io/qiodevice_p.h +++ b/src/corelib/io/qiodevice_p.h @@ -92,6 +92,8 @@ public: friend class QIODevicePrivate; public: // wrap functions from QRingBuffer + inline void setChunkSize(int size) { Q_ASSERT(m_buf); m_buf->setChunkSize(size); } + inline int chunkSize() const { Q_ASSERT(m_buf); return m_buf->chunkSize(); } inline qint64 nextDataBlockSize() const { return (m_buf ? m_buf->nextDataBlockSize() : Q_INT64_C(0)); } inline const char *readPointer() const { return (m_buf ? m_buf->readPointer() : Q_NULLPTR); } inline const char *readPointerAtPosition(qint64 pos, qint64 &length) const { Q_ASSERT(m_buf); return m_buf->readPointerAtPosition(pos, length); } -- cgit v1.2.3