If you get a free moment, would you please test something for me. In NavProcessor in the constructor, would you please try removing the entire if (!valid) segment of code and see if simply ignoring the nav when broken for parsing is feasible.
Here are the lines to delete or ifdef out from NavProcessor.cpp
Code:
if (!valid) {
SettingsStore ss;
QString lang = ss.defaultMetadataLang();
QString newsource =
"<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
"<!DOCTYPE html>\n"
"<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:epub=\"http://www.idpf.org/2007/ops\" "
"lang=\"%1\" xml:lang=\"%2\">\n"
"<head>\n"
" <meta charset=\"utf-8\" />\n"
" <style type=\"text/css\">\n"
" nav#landmarks, nav#page-list { display:none; }\n"
" ol { list-style-type: none; }\n"
" </style>\n"
"</head>\n"
"<body epub:type=\"frontmatter\">\n"
" <nav epub:type=\"toc\" id=\"toc\">\n"
" </nav>\n"
" <nav epub:type=\"landmarks\" id=\"landmarks\" hidden=\"\">\n"
" </nav>\n"
"</body>\n"
"</html>";
newsource = newsource.arg(lang).arg(lang);
QWriteLocker locker(&m_NavResource->GetLock());
m_NavResource->SetText(newsource);
}
Does that help? Do you notice any strange behaviour? In BookBrowser if you mouseover or hover on a file that had been marked with semantics (existed in nav landmarks), what happens?
Thanks,
KevinH