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

Method swapBackingFileArchive

core/document.cpp:5051–5070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5049}
5050
5051bool Document::swapBackingFileArchive(const QString &newFileName, const QUrl &url)
5052{
5053 qCDebug(OkularCoreDebug) << "Swapping backing archive to" << newFileName;
5054
5055 ArchiveData *newArchive = DocumentPrivate::unpackDocumentArchive(newFileName);
5056 if (!newArchive) {
5057 return false;
5058 }
5059
5060 const QString tempFileName = newArchive->document.fileName();
5061
5062 const bool success = swapBackingFile(tempFileName, url);
5063
5064 if (success) {
5065 delete d->m_archiveData;
5066 d->m_archiveData = newArchive;
5067 }
5068
5069 return success;
5070}
5071
5072void Document::setHistoryClean(bool clean)
5073{

Callers 1

doOpenFileMethod · 0.80

Calls 1

fileNameMethod · 0.45

Tested by

no test coverage detected