mirror of
https://github.com/Quill-OS/quill.git
synced 2024-12-26 15:47:22 -08:00
List index out of range fix when reading empty documents
This commit is contained in:
parent
f46e9f3f28
commit
511594eeba
4 changed files with 3 additions and 3 deletions
|
@ -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.
|
||||
|
|
1
main.cpp
1
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);
|
||||
|
|
|
@ -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 {
|
||||
|
|
1
reader.h
1
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");
|
||||
|
|
Loading…
Reference in a new issue