summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qiodevice_p.h
diff options
context:
space:
mode:
authorAlex Trotsenko <alex1973tr@gmail.com>2021-05-07 18:16:17 +0300
committerAlex Trotsenko <alex1973tr@gmail.com>2021-06-09 20:29:04 +0300
commit5b78d7fdcf9b758f117eaa65dc5eeddd0d4557e0 (patch)
tree8461b6d21a8c146a5e9e10d5d51385e1d790abff /src/corelib/io/qiodevice_p.h
parentc6c6e01e893b211f51511929b4258f789cdfd428 (diff)
QLocalSocket/Win: avoid double buffering on write
As QWindowsPipeWriter now maintains a chunk queue, there is no need to use the internal QIODevice buffer and wait for the previous operation to complete. Change-Id: Id4d54edfe920aeb4a534980cb0cc85a56c067a70 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Diffstat (limited to 'src/corelib/io/qiodevice_p.h')
-rw-r--r--src/corelib/io/qiodevice_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h
index 3f8e459d88..3639418bbc 100644
--- a/src/corelib/io/qiodevice_p.h
+++ b/src/corelib/io/qiodevice_p.h
@@ -185,6 +185,13 @@ public:
qint64 skipByReading(qint64 maxSize);
void write(const char *data, qint64 size);
+ inline bool isWriteChunkCached(const char *data, qint64 size) const
+ {
+ return currentWriteChunk != nullptr
+ && currentWriteChunk->constData() == data
+ && currentWriteChunk->size() == size;
+ }
+
#ifdef QT_NO_QOBJECT
QIODevice *q_ptr = nullptr;
#endif