summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qiodevice_p.h
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2016-01-29 12:46:13 +0200
committerAlex Trotsenko <alex1973tr@gmail.com>2016-02-01 20:45:21 +0000
commit57ca755d2efbdb7268e8014cb4c50c9ea1c65bfc (patch)
treeff8459ea7129c501526b7c58cbecde50d6d9f857 /src/corelib/io/qiodevice_p.h
parent9fb5ff56c35177502791f1e979b2eca1881a70e5 (diff)
QRingBuffer: add append(const char *, qint64) function
This allows to remove a code duplication in several places. Change-Id: I49f56e951682dbd2968923654a12cba5199a2502 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib/io/qiodevice_p.h')
-rw-r--r--src/corelib/io/qiodevice_p.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h
index f2fd0ca069..d264bfd31d 100644
--- a/src/corelib/io/qiodevice_p.h
+++ b/src/corelib/io/qiodevice_p.h
@@ -111,6 +111,7 @@ public:
inline qint64 read(char *data, qint64 maxLength) { return (m_buf ? m_buf->read(data, maxLength) : Q_INT64_C(0)); }
inline QByteArray read() { return (m_buf ? m_buf->read() : QByteArray()); }
inline qint64 peek(char *data, qint64 maxLength, qint64 pos = 0) const { return (m_buf ? m_buf->peek(data, maxLength, pos) : Q_INT64_C(0)); }
+ inline void append(const char *data, qint64 size) { Q_ASSERT(m_buf); m_buf->append(data, size); }
inline void append(const QByteArray &qba) { Q_ASSERT(m_buf); m_buf->append(qba); }
inline qint64 skip(qint64 length) { return (m_buf ? m_buf->skip(length) : Q_INT64_C(0)); }
inline qint64 readLine(char *data, qint64 maxLength) { return (m_buf ? m_buf->readLine(data, maxLength) : Q_INT64_C(-1)); }