mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
update deprecated methods in qt5.14 and protobuf 3.4 (#3906)
This commit is contained in:
parent
361833e023
commit
a80c756dcb
11 changed files with 74 additions and 37 deletions
|
|
@ -1553,7 +1553,11 @@ void TcpServerSocketInterface::flushOutputQueue()
|
|||
locker.unlock();
|
||||
|
||||
QByteArray buf;
|
||||
#if GOOGLE_PROTOBUF_VERSION > 3001000
|
||||
unsigned int size = item.ByteSizeLong();
|
||||
#else
|
||||
unsigned int size = item.ByteSize();
|
||||
#endif
|
||||
buf.resize(size + 4);
|
||||
item.SerializeToArray(buf.data() + 4, size);
|
||||
buf.data()[3] = (unsigned char)size;
|
||||
|
|
@ -1747,7 +1751,11 @@ void WebsocketServerSocketInterface::flushOutputQueue()
|
|||
locker.unlock();
|
||||
|
||||
QByteArray buf;
|
||||
#if GOOGLE_PROTOBUF_VERSION > 3001000
|
||||
unsigned int size = item.ByteSizeLong();
|
||||
#else
|
||||
unsigned int size = item.ByteSize();
|
||||
#endif
|
||||
buf.resize(size);
|
||||
item.SerializeToArray(buf.data(), size);
|
||||
// In case socket->write() calls catchSocketError(), the mutex must not be locked during this call.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue