Details
-
Suggestion
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
-
None
-
3
-
Foundation Sprint 69, Foundation Sprint 70, Foundation Sprint 71, Foundation Sprint 110, Foundation Sprint 111, Foundation Sprint 112, Foundation Sprint 113, Foundation Sprint 114, Foundation Sprint 115
Description
QIODevice now has readLineInto(QByteArray *, qint64), but that is still dependent on a QByteArray and therefore needs at least one (initial) allocation.
In many cases, a static or automatic buffer would be sufficient, such as a C array or a QVLA. For these callers, we should also have an overload of the QCryptographicHash::hashInto form:
QByteArrayView QIODevice::readLineInto(QSpan<std::bytes> buffer); // + char and uchar overloads delegating to this
cf. https://doc-snapshots.qt.io/qt6-dev/qcryptographichash.html#hashInto-3
Doesn't need the maxSize parameter, as that would be the same as buffer.size().
Could even have readInto() (non-Line) in the same style.
Attachments
Issue Links
- depends on
-
QTBUG-103108 QIODevice is missing QTextStream-line readLineInto()
-
- In Progress
-
- relates to
-
QTBUG-45190 Add QTextStream::read|readAll|readLine(QString *) overloads to reuse QString's capacity
-
- Open
-