mirror of https://github.com/qt/qtgrpc.git
Port to QByteArray::max_size()
Remove the usage of the private MaxByteArraySize constant. Change-Id: I334aaba0a93dadc9f88cf5355830e7b1880faaea Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
This commit is contained in:
parent
93a3c6b5ae
commit
5c2c831703
|
|
@ -21,7 +21,6 @@
|
|||
#include <QtCore/qbytearray.h>
|
||||
#include <QtCore/qhash.h>
|
||||
#include <QtCore/qvariant.h>
|
||||
#include <QtCore/private/qbytearray_p.h>
|
||||
|
||||
#include <QtProtobuf/private/qprotobufselfcheckiterator_p.h>
|
||||
#include <QtProtobuf/private/qtprotobuflogging_p.h>
|
||||
|
|
@ -455,7 +454,7 @@ public:
|
|||
if (!opt)
|
||||
return std::nullopt;
|
||||
quint64 length = opt.value();
|
||||
if (!it.isValid() || quint64(it.bytesLeft()) < length || length > quint64(MaxByteArraySize))
|
||||
if (!it.isValid() || quint64(it.bytesLeft()) < length || length > quint64(QByteArray::max_size()))
|
||||
return std::nullopt;
|
||||
QByteArray result(it.data(), qsizetype(length));
|
||||
it += length;
|
||||
|
|
|
|||
Loading…
Reference in New Issue