Manga (CBZ) Support

This commit is contained in:
Agel committed 2026-05-12 16:37:03 +02:00
1 parent 20dfdb3745
commit 9167f10b1c
12 files changed
+937 -17

No files matched your search

+10
View File
@@ -3,12 +3,14 @@
#include "backend/FormatReader.h"
#include "backend/formats/TxtReader.h"
#include "backend/formats/EpubReader.h"
#include "backend/formats/CbzReader.h"
static ReaderFactory makeFactory()
{
return ReaderFactory({
[] { return std::make_unique<TxtReader>(); },
[] { return std::make_unique<EpubReader>(); },
[] { return std::make_unique<CbzReader>(); },
});
}
@@ -51,12 +53,20 @@ private slots:
QVERIFY(reader == nullptr);
}
void createCbzReader()
{
auto factory = makeFactory();
auto reader = factory.create("file.cbz");
QVERIFY(reader != nullptr);
}
void supportedExtensions()
{
auto factory = makeFactory();
const QStringList exts = factory.supportedExtensions();
QVERIFY(exts.contains(QStringLiteral("txt")));
QVERIFY(exts.contains(QStringLiteral("epub")));
QVERIFY(exts.contains(QStringLiteral("cbz")));
}
};