Files
RedBear-OS/local/recipes/kde/kf6-karchive/source/autotests/kcompressiondevicetest.h
T
2026-04-14 10:51:06 +01:00

51 lines
1.2 KiB
C++

/* This file is part of the KDE project
SPDX-FileCopyrightText: 2015 Luiz Romário Santana Rios <luizromario@gmail.com>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#ifndef KCOMPRESSIONDEVICETEST_H
#define KCOMPRESSIONDEVICETEST_H
#include <QNetworkAccessManager>
#include <QObject>
#include <memory>
#include <KCompressionDevice>
#include <KTar>
class QNetworkReply;
class KCompressionDeviceTest : public QObject
{
Q_OBJECT
private:
QNetworkReply *getArchive(const QString &extension);
QString formatExtension(KCompressionDevice::CompressionType type) const;
void setDeviceToArchive(QIODevice *d, KCompressionDevice::CompressionType type);
void testBufferedDevice(KCompressionDevice::CompressionType type);
void testExtraction();
QNetworkAccessManager qnam;
std::unique_ptr<KCompressionDevice> device;
std::unique_ptr<KTar> archive;
private Q_SLOTS:
void regularKTarUsage();
void testGZipBufferedDevice();
void testBZip2BufferedDevice();
void testXzBufferedDevice();
void testZstdBufferedDevice();
void testWriteErrorOnOpen();
void testWriteErrorOnClose();
void testSeekReadUncompressedBuffer_data();
void testSeekReadUncompressedBuffer();
};
#endif