4#ifndef QSEQUENTIALFILEADAPTOR_P
5#define QSEQUENTIALFILEADAPTOR_P
18#include <QtCore/qfile.h>
22 template <
typename... Args>
27 bool open(QIODeviceBase::OpenMode mode)
override
29 QIODevice::open(mode);
30 return m_file.open(mode);
39 qint64 pos()
const override {
return m_file.pos(); }
41 bool seek(qint64 pos)
override {
return m_file.seek(pos); }
49 qint64 readData(
char *data, qint64 maxlen)
override {
return m_file.read(data, maxlen); }
50 qint64 writeData(
const char *data, qint64 len)
override {
return m_file.write(data, len); }
qint64 readData(char *data, qint64 maxlen) override
Reads up to maxSize bytes from the device into data, and returns the number of bytes read or -1 if an...
bool seek(qint64 pos) override
For random-access devices, this function sets the current position to pos, returning true on success,...
bool atEnd() const override
Returns true if the current read and write position is at the end of the device (i....
qint64 writeData(const char *data, qint64 len) override
Writes up to maxSize bytes from data to the device.
qint64 bytesAvailable() const override
Returns the number of bytes that are available for reading.
bool reset() override
Seeks to the start of input for random-access devices.
void close() override
First emits aboutToClose(), then closes the device and sets its OpenMode to NotOpen.
bool open(QIODeviceBase::OpenMode mode) override
Opens the device and sets its OpenMode to mode.
qint64 pos() const override
For random-access devices, this function returns the position that data is written to or read from.
bool isSequential() const override
Returns true if this device is sequential; otherwise returns false.
qint64 size() const override
For open random-access devices, this function returns the size of the device.
QSequentialFileAdaptor(Args... args)