QNativeSocketEngine: disable unused methods about OS socket buffer

They aren't used in the API, so let's stop wasting library size.

Change-Id: I6e9274c1e7444ad48c81fffd14db247ecf825a57
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
bb10
Thiago Macieira 2017-08-15 15:10:27 -07:00
parent ca92ee2518
commit b5d471d0c2
3 changed files with 8 additions and 1 deletions

View File

@ -1162,6 +1162,7 @@ bool QNativeSocketEngine::waitForReadOrWrite(bool *readyToRead, bool *readyToWri
return ret > 0;
}
#if 0 // currently unused
/*!
Returns the size of the operating system's socket receive
buffer. Depending on the operating system, this size may be
@ -1220,7 +1221,7 @@ void QNativeSocketEngine::setSendBufferSize(qint64 size)
Q_CHECK_VALID_SOCKETLAYER(QNativeSocketEngine::setSendBufferSize(), Q_VOID);
setOption(SendBufferSocketOption, size);
}
#endif
/*!
Sets the option \a option to the value \a value.

View File

@ -166,11 +166,13 @@ public:
qint64 writeDatagram(const char *data, qint64 len, const QIpPacketHeader &) Q_DECL_OVERRIDE;
qint64 bytesToWrite() const Q_DECL_OVERRIDE;
#if 0 // currently unused
qint64 receiveBufferSize() const;
void setReceiveBufferSize(qint64 bufferSize);
qint64 sendBufferSize() const;
void setSendBufferSize(qint64 bufferSize);
#endif
int option(SocketOption option) const Q_DECL_OVERRIDE;
bool setOption(SocketOption option, int value) Q_DECL_OVERRIDE;

View File

@ -76,7 +76,9 @@ private slots:
void serverTest();
void udpLoopbackPerformance();
void tcpLoopbackPerformance();
#if 0
void readWriteBufferSize();
#endif
void bind();
void networkError();
void setSocketDescriptor();
@ -485,6 +487,7 @@ void tst_PlatformSocketEngine::tcpLoopbackPerformance()
(readBytes / (timer.elapsed() / 1000.0)) / (1024 * 1024));
}
#if 0 // unused
//---------------------------------------------------------------------------
void tst_PlatformSocketEngine::readWriteBufferSize()
{
@ -503,6 +506,7 @@ void tst_PlatformSocketEngine::readWriteBufferSize()
QVERIFY(device.sendBufferSize() > bufferSize);
}
#endif
//---------------------------------------------------------------------------
void tst_PlatformSocketEngine::tooManySockets()