Review Request 127543: Remove the keys from the notification hashmap

David Kahles david.kahles96 at gmail.com
Tue Apr 5 21:34:20 UTC 2016


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127543/
-----------------------------------------------------------

(Updated April 5, 2016, 9:34 p.m.)


Status
------

This change has been marked as submitted.


Review request for kdeconnect.


Changes
-------

Submitted with commit e86ea7b3bde7af3d4415299afbf1fa467ed311c5 by David Kahles to branch master.


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/20160405/29bb13be/attachment.html>


More information about the KDEConnect mailing list