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:
25ae7ee
)
call QByteArray::append() overload from QByteArray::append()
author
Ivailo Monev
<xakepa10@gmail.com>
Fri, 26 Mar 2021 13:37:04 +0000
(15:37 +0200)
committer
Ivailo Monev
<xakepa10@gmail.com>
Fri, 26 Mar 2021 13:37:04 +0000
(15:37 +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
a96df10
..
466d500
100644
(file)
--- a/
src/core/tools/qbytearray.cpp
+++ b/
src/core/tools/qbytearray.cpp
@@
-1643,14
+1643,7
@@
QByteArray &QByteArray::append(const QByteArray &ba)
QByteArray& QByteArray::append(const char *str)
{
- if (str) {
- int len = qstrlen(str);
- if (d->ref != 1 || d->size + len > d->alloc)
- reallocData(qAllocMore(d->size + len, sizeof(Data)));
- memcpy(d->data + d->size, str, len + 1); // include null terminator
- d->size += len;
- }
- return *this;
+ return append(str, qstrlen(str));
}
/*!