| 904 | #endif // NO_PDF |
| 905 | |
| 906 | Comic *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 | |
| 932 | bool is_double_page(const QString &pageName, const QString &commonPrefix, const int maxExpectedDoublePagesNumberLenght) |
| 933 | { |