for (int i = 0; i < chapters.size(); i++) {
QString id = chapters[i];
QString href = content[id].href;
- QString baseRef(href);
- QUrl url(QString("file://") + href);
- if (url.hasFragment()) {
- QString fragment = url.fragment();
- baseRef.chop(fragment.length() + 1);
+ int hashPos = href.indexOf("#");
+ if (hashPos != -1) {
+ href = href.left(hashPos);
}
- if (baseRef == partHref) {
+ if (href == partHref) {
ret = i;
// Don't break, keep looking
}
}
+ qDebug() << "Part" << index << partId << partHref << ":" << ret;
return ret;
}
contentItem.size = 0;
book.content[id] = contentItem;
book.chapters.append(id);
+ qDebug() << "TreeItem::addToBook" << id << contentItem.href
+ << contentItem.name;
foreach (TreeItem *child, children) {
child->addToBook(book);
}
* Have an overlap between current/next page
* Add tool bars to list windows on Symbian
* Fix author name in libary and book info
+ * Improve identification of bookmark's chapter
-- Akos Polster <akos@pipacs.com> Sun, 5 Dec 2010 02:00:00 +0100