Review Request 127543: Remove the keys from the notification hashmap

Aleix Pol Gonzalez aleixpol at kde.org
Fri Apr 1 19:04:42 UTC 2016


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


Ship it!




Good catch!

- Aleix Pol Gonzalez


On April 1, 2016, 3:42 p.m., David Kahles wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127543/
> -----------------------------------------------------------
> 
> (Updated April 1, 2016, 3:42 p.m.)
> 
> 
> 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/303b64b8/attachment.html>


More information about the KDEConnect mailing list