MCPcopy Create free account
hub / github.com/dannyedel/dspdfviewer / PDFDocumentReference

Method PDFDocumentReference

pdfdocumentreference.cpp:43–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43PDFDocumentReference::PDFDocumentReference(const QString& theFilename, const PDFCacheOption& theCacheOption):
44filename_(theFilename),
45fileContents_(),
46cacheOption_(theCacheOption),
47mutex_(),
48popplerDocument_()
49{
50 if ( cacheOption() == PDFCacheOption::keepPDFinMemory ) {
51 DEBUGOUT << "Reading file into memory";
52 QFile file(filename());
53 file.open(QIODevice::ReadOnly);
54 fileContents_ = file.readAll();
55 DEBUGOUT << fileContents_.size() << "bytes read";
56 }
57}
58const PDFCacheOption& PDFDocumentReference::cacheOption() const
59{
60 return cacheOption_;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected