| 5049 | } |
| 5050 | |
| 5051 | bool 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 | |
| 5072 | void Document::setHistoryClean(bool clean) |
| 5073 | { |