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

Method newComic

common/comic.cpp:906–930  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

904#endif // NO_PDF
905
906Comic *FactoryComic::newComic(const QString &path)
907{
908
909 QFileInfo fi(path);
910 if (fi.exists()) {
911 if (fi.isFile()) {
912#ifndef NO_PDF
913 if (fi.suffix().compare("pdf", Qt::CaseInsensitive) == 0) {
914 return new PDFComic();
915 } else {
916 return new FileComic();
917 }
918#else
919 return new FileComic();
920#endif
921 } else {
922 if (fi.isDir()) {
923 return new FolderComic();
924 } else {
925 return NULL;
926 }
927 }
928 } else
929 return NULL;
930}
931
932bool is_double_page(const QString &pageName, const QString &commonPrefix, const int maxExpectedDoublePagesNumberLenght)
933{

Callers 1

loadMethod · 0.45

Calls 1

isDirMethod · 0.45

Tested by

no test coverage detected