From a96b70addb43fda797127e01b9950e642268d554 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Mon, 6 Jul 2020 17:08:16 +0200 Subject: [PATCH] Bugfix : When clicking ont it, close all but call notifications Propagate delete signal from any popup to the main popup and point to it --- linphone-app/src/components/notifier/Notifier.cpp | 1 + .../ui/modules/Linphone/Notifications/Notification.qml | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/linphone-app/src/components/notifier/Notifier.cpp b/linphone-app/src/components/notifier/Notifier.cpp index 91c0c09b9..de5eb692b 100644 --- a/linphone-app/src/components/notifier/Notifier.cpp +++ b/linphone-app/src/components/notifier/Notifier.cpp @@ -181,6 +181,7 @@ QObject *Notifier::createNotification (Notifier::NotificationType type, QVariant view->setGeometry(subWindow->geometry()); // Ensure to have sufficient space to both let painter do job without error, and stay behind popup if(previousWrapper!=nullptr){ // Link objects in order to propagate events without having to store them + QObject::connect(previousWrapper, SIGNAL(deleteNotification(QVariant)), wrapperItem,SLOT(deleteNotificationSlot())); QObject::connect(wrapperItem, SIGNAL(isOpened()), previousWrapper,SLOT(open())); QObject::connect(wrapperItem, SIGNAL(isClosed()), previousWrapper,SLOT(close())); QObject::connect(wrapperItem, &QObject::destroyed, previousWrapper, &QObject::deleteLater); diff --git a/linphone-app/ui/modules/Linphone/Notifications/Notification.qml b/linphone-app/ui/modules/Linphone/Notifications/Notification.qml index 3630037a1..8570dde1f 100644 --- a/linphone-app/ui/modules/Linphone/Notifications/Notification.qml +++ b/linphone-app/ui/modules/Linphone/Notifications/Notification.qml @@ -14,13 +14,17 @@ DesktopPopup { default property alias _content: content.data signal deleteNotification (var notification) + +// Use as an intermediate between signal/slot without propagate the notification var : last signal parameter will be the last notification instance + function deleteNotificationSlot(){ + deleteNotification(notification) + } function _close (cb) { if (cb) { cb() } - - deleteNotification(notification) + deleteNotificationSlot(); } Rectangle {