Changeset View
Changeset View
Standalone View
Standalone View
mobile/components/documentitem.cpp
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Line(s) | |||||
54 | } | 54 | } | ||
55 | 55 | | |||
56 | void DocumentItem::setUrl(const QUrl & url) | 56 | void DocumentItem::setUrl(const QUrl & url) | ||
57 | { | 57 | { | ||
58 | m_document->closeDocument(); | 58 | m_document->closeDocument(); | ||
59 | //TODO: password | 59 | //TODO: password | ||
60 | QMimeDatabase db; | 60 | QMimeDatabase db; | ||
61 | 61 | | |||
62 | const QString path = url.isLocalFile() ? url.toLocalFile() : QLatin1String("-"); | 62 | const QString path = url.isLocalFile() ? url.toLocalFile() : QStringLiteral("-"); | ||
63 | 63 | | |||
64 | m_document->openDocument(path, url, db.mimeTypeForUrl(url)); | 64 | m_document->openDocument(path, url, db.mimeTypeForUrl(url)); | ||
65 | 65 | | |||
66 | m_tocModel->clear(); | 66 | m_tocModel->clear(); | ||
67 | m_tocModel->fill(m_document->documentSynopsis()); | 67 | m_tocModel->fill(m_document->documentSynopsis()); | ||
68 | m_tocModel->setCurrentViewport(m_document->viewport()); | 68 | m_tocModel->setCurrentViewport(m_document->viewport()); | ||
69 | 69 | | |||
70 | m_matchingPages.clear(); | 70 | m_matchingPages.clear(); | ||
▲ Show 20 Lines • Show All 199 Lines • Show Last 20 Lines |