From 8c1bf5bc04d78580e00519c0a21670770178618a Mon Sep 17 00:00:00 2001 From: Gurkengewuerz Date: Mon, 13 May 2019 19:28:44 +0200 Subject: [PATCH] alert function from application on critical messages --- src/notifications.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/notifications.cpp b/src/notifications.cpp index ff8e07d..02f43ef 100644 --- a/src/notifications.cpp +++ b/src/notifications.cpp @@ -3,6 +3,7 @@ #include "mainwindow.hpp" #include "ui_mainwindow.h" #include +#include #ifdef Q_OS_LINUX #undef signals @@ -26,6 +27,11 @@ void notifications::notify(QString title, QString body, QSystemTrayIcon::Message } void notifications::notifyNolog(QString title, QString body, QSystemTrayIcon::MessageIcon icon) { + + if(icon == QSystemTrayIcon::Critical) { + QApplication::alert(MainWindow::inst()); + } + #ifdef Q_OS_LINUX NotifyNotification *n = notify_notification_new(title.toLocal8Bit(), body.toLocal8Bit(), 0); notify_notification_set_timeout(n, 5000);