update deprecated methods in qt5.14 and protobuf 3.4 (#3906)

This commit is contained in:
ebbit1q 2020-03-17 01:41:41 +01:00 committed by GitHub
parent 361833e023
commit a80c756dcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 74 additions and 37 deletions

View file

@ -334,8 +334,11 @@ void RemoteClient::websocketMessageReceived(const QByteArray &message)
void RemoteClient::sendCommandContainer(const CommandContainer &cont)
{
auto size = static_cast<unsigned int>(cont.ByteSize());
#if GOOGLE_PROTOBUF_VERSION > 3001000
unsigned int size = cont.ByteSizeLong();
#else
unsigned int size = cont.ByteSize();
#endif
#ifdef QT_DEBUG
qDebug() << "OUT" << size << QString::fromStdString(cont.ShortDebugString());
#endif
@ -639,4 +642,4 @@ void RemoteClient::submitForgotPasswordChallengeResponse(const Response &respons
emit sigForgotPasswordError();
doDisconnectFromServer();
}
}