From 99676137e491b32f0612e74c016d94802546ff24 Mon Sep 17 00:00:00 2001 From: Nicolas Mailloux Date: Fri, 23 Apr 2021 08:49:17 -0400 Subject: [PATCH] Cleanup for low/critical battery alert warnings Check the previous commit for the main changes. --- alert.cpp | 2 +- mainwindow.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/alert.cpp b/alert.cpp index 8e5bf91..5494e32 100644 --- a/alert.cpp +++ b/alert.cpp @@ -60,7 +60,7 @@ alert::alert(QWidget *parent) : ui->warningLabel->setText("Please charge your eReader."); ui->securityLabel->setText("The battery's charge level is critical."); ui->messageLabel->setText("To prevent filesystem damage, your device has been turned off.\nPlease consider charging it."); - //poweroff(false); + poweroff(false); } ui->warningLabel->setStyleSheet("QLabel { background-color : black; color : white; font-size: 16pt}"); diff --git a/mainwindow.cpp b/mainwindow.cpp index 4bdb0b8..43527c5 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -548,13 +548,13 @@ void MainWindow::on_pushButton_clicked() void MainWindow::on_searchBtn_clicked() { - global::battery::showCriticalBatteryAlert = true; + /*global::battery::showCriticalBatteryAlert = true; global::battery::showLowBatteryDialog = false; alertWindow = new alert(); alertWindow->setAttribute(Qt::WA_DeleteOnClose); alertWindow->setGeometry(QRect(QPoint(0,0), screen()->geometry ().size())); - alertWindow->show(); + alertWindow->show();*/ } void MainWindow::on_quitBtn_clicked()