Review Request 127543: Remove the keys from the notification hashmap
David Kahles
david.kahles96 at gmail.com
Fri Apr 1 13:42:46 UTC 2016
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127543/
-----------------------------------------------------------
Review request for kdeconnect.
Repository: kdeconnect-kde
Description
-------
When disabling the notifications plugin, we can't delete the notification
adapter due to a QT bug. Thus we leak it, and to not expose the notifications
anymore, we clean up the notifications in the adaptor. Therefore we delete
the QStrings in the notification hashmap (mNotifications) with qDeleteAll().
But this function does only free the QStrings, but no remove the keys from the
hashmap. Thus, a subsequent call to activeNotifications() has an undefined
behavior, as there are dangling pointers in the hashmap. This is solved by
removing the keys from the hashmap.
Diffs
-----
plugins/notifications/notificationsdbusinterface.cpp 4e2c7e0eaf551b209ff680787af2428312ca0729
Diff: https://git.reviewboard.kde.org/r/127543/diff/
Testing
-------
After disabling the notification plugin and restating the plasmashell, I got notification entries with text ":" in my plasmoid.
Now they are gone.
Thanks,
David Kahles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdeconnect/attachments/20160401/480f20ac/attachment.html>
More information about the KDEConnect
mailing list