summaryrefslogtreecommitdiffstats
path: root/src/pdf/qpdffile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf/qpdffile.cpp')
-rw-r--r--src/pdf/qpdffile.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/pdf/qpdffile.cpp b/src/pdf/qpdffile.cpp
new file mode 100644
index 000000000..a54f6a568
--- /dev/null
+++ b/src/pdf/qpdffile.cpp
@@ -0,0 +1,28 @@
+// Copyright (C) 2022 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
+
+#include "qpdffile_p.h"
+
+QT_BEGIN_NAMESPACE
+
+/*!
+ \internal
+ \class QPdfFile
+ \inmodule QtPdf
+
+ QPdfFile is a means of passing a PDF file along with the associated
+ QPdfDocument together into QPdfIOHandler::load(QIODevice *device) so that
+ QPdfIOHandler does not need to construct its own redundant QPdfDocument
+ instance. If it succeeds in casting the QIODevice to a QPdfFile, it is
+ expected to use the QPdfDocument operations for all I/O, and thus the
+ normal QFile I/O functions are not needed for that use case.
+*/
+
+QPdfFile::QPdfFile(QPdfDocument *doc)
+ : QFile(doc->fileName()), m_document(doc)
+{
+}
+
+QT_END_NAMESPACE
+
+//#include "moc_qpdffile_p.cpp"