Fix bug where Alert icon would not show

This commit is contained in:
Nicolas Mailloux 2021-04-26 12:36:45 -04:00
parent d319e1c70b
commit 10bbe560a4

View file

@ -26,6 +26,11 @@ alert::alert(QWidget *parent) :
this->setStyleSheet(stylesheetFile.readAll()); this->setStyleSheet(stylesheetFile.readAll());
stylesheetFile.close(); stylesheetFile.close();
// Default icon in case none of the conditions below are met
QPixmap pixmap(":/resources/alert.png");
QPixmap scaledPixmap = pixmap.scaled(stdIconWidth, stdIconHeight, Qt::KeepAspectRatio);
ui->alertIconLabel->setPixmap(scaledPixmap);
// Checking if the update's signature is untrusted. The signature error will always take precedence over the downgrade one (c.f. update.sh script) // Checking if the update's signature is untrusted. The signature error will always take precedence over the downgrade one (c.f. update.sh script)
if(checkconfig("/external_root/boot/flags/ALERT_SIGN") == true) { if(checkconfig("/external_root/boot/flags/ALERT_SIGN") == true) {
QPixmap pixmap(":/resources/alert.png"); QPixmap pixmap(":/resources/alert.png");