From 28214e6a0af55d240ea64ca32c83831878459fc9 Mon Sep 17 00:00:00 2001 From: Arne Date: Sun, 23 Feb 2025 22:56:41 +0100 Subject: [PATCH] rename onActionDestroyed to onNotificationDestroyed --- src/singletons/Toasts.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/singletons/Toasts.cpp b/src/singletons/Toasts.cpp index 0facafce9ab..07285e9751a 100644 --- a/src/singletons/Toasts.cpp +++ b/src/singletons/Toasts.cpp @@ -96,7 +96,7 @@ void onActionClosed(NotifyNotification *notif, void * /*userData*/) g_object_unref(notif); } -void onActionDestroyed(void *data) +void onNotificationDestroyed(void *data) { auto *channelNameHeap = static_cast(data); delete channelNameHeap; @@ -355,16 +355,16 @@ void Toasts::sendLibnotify(const QString &channelName, NotifyNotification *notif = notify_notification_new( str.toUtf8().constData(), channelTitle.toUtf8().constData(), nullptr); - // this will be freed in onActionDestroyed + // this will be freed in onNotificationDestroyed auto *channelNameHeap = new QString(channelName); - // we only set onActionDestroyed as free_func in the first action because - // all free_funcs will be called once the notification is destroyed which - // would cause a double-free otherwise + // we only set onNotificationDestroyed as free_func in the first action + // because all free_funcs will be called once the notification is destroyed + // which would cause a double-free otherwise notify_notification_add_action(notif, OPEN_IN_BROWSER.toUtf8().constData(), OPEN_IN_BROWSER.toUtf8().constData(), (NotifyActionCallback)onAction, - channelNameHeap, onActionDestroyed); + channelNameHeap, onNotificationDestroyed); notify_notification_add_action( notif, OPEN_PLAYER_IN_BROWSER.toUtf8().constData(), OPEN_PLAYER_IN_BROWSER.toUtf8().constData(),