Console: Remove Translated Notification message

===============================================

With the new console extension, the translation state is coded separatedly.

Therefore, it is possible to code a Notification as translated without needing a specific type.

Additionally, any other message, such as Error of Warning can be translated.

It does not make sense to leave this message, if only for reasons of coherence and to simplify
maintainance of code.
This commit is contained in:
Abdullah Tahiri
2023-05-21 16:45:44 +02:00
committed by abdullahtahiriyo
parent 3b04601ade
commit 5e5d863968
4 changed files with 16 additions and 41 deletions

View File

@@ -234,7 +234,6 @@ NotificationAreaObserver::NotificationAreaObserver(NotificationArea* notificatio
bLog = false; // ignore log messages
bMsg = false; // ignore messages
bNotification = true; // activate user notifications
bTranslatedNotification = true;// activate translated user notifications
}
NotificationAreaObserver::~NotificationAreaObserver()
@@ -377,16 +376,14 @@ public:
if (tableWidget) {
for (int i = tableWidget->topLevelItemCount() - 1; i >= 0; i--) {
auto* item = static_cast<NotificationItem*>(tableWidget->topLevelItem(i));
if (item->notificationType == Base::LogStyle::Notification
|| item->notificationType == Base::LogStyle::TranslatedNotification) {
if (item->notificationType == Base::LogStyle::Notification) {
delete item;
}
}
}
for (int i = pushedItems.size() - 1; i >= 0; i--) {
auto* item = static_cast<NotificationItem*>(pushedItems.at(i));
if (item->notificationType == Base::LogStyle::Notification
|| item->notificationType == Base::LogStyle::TranslatedNotification) {
if (item->notificationType == Base::LogStyle::Notification) {
delete pushedItems.takeAt(i);
}
}
@@ -1057,9 +1054,7 @@ void NotificationArea::showInNotificationArea()
item->notifying = false;
if (pImp->autoRemoveUserNotifications) {
if (item->notificationType == Base::LogStyle::Notification
|| item->notificationType
== Base::LogStyle::TranslatedNotification) {
if (item->notificationType == Base::LogStyle::Notification) {
static_cast<NotificationsAction*>(pImp->notificationaction)
->deleteItem(item);