Commit f7b93de6 authored by Daniel Vrátil's avatar Daniel Vrátil
Browse files

Properly declare CompressionStream as a sequential device

parent a0d615cb
......@@ -145,6 +145,7 @@ private Q_SLOTS:
QVERIFY(buffer.open(QIODevice::ReadOnly));
QCOMPARE(CompressionStream::isCompressed(&buffer), isValid);
QCOMPARE(buffer.pos(), 0);
}
};
......
......@@ -137,6 +137,11 @@ CompressionStream::~CompressionStream()
CompressionStream::close();
}
bool CompressionStream::isSequential() const
{
return true;
}
bool CompressionStream::open(OpenMode mode)
{
if ((mode & QIODevice::ReadOnly) && (mode & QIODevice::WriteOnly)) {
......
......@@ -29,6 +29,8 @@ public:
void close() override;
bool atEnd() const override;
bool isSequential() const override;
std::error_code error() const;
static bool isCompressed(QIODevice *data);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment