mirror of
https://github.com/Quill-OS/quill.git
synced 2024-11-01 05:43:21 -07:00
Reader framework: fix file opening bug
When an user first opened an ePUB, then a PDF, it didn't work. This was due to an issue with the two tmpfs at '/kobo/inkbox' and '/kobo/run'. This commit fixes that issue.
This commit is contained in:
parent
b2737d2f59
commit
8501b42124
2 changed files with 3 additions and 6 deletions
7
main.cpp
7
main.cpp
|
@ -173,12 +173,7 @@ int main(int argc, char *argv[])
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(checkconfig("/inkbox/bookIsEpub") == true) {
|
QProcess::execute("remount_tmpfs_launch.sh", QStringList());
|
||||||
global::reader::bookIsEpub = true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
global::reader::bookIsEpub = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
QApplication a(argc, argv);
|
QApplication a(argc, argv);
|
||||||
MainWindow w;
|
MainWindow w;
|
||||||
|
|
|
@ -1878,6 +1878,7 @@ void reader::getTotalEpubPagesNumber() {
|
||||||
|
|
||||||
string_checkconfig_ro("/run/epub_total_pages_number");
|
string_checkconfig_ro("/run/epub_total_pages_number");
|
||||||
totalPagesInt = checkconfig_str_val.toInt();
|
totalPagesInt = checkconfig_str_val.toInt();
|
||||||
|
QFile::remove("/run/epub_total_pages_number");
|
||||||
}
|
}
|
||||||
|
|
||||||
void reader::on_gotoBtn_clicked()
|
void reader::on_gotoBtn_clicked()
|
||||||
|
@ -2120,6 +2121,7 @@ void reader::getTotalPdfPagesNumber() {
|
||||||
|
|
||||||
string_checkconfig_ro("/run/pdf_total_pages_number");
|
string_checkconfig_ro("/run/pdf_total_pages_number");
|
||||||
totalPagesInt = checkconfig_str_val.toInt();
|
totalPagesInt = checkconfig_str_val.toInt();
|
||||||
|
QFile::remove("/run/pdf_total_pages_number");
|
||||||
}
|
}
|
||||||
|
|
||||||
void reader::on_pdfScaleSlider_valueChanged(int value)
|
void reader::on_pdfScaleSlider_valueChanged(int value)
|
||||||
|
|
Loading…
Reference in a new issue