| 41 | } |
| 42 | |
| 43 | PDFDocumentReference::PDFDocumentReference(const QString& theFilename, const PDFCacheOption& theCacheOption): |
| 44 | filename_(theFilename), |
| 45 | fileContents_(), |
| 46 | cacheOption_(theCacheOption), |
| 47 | mutex_(), |
| 48 | popplerDocument_() |
| 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 | } |
| 58 | const PDFCacheOption& PDFDocumentReference::cacheOption() const |
| 59 | { |
| 60 | return cacheOption_; |
nothing calls this directly
no outgoing calls
no test coverage detected