summaryrefslogtreecommitdiffstats
path: root/src/corelib/text/qbytearraylist.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/corelib/text/qbytearraylist.cpp')
-rw-r--r--src/corelib/text/qbytearraylist.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/text/qbytearraylist.cpp b/src/corelib/text/qbytearraylist.cpp
index 44a0f6be95..cd77cd905a 100644
--- a/src/corelib/text/qbytearraylist.cpp
+++ b/src/corelib/text/qbytearraylist.cpp
@@ -144,15 +144,15 @@ static qsizetype QByteArrayList_joinedSize(const QByteArrayList *that, qsizetype
return totalLength;
}
-QByteArray QtPrivate::QByteArrayList_join(const QByteArrayList *that, const char *sep, int seplen)
+QByteArray QtPrivate::QByteArrayList_join(const QByteArrayList *that, QByteArrayView sep)
{
QByteArray res;
- if (const qsizetype joinedSize = QByteArrayList_joinedSize(that, seplen))
+ if (const qsizetype joinedSize = QByteArrayList_joinedSize(that, sep.size()))
res.reserve(joinedSize); // don't call reserve(0) - it allocates one byte for the NUL
const qsizetype size = that->size();
for (qsizetype i = 0; i < size; ++i) {
if (i)
- res.append(sep, seplen);
+ res.append(sep);
res += that->at(i);
}
return res;