old render cleanup part 2

This commit is contained in:
Agel committed 2026-10-25 15:10:38 +01:00
1 parent acc7e71e7b
commit cef762c3ee
40 files changed
+329 -3643

No files matched your search

+9 -15
View File
@@ -42,9 +42,7 @@ private slots:
FolderReader reader;
QVERIFY(reader.open(tmp.path()));
QCOMPARE(reader.chapterCount(), 1);
const Chapter ch = reader.loadChapter(0);
QCOMPARE(ch.contentChunks.size(), 3);
QCOMPARE(reader.pages().size(), 3);
}
void sortOrderAlphabetical()
@@ -57,12 +55,11 @@ private slots:
FolderReader reader;
QVERIFY(reader.open(tmp.path()));
const Chapter ch = reader.loadChapter(0);
QCOMPARE(ch.contentChunks.size(), 3);
// Chunks contain the entry name — check alphabetical order
QVERIFY(ch.contentChunks.at(0).contains(QStringLiteral("a.png")));
QVERIFY(ch.contentChunks.at(1).contains(QStringLiteral("b.png")));
QVERIFY(ch.contentChunks.at(2).contains(QStringLiteral("c.png")));
const auto pages = reader.pages();
QCOMPARE(pages.size(), 3);
QVERIFY(pages.at(0).imageUrl.contains(QStringLiteral("a.png")));
QVERIFY(pages.at(1).imageUrl.contains(QStringLiteral("b.png")));
QVERIFY(pages.at(2).imageUrl.contains(QStringLiteral("c.png")));
}
void coverIsFirstImage()
@@ -103,12 +100,10 @@ private slots:
QCOMPARE(ra.contentHash(), rb.contentHash());
}
void fileTypeAndRenderingMode()
void fileType()
{
FolderReader reader;
QCOMPARE(reader.fileType(), QStringLiteral("folder"));
QCOMPARE(static_cast<int>(reader.preferredRenderingMode()),
static_cast<int>(FormatReader::RenderingMode::Manga));
}
void nonImageFilesIgnored()
@@ -124,8 +119,7 @@ private slots:
FolderReader reader;
QVERIFY(reader.open(tmp.path()));
QCOMPARE(reader.chapterCount(), 1);
QCOMPARE(reader.loadChapter(0).contentChunks.size(), 1);
QCOMPARE(reader.pages().size(), 1);
}
void dotFilesIgnored()
@@ -137,7 +131,7 @@ private slots:
FolderReader reader;
QVERIFY(reader.open(tmp.path()));
QCOMPARE(reader.loadChapter(0).contentChunks.size(), 1);
QCOMPARE(reader.pages().size(), 1);
}
};