mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 23:57:22 -08:00
Support more file types
This commit is contained in:
parent
69cc8c1b5f
commit
7af178f9e5
2 changed files with 3 additions and 3 deletions
|
@ -330,7 +330,7 @@ void generalDialog::on_okBtn_clicked()
|
|||
dirIt.next();
|
||||
if(QFileInfo(dirIt.filePath()).isFile()) {
|
||||
QString suffix = QFileInfo(dirIt.filePath()).suffix();
|
||||
if(suffix == "txt" or suffix == "TXT" or suffix == "epub" or suffix == "pdf" or suffix == "PDF") {
|
||||
if(suffix == "txt" or suffix == "TXT" or suffix == "epub" or suffix == "EPUB" or suffix == "pdf" or suffix == "PDF" or suffix == "png" or suffix == "PNG" or suffix == "tif" or suffix == "TIF" or suffix == "bmp" or suffix == "BMP" or suffix == "tiff" or suffix == "TIFF" or suffix == "jpg" or suffix == "JPG" or suffix == "jpeg" or suffix == "JPEG") {
|
||||
if(dirIt.fileName().contains(global::keyboard::keyboardText) == true) {
|
||||
storageSearchResults.append(dirIt.fileName());
|
||||
}
|
||||
|
|
|
@ -2071,11 +2071,11 @@ bool reader::pdf_file_match(QString file) {
|
|||
}
|
||||
|
||||
bool reader::image_file_match(QString file) {
|
||||
if(file.right(3) == "png" or file.right(3) == "jpg" or file.right(3) == "bmp" or file.right(3) == "tif") {
|
||||
if(file.right(3) == "png" or file.right(3) == "PNG" or file.right(3) == "jpg" or file.right(3) == "JPG" or file.right(3) == "bmp" or file.right(3) == "BMP" or file.right(3) == "tif" or file.right(3) == "TIF") {
|
||||
string_writeconfig("/inkbox/bookIsImage", "true");
|
||||
return true;
|
||||
}
|
||||
else if(file.right(4) == "jpeg" or file.right(4) == "tiff") {
|
||||
else if(file.right(4) == "jpeg" or file.right(4) == "JPEG" or file.right(4) == "tiff" or file.right(4) == "TIFF") {
|
||||
string_writeconfig("/inkbox/bookIsImage", "true");
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue