diff options
| author | Rym Bouabid <rym.bouabid@qt.io> | 2024-10-30 09:23:33 +0100 |
|---|---|---|
| committer | Marc Mutz <marc.mutz@qt.io> | 2024-12-02 16:43:50 +0000 |
| commit | c39c3fe0cb104563c1baf0d474cc83bffd503b23 (patch) | |
| tree | da6357afe8f83a504208240c41f010b2df9fd605 /src/gui/doc/snippets/textdocument-css | |
| parent | e23dc7c420297fb62db9834a17c59bbf5992dad7 (diff) | |
QIODevice: Add overloads of QIODevice::readLineInto() that takes QSpan
The existing QIODevice::readLineInto takes a QByteArray *, so it's
dependent on a QByteArray and therefore needs at least one (initial)
allocation.
Add QIODevice::readLineInto() that takes a QSpan, allowing the user to
provide a buffer to write into and returns a QByteArrayView.
QBAV and QSpan are not null terminated. Make null termination optional
when reading using QIODevicePrivate::readLine(). Extend the function to
accept a ReadLineOption enum parameter with a default value of
"NullTerminated" to preserve old calls. Do the same to
QRingBufferRef::readLine().
Add QRingBuffer::readLineWithoutTerminatingNull().
[ChangeLog][QtCore][QIODevice] Added overloads of
QIODevice::readLineInto() taking QSpan and returnig a QByteArrayView.
Task-number: QTBUG-126574
Change-Id: I278a42cef4c9aa64ed884027f79105b5b7d44813
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/gui/doc/snippets/textdocument-css')
0 files changed, 0 insertions, 0 deletions
