summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools/qringbuffer_p.h
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2015-07-22 10:56:06 +0300
committerAlex Trotsenko <alex1973tr@gmail.com>2016-01-29 09:14:44 +0000
commit7ff655360f1bebb657a7c035211058b340bf9f57 (patch)
tree08911a78216b58022c53aff4d232049e5a1dd803 /src/corelib/tools/qringbuffer_p.h
parent8f92baf5c946a93430e73adc79b4435060840777 (diff)
Integrate QProcess into QIODevice's multistreaming infrastructure
As a result, this patch eliminates double-buffering in QProcess. Change-Id: I436faa4a5ffc28ce77f959dd6089bef400ac39f6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'src/corelib/tools/qringbuffer_p.h')
-rw-r--r--src/corelib/tools/qringbuffer_p.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/corelib/tools/qringbuffer_p.h b/src/corelib/tools/qringbuffer_p.h
index 3b6d56e7ba..b1d4401de3 100644
--- a/src/corelib/tools/qringbuffer_p.h
+++ b/src/corelib/tools/qringbuffer_p.h
@@ -56,10 +56,14 @@
QT_BEGIN_NAMESPACE
+#ifndef QRINGBUFFER_CHUNKSIZE
+#define QRINGBUFFER_CHUNKSIZE 4096
+#endif
+
class QRingBuffer
{
public:
- explicit inline QRingBuffer(int growth = 4096) :
+ explicit inline QRingBuffer(int growth = QRINGBUFFER_CHUNKSIZE) :
head(0), tail(0), tailBuffer(0), basicBlockSize(growth), bufferSize(0) { }
inline qint64 nextDataBlockSize() const {