mirror of
https://git.jami.net/savoirfairelinux/jami-client-qt.git
synced 2025-07-25 09:55:31 +02:00
SystemTray: fix GLib warnings when Jami shuts down
Change-Id: I52f4e52bbe5fd535b61c459fb7b6dd22ee8f2053
This commit is contained in:
parent
35482fa92f
commit
4b17fa1a12
1 changed files with 8 additions and 0 deletions
|
@ -129,6 +129,14 @@ SystemTray::SystemTray(AppSettingsManager* settingsManager, QObject* parent)
|
|||
SystemTray::~SystemTray()
|
||||
{
|
||||
#ifdef USE_LIBNOTIFY
|
||||
// Clearing notifications to ensure that g_object_unref is called on every
|
||||
// NotifyNotification object *before* we call notify_uninit. This isn't strictly
|
||||
// necessary, but if we don't do it, then the destructor will call g_object_unref
|
||||
// anyway, and this will happen *after* notify_uninit, which causes GLib to
|
||||
// generate cryptic warnings when Jami shuts down, e.g.:
|
||||
// `instance '0x5627a4e236a0' has no handler with id '309'`
|
||||
pimpl_->notifications.clear();
|
||||
|
||||
notify_uninit();
|
||||
#endif // USE_LIBNOTIFY
|
||||
hide();
|
||||
|
|
Loading…
Add table
Reference in a new issue