old render cleanup part 1
This commit is contained in:
38 files changed
+166
-1366
No files matched your search
+3
-13
@@ -207,24 +207,14 @@ private slots:
|
||||
ctx.book->openFromPath(path);
|
||||
QTRY_VERIFY_WITH_TIMEOUT(ctx.book->hasBook(), 5000);
|
||||
|
||||
ctx.book->saveCurrentPosition(3, 17);
|
||||
ctx.book->saveCurrentPosition(3, false, true);
|
||||
|
||||
const QByteArray hash = ctx.book->reader()->contentHash();
|
||||
QVERIFY(!hash.isEmpty());
|
||||
const BookPosition pos = ctx.store->load(hash);
|
||||
QCOMPARE(pos.chunkIndex, 3);
|
||||
QCOMPARE(pos.intraOffset, 17);
|
||||
}
|
||||
|
||||
void contentWidthSignal()
|
||||
{
|
||||
Ctx ctx;
|
||||
QSignalSpy spy(ctx.book, &Book::contentWidthChanged);
|
||||
ctx.book->setContentWidth(800);
|
||||
QCOMPARE(spy.count(), 1);
|
||||
QCOMPARE(spy.first().first().toInt(), 800);
|
||||
ctx.book->setContentWidth(800); // no-op
|
||||
QCOMPARE(spy.count(), 1);
|
||||
QCOMPARE(pos.mangaRTL, false);
|
||||
QCOMPARE(pos.pageShift, true);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user