OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4f9e7b
)
optimize QByteArray streaming
author
Ivailo Monev
<xakepa10@gmail.com>
Mon, 21 Mar 2022 10:47:53 +0000
(12:47 +0200)
committer
Ivailo Monev
<xakepa10@gmail.com>
Mon, 21 Mar 2022 10:47:53 +0000
(12:47 +0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/core/tools/qbytearray.cpp
patch
|
blob
|
history
diff --git
a/src/core/tools/qbytearray.cpp
b/src/core/tools/qbytearray.cpp
index
1c6ccd2
..
06e7bdd
100644
(file)
--- a/
src/core/tools/qbytearray.cpp
+++ b/
src/core/tools/qbytearray.cpp
@@
-2533,11
+2533,12
@@
QDataStream &operator<<(QDataStream &out, const QByteArray &ba)
QDataStream &operator>>(QDataStream &in, QByteArray &ba)
{
- ba.clear();
quint32 len;
in >> len;
- if (len == 0xffffffff)
+ if (len == 0xffffffff) {
+ ba.clear();
return in;
+ }
ba.resize(len);
const quint32 readlen = in.readRawData(ba.data(), len);