summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier CHURLAUD <olivier@churlaud.com>2016-07-13 18:58:30 (GMT)
committerOlivier CHURLAUD <olivier@churlaud.com>2016-07-13 19:00:35 (GMT)
commitec0b68a75672ad2413fefbed81ebe08c46080bd7 (patch)
treef625e927c17051a34e5fa270fc9c88c2ae4ed159
parentc110c65401a97877eb8b1cd3c6be04e2bdcbc5ec (diff)
Update deprecated KArchive method + remove unused variable in
generator_pdf Reviewer: sandsmark
-rw-r--r--core/document.cpp6
-rw-r--r--generators/poppler/generator_pdf.cpp1
2 files changed, 5 insertions, 2 deletions
diff --git a/core/document.cpp b/core/document.cpp
index edef21b..a59d2ea 100644
--- a/core/document.cpp
+++ b/core/document.cpp
@@ -4583,8 +4583,10 @@ bool Document::saveDocumentArchive( const QString &fileName )
return false;
const QByteArray contentDocXml = contentDoc.toByteArray();
- okularArchive.writeFile( QStringLiteral("content.xml"), user.loginName(), userGroup.name(),
- contentDocXml.constData(), contentDocXml.length() );
+ const mode_t perm = 0100644;
+ okularArchive.writeFile( QStringLiteral("content.xml"), contentDocXml, perm,
+ user.loginName(), userGroup.name() );
+
okularArchive.addLocalFile( docPath, docFileName );
okularArchive.addLocalFile( metadataFile.fileName(), QStringLiteral("metadata.xml") );
diff --git a/generators/poppler/generator_pdf.cpp b/generators/poppler/generator_pdf.cpp
index 3b53f41..6ace716 100644
--- a/generators/poppler/generator_pdf.cpp
+++ b/generators/poppler/generator_pdf.cpp
@@ -1773,6 +1773,7 @@ bool PDFGenerator::supportsOption( SaveOption option ) const
bool PDFGenerator::save( const QString &fileName, SaveOptions options, QString *errorText )
{
+ Q_UNUSED(errorText);
Poppler::PDFConverter *pdfConv = pdfdoc->pdfConverter();
pdfConv->setOutputFileName( fileName );