QLocalSocket/Win: Use QIODevice's internal write buffer
Remove the extra write buffer from QLocalSocketPrivate and use QIODevice's new internal write buffer. Change-Id: I4297774ee89da2df59782adae8b804296e7f3301 Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
1675d9a1b2
commit
082ee835b0
@ -61,7 +61,6 @@
|
||||
#if defined(QT_LOCALSOCKET_TCP)
|
||||
# include "qtcpsocket.h"
|
||||
#elif defined(Q_OS_WIN)
|
||||
# include <private/qringbuffer_p.h>
|
||||
# include "private/qwindowspipereader_p.h"
|
||||
# include "private/qwindowspipewriter_p.h"
|
||||
# include <qwineventnotifier.h>
|
||||
@ -134,7 +133,6 @@ public:
|
||||
void _q_pipeClosed();
|
||||
void _q_winError(ulong windowsError, const QString &function);
|
||||
HANDLE handle;
|
||||
QRingBuffer writeBuffer;
|
||||
QWindowsPipeWriter *pipeWriter;
|
||||
QWindowsPipeReader *pipeReader;
|
||||
QLocalSocket::LocalSocketError error;
|
||||
|
@ -107,6 +107,7 @@ QLocalSocketPrivate::QLocalSocketPrivate() : QIODevicePrivate(),
|
||||
error(QLocalSocket::UnknownSocketError),
|
||||
state(QLocalSocket::UnconnectedState)
|
||||
{
|
||||
writeBufferChunkSize = QIODEVICE_BUFFERSIZE;
|
||||
}
|
||||
|
||||
QLocalSocketPrivate::~QLocalSocketPrivate()
|
||||
@ -232,7 +233,6 @@ void QLocalSocket::abort()
|
||||
if (d->pipeWriter) {
|
||||
delete d->pipeWriter;
|
||||
d->pipeWriter = 0;
|
||||
d->writeBuffer.clear();
|
||||
}
|
||||
close();
|
||||
}
|
||||
@ -290,6 +290,7 @@ void QLocalSocket::close()
|
||||
if (openMode() == NotOpen)
|
||||
return;
|
||||
|
||||
d->setWriteChannelCount(0);
|
||||
QIODevice::close();
|
||||
d->serverName = QString();
|
||||
d->fullServerName = QString();
|
||||
|
Loading…
x
Reference in New Issue
Block a user