MCPcopy Create free account
hub / github.com/YACReader/yacreader / openComic

Method openComic

common/pdf_comic.cpp:52–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50}
51
52bool PdfiumComic::openComic(const QString &path)
53{
54 pdfFile.setFileName(path);
55
56 if (pdfFile.open(QIODevice::ReadOnly) == false) {
57 qDebug() << "unable to open file : " << path;
58 return false;
59 }
60
61 fileAccess.m_FileLen = pdfFile.size();
62 fileAccess.m_GetBlock = pdfRead;
63 fileAccess.m_Param = &pdfFile;
64
65 QMutexLocker lock(&pdfmutex);
66 doc = FPDF_LoadCustomDocument(&fileAccess, NULL);
67 if (doc) {
68 return true;
69 } else {
70 qDebug() << FPDF_GetLastError();
71 return false;
72 }
73}
74
75void PdfiumComic::closeComic()
76{

Callers 1

processMethod · 0.45

Calls 1

openMethod · 0.45

Tested by

no test coverage detected