MCPcopy Create free account
hub / github.com/KDE/okular / openDocumentArchive

Method openDocumentArchive

core/document.cpp:5297–5315  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5295}
5296
5297Document::OpenResult Document::openDocumentArchive(const QString &docFile, const QUrl &url, const QString &password)
5298{
5299 d->m_archiveData = DocumentPrivate::unpackDocumentArchive(docFile);
5300 if (!d->m_archiveData) {
5301 return OpenError;
5302 }
5303
5304 const QString tempFileName = d->m_archiveData->document.fileName();
5305 QMimeDatabase db;
5306 const QMimeType docMime = db.mimeTypeForFile(tempFileName, QMimeDatabase::MatchExtension);
5307 const OpenResult ret = openDocument(tempFileName, url, docMime, password);
5308
5309 if (ret != OpenSuccess) {
5310 delete d->m_archiveData;
5311 d->m_archiveData = nullptr;
5312 }
5313
5314 return ret;
5315}
5316
5317bool Document::saveDocumentArchive(const QString &fileName)
5318{

Callers 1

doOpenFileMethod · 0.80

Calls 1

fileNameMethod · 0.45

Tested by

no test coverage detected