Details
-
Suggestion
-
Resolution: Duplicate
-
P3: Somewhat important
-
None
-
None
-
None
Description
the c++20 way to work with binary data is to use std::span<std::byte> or std::span<const std::byte> (via as_bytes / as_writable_bytes), so they are a good fit for QIODevice interface.
QTBUG-126574 had added support for readLineInto, but QIODevice could also provide overloads for read/write:
```
qint64 write(QSpan<const std::byte>); // equivalent to write(const char *data, qint64 len);
qint64 read(QSpan<std::byte>); // equivalent to read(char *data, qint64 maxlen);
qint64 peek(QSpan<std::byte>); // equivalent to peek(char *data, qint64 maxlen);
```
Attachments
Issue Links
- is covered by
-
QTBUG-131528 Add Scatter-Gather support to selected APIs (QIODevice)
-
- Open
-