parseBookmarkKey restituisce QVariantMap (i puntatori int* non sono marshallabili da QML — il segno non si ripristinava mai)

This commit is contained in:
2026-08-12 17:26:15 +02:00
parent cbe4153881
commit d230d543dd
3 changed files with 17 additions and 12 deletions
+8 -3
View File
@@ -259,10 +259,15 @@ Page {
var key = appSettings.bookmarkKey(page.bookId, page.bookFormat)
var ch = 0
var fr = 0.0
if (key.length > 0 && book.parseBookmarkKey(key, ch, fr)) {
page.currentChapter = Math.max(0, Math.min(ch, book.chapterCount - 1))
page.chapterFraction = fr
if (key.length > 0) {
var r = book.parseBookmarkKey(key)
if (r && r.hasOwnProperty("chapter")) {
ch = Math.max(0, Math.min(r.chapter, book.chapterCount - 1))
fr = r.fraction
}
}
page.currentChapter = ch
page.chapterFraction = fr
loadChapter()
}