mirror of
https://invent.kde.org/graphics/okular
synced 2024-10-05 23:49:20 +00:00
Fix regression due to more QTemporaryFile behaviour changes
Make sure we call fileName because otherwise things break
This commit is contained in:
parent
9c6494b353
commit
acd3c81e23
|
@ -2414,6 +2414,8 @@ Document::OpenResult Document::openDocument(const QString & docFile, const QUrl
|
|||
// 2. load Additional Data (bookmarks, local annotations and metadata) about the document
|
||||
if ( d->m_archiveData )
|
||||
{
|
||||
// QTemporaryFile is weird and will return false in exists if fileName wasn't called before
|
||||
d->m_archiveData->metadataFile.fileName();
|
||||
d->loadDocumentInfo( d->m_archiveData->metadataFile, LoadPageInfo );
|
||||
d->loadDocumentInfo( LoadGeneralInfo );
|
||||
}
|
||||
|
@ -4734,12 +4736,14 @@ bool Document::saveDocumentArchive( const QString &fileName )
|
|||
if ( !modifiedFile.open() )
|
||||
return false;
|
||||
|
||||
const QString modifiedFileName = modifiedFile.fileName();
|
||||
|
||||
modifiedFile.close(); // We're only interested in the file name
|
||||
|
||||
QString errorText;
|
||||
if ( saveChanges( modifiedFile.fileName(), &errorText ) )
|
||||
if ( saveChanges( modifiedFileName, &errorText ) )
|
||||
{
|
||||
docPath = modifiedFile.fileName(); // Save this instead of the original file
|
||||
docPath = modifiedFileName; // Save this instead of the original file
|
||||
annotationsSavedNatively = d->canAddAnnotationsNatively();
|
||||
formsSavedNatively = canSaveChanges( SaveFormsCapability );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue