diff --git a/inkbox.pro b/inkbox.pro index 1cc9b7f..4857804 100644 --- a/inkbox.pro +++ b/inkbox.pro @@ -4,7 +4,7 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 -QMAKE_CXXFLAGS += -Wno-unused-function +QMAKE_CXXFLAGS += -Wno-unused-function -Wno-unused-parameter # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. diff --git a/main.cpp b/main.cpp index f455929..0fcb889 100644 --- a/main.cpp +++ b/main.cpp @@ -26,7 +26,6 @@ int main(int argc, char *argv[]) { - checkconfig("test"); // Checking if there has been an ALERT flag set up, and if there is, show a big warning if(checkconfig("/external_root/boot/flags/ALERT") == true) { QApplication a(argc, argv); diff --git a/reader.cpp b/reader.cpp index f8694a7..7917aac 100644 --- a/reader.cpp +++ b/reader.cpp @@ -399,7 +399,7 @@ reader::~reader() void reader::on_nextBtn_clicked() { - if(split_total - 1 == 1) { + if(split_total - 1 == 1 or split_total - 1 == 0) { QMessageBox::critical(this, tr("Invalid argument"), tr("You've reached the end of the document.")); } else { diff --git a/reader.h b/reader.h index 07c8233..a5270cf 100644 --- a/reader.h +++ b/reader.h @@ -140,6 +140,7 @@ public: ittext = content[i]; QDir::setCurrent("/mnt/onboard/.adds/inkbox"); } + return 0; } void checkwords() { QFile words_list(".config/06-words/config");